Videos not playing in IOS

I have an interface that streams live videos and it's working well on laptops and desktops. However, suddenly it appears to have issues playing video on an apple phone or iPad.

I cannot share the file for reasons of privacy and so on, but here is the best I can explain.
I have this text object which contains video information:

< video id="player_1" disablepictureinpicture="" data-state="hidden" controlslist="nodownload" playsinline="" autoplay="" muted="" poster="">

and I am running code that assigns the return of a promise here, each stream return gets assigned to a place in the array, this one happens to be the first one. no issue with the code working, it's functional.

let vidWin1 = document.getElementsByTagName('video')[0];
if (vidWin1) {
vidWin1.srcObject = event.streams[0];
vidWin1.controls = false;
}

When saved to a test server and viewed from a browser, this video loads in and plays in browsers. it does not play on any ios device.

Weirdly enough, if I embed a similar player into HTML and then add that as a HTML object, it does show up. Why would some video objects work on apple browsers and not apple devices?

for autoplay you may enable muted and playsinline.
so, I'm not on top of the actual restrictions set by OS and/or browsers ...

I'm not sure why it would be different, but I don't have too much experience with streaming video.

I seem to recall there are some situations where .play() can be called prematurely and the promise return result is undefined, but tbh I don't remember how all that can come about.

My first recommendation would be to hook up the remote developer tools and see if there are any errors in the console.

Beyond that, if you can share a privacy-free example file that would be best to see what might be happening.

1 Like