Skip to content

Styling of controls in demo shouldn't be modified when not visible #749

Closed
@jbauman2

Description

@jbauman2

See also https://bugs.chromium.org/p/chromium/issues/detail?id=704673#c1

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?

      • If standard demo asset, which one?
        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 .

Metadata

Metadata

Assignees

Labels

status: archivedArchived and locked; will not be updatedtype: bugSomething isn't working correctly

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions