feat: Add experimental rewrite of go2rtc live provider (MSE/WebRTC/MP4/MJPEG) (#2580)
- Closes #2556 - Closes #2450 **Key intended features:** - go2rtc compatible - 100% test coverage to significantly improve ability to test, maintain and work around browser weirdnesses (e.g. Safari). - Written from the ground up in the style of the rest of the project. **To use:** - Change `live_provider` from `go2rtc` to `go2rtc-experimental`.
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
@use 'media-layout.scss';
|
||||
|
||||
:host {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
video,
|
||||
img {
|
||||
@include media-layout.media-layout();
|
||||
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
|
||||
// The inactive surface is `?hidden` in the template (only the committed one
|
||||
// is shown).
|
||||
&[hidden] {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
// Hide the native seek bar (and its time readouts) on the live video: the
|
||||
// stream is live, so scrubbing back only fights the live-edge chase and snaps
|
||||
// to live. Play/pause/volume/fullscreen remain. WebKit/Blink only (Chrome,
|
||||
// Safari, Edge, Android); Firefox does not expose these controls for styling,
|
||||
// so its scrubber stays.
|
||||
video::-webkit-media-controls-timeline,
|
||||
video::-webkit-media-controls-current-time-display,
|
||||
video::-webkit-media-controls-time-remaining-display {
|
||||
display: none;
|
||||
}
|
||||
@@ -4,10 +4,26 @@
|
||||
position: relative;
|
||||
}
|
||||
|
||||
// Until loaded media or a snapshot sizes the frame (the `sized` attribute),
|
||||
// nothing gives it a size, so reserve a default ratio to stop it collapsing.
|
||||
// Real media is never letterboxed into this ratio: the attribute is set the
|
||||
// moment it sizes the frame.
|
||||
:host(:not([sized])) {
|
||||
aspect-ratio: 16 / 9;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
// Fills the frame with a loading or error status when neither media nor a
|
||||
// snapshot is present (a provider renders only its own media, so the frame
|
||||
// would otherwise be blank).
|
||||
.fill {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
}
|
||||
|
||||
advanced-camera-card-icon {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
|
||||
Reference in New Issue
Block a user