Thursday, September 1, 2022
HomeGame DevelopmentVideo participant part cannot performed robotically on IOS safari - Cocos Creator

Video participant part cannot performed robotically on IOS safari – Cocos Creator


Cocos Creator 3.4.2, webmobile construct.

I’ve a video and I need to play it when the app launch. It may be performed on Android however not on IOS.
Right here’s take a look at hyperlink: https://sweet-shirt.surge.sh/

And the unusual suppose is: if I add a Button and when person click on on it, I name videoPlayer.play(). The videoplayer can play usually.
But when I name videoPlayer.play() through code. And tried to name it once more each one second. The videoPlayer don’t play.

Anybody have any concept to repair it? And in addition is there a solution to get higher log, so we are able to know what’s the error contained in the CC engine?


It is a safari browser rule that requires the person to finish one click on on a web page earlier than video or audio may be performed.

Hello I clicked on on internet (earlier than and after the web page is loaded). The video nonetheless cannot be robotically
performed.

Right here is the video that I examined on my Iphone.

Please observe that I name this.videoPlayer.play() each 1 second.

        let localThis = this;
        this.schedule(() => {
            console.log("schedule - " + localThis + " - " + localThis.videoPlayer + " - " + localThis.videoPlayer.isPlaying);
            localThis.videoPlayer.play();
        }, 1, 1000000);

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments