Styling of controls in demo shouldn't be modified when not visible #749
Labels
status: archived
Archived and locked; will not be updated
type: bug
Something isn't working correctly
Milestone
See also https://bugs.chromium.org/p/chromium/issues/detail?id=704673#c1
What version of Shaka Player are you using?
2.0.7-debug from https://shaka-player-demo.appspot.com/demo/
Are you using the demo app or your own custom app?
demo app
What browser and OS are you using?
Chrome Canary on Windows 10
What did you do?
Loaded shaka player, started a video, and turned on "Paint Flashing" from the "Rendering" tab of Chrome's dev tools
What content did you load?
Sintel 4k (WebM only)
How did you interact with the content, if at all?
No, just waited for the controls to disappear
What did you expect to happen?
Once the controls hide, only the entire video should flash green.
What actually happened?
On alternating frames, either the entire video flashes green or the area where the seekBar is flashes green.
These unnecessary updates to the seekbar take CPU (for styling and layout) and GPU time (to draw frames that don't actually change anything. The demo app should avoid updating properties and style of the seekBar and other CSS elements when they're supposed to be hidden.
I think all calls to ShakaControls.prototype.updateTimeAndSeekRange_ should be deferred until the controls are made visible. Style and property updates that seem problematic are seekBar_.min, seekBar_.max, seekBar_.value, seekBar_.style.background, and currentTime_.textContent .
The text was updated successfully, but these errors were encountered: