Stream "ended" event not triggering in ios


For some reason, I am having issues in safari on ios where it is not triggering the ended event at the end of the stream. I have tried both “onended” and “ended” but I can’t seem to get it to even console.log something.

variables.nextVideo.addEventListener("ended", () => {
                if (nextVideoSrc) actions.loadNextVideo(video, nextVideoSrc)

variables.nextVideo is Stream(document.getElementById('video"))

but I have also tried putting the ‘ended’ event just on the actual element.

Any ideas?

1 Like

This works for both chrome and safari on web just not on the phone

@amy5 which version of iOS Safari are you seeing this behavior in? This pen is working for me. Can you share a reduced test case?