diff --git a/.changeset/chilly-llamas-grow.md b/.changeset/chilly-llamas-grow.md new file mode 100644 index 0000000000..63786deb90 --- /dev/null +++ b/.changeset/chilly-llamas-grow.md @@ -0,0 +1,5 @@ +--- +'livekit-client': patch +--- + +Add video autoplay attributes to PublishVideoCheck diff --git a/src/connectionHelper/checks/publishVideo.ts b/src/connectionHelper/checks/publishVideo.ts index ddb9aac7e6..8fa26ed613 100644 --- a/src/connectionHelper/checks/publishVideo.ts +++ b/src/connectionHelper/checks/publishVideo.ts @@ -46,6 +46,11 @@ export class PublishVideoCheck extends Checker { const video = document.createElement('video'); video.srcObject = stream; video.muted = true; + video.autoplay = true; + video.playsInline = true; + // For iOS Safari + video.setAttribute('playsinline', 'true'); + document.body.appendChild(video); await new Promise((resolve) => { video.onplay = () => {