fix(webapp): autoplay client live feed video
This commit is contained in:
@@ -530,7 +530,10 @@ const attachClientStreamToElement = () => {
|
|||||||
if (clientVideoElement.srcObject !== stream) {
|
if (clientVideoElement.srcObject !== stream) {
|
||||||
clientVideoElement.srcObject = stream;
|
clientVideoElement.srcObject = stream;
|
||||||
}
|
}
|
||||||
void clientVideoElement.play().catch(() => {});
|
clientVideoElement.muted = true;
|
||||||
|
void clientVideoElement.play().catch((error) => {
|
||||||
|
addActivity('Stream', `Autoplay blocked for ${activeStreamSessionId}: ${error?.name || 'play_failed'}`);
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const startCameraPreview = async (cameraInputId = getAppState().selectedCameraInputId) => {
|
const startCameraPreview = async (cameraInputId = getAppState().selectedCameraInputId) => {
|
||||||
|
|||||||
@@ -216,6 +216,8 @@
|
|||||||
<video
|
<video
|
||||||
id="clientStreamVideo"
|
id="clientStreamVideo"
|
||||||
class="absolute inset-0 h-full w-full object-contain {$appState.clientStreamMode === 'video' ? '' : 'hidden'}"
|
class="absolute inset-0 h-full w-full object-contain {$appState.clientStreamMode === 'video' ? '' : 'hidden'}"
|
||||||
|
autoplay
|
||||||
|
muted
|
||||||
playsinline
|
playsinline
|
||||||
bind:this={clientVideoElement}
|
bind:this={clientVideoElement}
|
||||||
></video>
|
></video>
|
||||||
|
|||||||
Reference in New Issue
Block a user