Can't play videos on iOS

Hello,
I have a problem trying to play videos on play canvas and then seting their video texture to a material in order to render it in 3D on a worlds entity.

The code works perfectly on Windows, Android and MacOs. But on iOs it doesn’t.
I have followed the tutorial for videos:
https://developer.playcanvas.com/en/tutorials/video-textures/
I have noticed that the event “canplaythrough” is not firing but no error is shown on console.
I know the video is initialized.

Does anyone know how to solve this or has had this problem?

In console logs on Safari devtools when connected to iOS device, are there any messages that could link to the issue?

Can you repro the issue in a new public project for people to look at?

How big is the video both in bitrate, dimensions and file size?

How about the tutorial you followed … does that work on the device? And also try PlayCanvas Examples

Yes I have tried the tutorial on iOS and it works, it takes a few miliseconds to load the video but in a second more or less it is working

I havent try safary, I am only interested on Google Chrome.
I will try to make a demo of my code public.
I try to play different videos sizes vary from 5MB to 34.2MB, all the bit rates are 500k, and the dimensions are 720p

It’d be worth playing the same video the tutorial does, to see if the media itself is the problem.

https://playcanv.as/p/c9FIObVE/

here you have a demo, It wont play until you click the screen since you need to do an input so the video can play, since I am playing videos on proximity I placed the camera close enought for the videos to play…

I cant upload the video to the public version since they are private, but how can I test this?
It works on every other platform… couldnt test linux… but I dont care about it.

I have tested this demo, only one of the two video plays, it seams it is a problem of media???

What should be the optimal way to upload the media?

The video that we use in our tutorial has no sound so it can autoplay fine, even when you try to unmute

However, in your test video it does have sound so when you try to unmute on ‘canplaythrough’ without user input first, it throws an exception and doesn’t play the video:

    this.video.addEventListener('canplaythrough', function (e) {

        app.fire(this.playEvent, this.videoTexture);
        this.video.muted = false;
        this.video.volume = 0.25;
    }.bind(this));

By default, browsers do not play audio until there is some user input.

What you have to do is to wait for input from the user before unmuting. I’ve found your project on your profile page and made a fork with an example of enabling sound on first touch or mouse down: https://playcanvas.com/project/1029260/overview/f-videotexturepublic