Skip to content
This repository was archived by the owner on Aug 24, 2023. It is now read-only.
This repository was archived by the owner on Aug 24, 2023. It is now read-only.

Controls are mirrored on local stream & local stream is unmirrored in fullscreen mode #81

@Philzen

Description

@Philzen

When one enables the controls on a stream via the context menu, it reveals that the local stream is mirrored – which is a feasible setting in itself, coming from

transform: isLocal && isFrontFacing ? 'rotateY(180deg)' : '',

However all the controls are mirrored as well, which makes a really awkward interface 😉
As a workaround i applied a rule such as

video::-webkit-media-controls {
  transform: scaleX(-1)
}

(btw that does the same job as rotateY(180deg) – not sure which is faster to the GPU or preferable in general).
Workaround works fine in Firefox and WebKit-based browsers – until you enter fullscreen mode: In Firefox it's the least bad, controls are fine in fullscreen but become mirrored when exiting fullscreen for a while, until the browser catches up again. In Chromium the controls are effectively mirrored in fullscreen which sort of negates the point of the workaround.


Worse: in both Firefox and Chromium the mirroring of the video stream is not active in fullscreen mode – the picture flips back and forth between non-mirrored and mirrored mode when switching between fullscreen and non-fullscreen mode.

The mirroring also is not applied when using picture-in-picture mode.


I understand from my issue title this technically are two separate issues, but i believe they are two birds that can only be killed with the same stone. I experimented with ::fullscreen-css rule to now avail – i believe it only works on HTML elements along with their content, but seems not to work the video-element itself, presumably b/c it is rendered natively by the client.

We could probably best solve both issues by providing custom controls along with a wrapper around <video> which should react fine to ::fullscreen-styles.

Some interesting article on how this is done: https://css-tricks.com/custom-controls-in-html5-video-full-screen/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions