fix(webapp): autoplay client live feed video
This commit is contained in:
@@ -530,7 +530,10 @@ const attachClientStreamToElement = () => {
|
||||
if (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) => {
|
||||
|
||||
@@ -216,6 +216,8 @@
|
||||
<video
|
||||
id="clientStreamVideo"
|
||||
class="absolute inset-0 h-full w-full object-contain {$appState.clientStreamMode === 'video' ? '' : 'hidden'}"
|
||||
autoplay
|
||||
muted
|
||||
playsinline
|
||||
bind:this={clientVideoElement}
|
||||
></video>
|
||||
|
||||
Reference in New Issue
Block a user