-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: hide the video element when a placeholder is visible (#1094)
Applies `display: none` to the `<video>` element when the participant's video isn't playing and a placeholder is visible. Enables building nicer user experience in designs that Video Placeholder that utilize transparency. Styling is done through `str-video__video--no-video` CSS selector that allows an integrator to further customize the behavior and attach more custom styles. ### Implementation notes The `<video>` element needs to stay mounted as we need to be notified about it's `play` or `pause` events that may occur in an uncontrolled fashion in poor network conditions (e.g.: huge packet loss, the browser may pause the video, and once the network is stable enough, will resume playback).
- Loading branch information
Showing
3 changed files
with
17 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,4 +12,8 @@ | |
&--mirror { | ||
transform: scaleX(-1); | ||
} | ||
|
||
&--no-video { | ||
display: none; | ||
} | ||
} |