Seeks are reported multiple times a second while playing in Chromium/Electron in Linux. Too many setPositionState calls? #8098
Labels
component: UI
The issue involves the Shaka Player UI
priority: P2
Smaller impact or easy workaround
type: bug
Something isn't working correctly
Milestone
Have you read the FAQ and checked for duplicate open issues?
Yes
If the problem is related to FairPlay, have you read the tutorial?
Unrelated
What version of Shaka Player are you using?
Nightly
Can you reproduce the issue with our latest release version?
Yes
Can you reproduce the issue with the latest code from
main
?Yes
Are you using the demo app or your own custom app?
Demo
If custom app, can you reproduce the issue using our demo app?
Yes
What browser and OS are you using?
Chromium on Linux/NixOS
For embedded devices (smart TVs, etc.), what model and firmware version are you using?
Not applicable
What are the manifest and license server URIs?
Unrelated
What configuration are you using? What is the output of
player.getNonDefaultConfiguration()
?See Demo configuration
What did you do?
dbus-monitor "path=/org/mpris/MediaPlayer2"
seeked
of interfaceorg.mpris.MediaPlayer2.Player
roughly four times a secondWhat did you expect to happen?
The browser should not report a seek if no seek is happening.
What actually happened?
The "seeked" member of the MPRIS interface gets called over and over.
I've stumbled upon this while trying to debug some random behavior in an Electron app using shaka. There I investigate some rare and random "stop" calls from MPRIS. I currently suspect the
seeked
spam could trigger a race condition in some media control program running over here.The same behavior of lots of seek events shows in Electron but not in Firefox.
The behavior seems to be a direct result of the integration of PR #7188 .
I'm unsure if this is a bug but the question template said to use the bug template if it might be a bug.
For me it looks like the behavior of calling
updatePositionState
which callsnavigator.mediaSession.setPositionState
in a somewhat tight loop is not intended usage of this API. But yet I'm not sure.shaka-player/ui/controls.js
Line 1376 in e9b1a6c
Are you planning to send a PR to fix it?
No
EDIT: Also other players like mpv or websites like YouTube don't do this. So I guess it's abnormal.
The text was updated successfully, but these errors were encountered: