Skip to content

Commit

Permalink
Pass ChapterInfo to media session
Browse files Browse the repository at this point in the history
  • Loading branch information
advplyr committed Jan 28, 2025
1 parent 51704f4 commit 45aaaf9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/components/app/MediaPlayerContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,8 @@ export default {
{
src: this.$store.getters['globals/getLibraryItemCoverSrc'](this.streamLibraryItem, '/Logo.png', true)
}
]
],
chapterInfo
})
console.log('Set media session metadata', navigator.mediaSession.metadata)
Expand Down

2 comments on commit 45aaaf9

@laxandrea
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I notice the code

navigator.mediaSession.setActionHandler('previoustrack', this.mediaSessionSeekBackward)
navigator.mediaSession.setActionHandler('nexttrack', this.mediaSessionSeekForward)

insted of

navigator.mediaSession.setActionHandler('previoustrack', this.mediaSessionPreviousTrack)
navigator.mediaSession.setActionHandler('nexttrack', this.mediaSessionNextTrack) 

is there any reason ?

@advplyr
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because many Bluetooth headset controls send next/prev track actions instead of seek actions.
#1721

That was almost 2 years ago and no one has brought it up so I'm not sure how many users would be affected if we switched it. It does make more sense for next track to go to the next chapter.

Please sign in to comment.