Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply MediaSession fixes to all videos #1752

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

svillar
Copy link
Member

@svillar svillar commented Feb 13, 2025

Wolvic has an internal extension which feeds the navigator.mediaSession object with progress information. It was initially developed to get progress information for the progress bar that is shown on fullscreen videos. That's the reason why the extension was only injecting data into the web engine for those videos that were emitting the onfullscreen events.

The problem is that in VisionGlass we have another progress bar that is shown in the phone UI but for all videos, not only fullscreen ones.

The fix is to capture the playing event and then apply the mediasession fixes that we already have in place for the video element that issued the event.

Fixes #1406

Wolvic has an internal extension which feeds the navigator.mediaSession
object with progress information. It was initially developed to get
progress information for the progress bar that is shown on fullscreen
videos. That's the reason why the extension was only injecting data
into the web engine for those videos that were emitting the onfullscreen
events.

The problem is that in VisionGlass we have another progress bar that
is shown in the phone UI but for all videos, not only fullscreen ones.

The fix is to capture the playing event and then apply the mediasession
fixes that we already have in place for the video element that
issued the event.

Fixes #1406
Copy link
Collaborator

@felipeerias felipeerias left a comment

Choose a reason for hiding this comment

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

It shows the media bar when the video is not yet in fullscreen, but it does not always hide it when the user navigates away to another page.

For example:

  • visit youtube.com
  • open the page for a particular video
  • the video starts playing, the media bar is show
  • click on the "YouTube" logo on the top of the page to go back to youtube.com
  • the media bar is still visible
  • press play: the previous video resumes playback (it can be heard but not seen)

@svillar
Copy link
Member Author

svillar commented Feb 14, 2025

It shows the media bar when the video is not yet in fullscreen, but it does not always hide it when the user navigates away to another page.

For example:

* visit youtube.com

* open the page for a particular video

* the video starts playing, the media bar is show

* click on the "YouTube" logo on the top of the page to go back to youtube.com

* the media bar is still visible

* press play: the previous video resumes playback (it can be heard but not seen)

I have tested this upstream, and it does happen there too, so nothing has changed with this patch (I agree it's a bug anyway)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The slider widget of the phone UI's media controls doesn't work
2 participants