Igalia / wolvic

A fast and secure browser for standalone virtual-reality and augmented-reality headsets.
https://wolvic.org
Mozilla Public License 2.0
813 stars 105 forks source link

[VisionGlass] Make seek backward/forward work with non-fullscreen media #1415

Closed svillar closed 6 months ago

svillar commented 6 months ago

The previous implementation was relying on the Media's seekTo() method and, specifically for this case, on the getCurrentTime(). The problem of the latter is that it depends on receiving position changed events from the Web engine. In the case of Gecko, for whatever reason, those events are only emitted when in fullscreen.

By switching to using seekForward()/seekBackward() we can keep the functionality. The only significat change is that we cannot control the amount of time skipped, which will be now 5s instead of the previous 10s for backwards and 30s for forwards.

svillar commented 6 months ago

The code looks good and it works. I wonder how this change affects to the seek bar widget (issue 1406); I assume that the slider would still use seekTo, which is still broken, right ?

Yeah, there is no much we could do as the API is not giving us the position :(