ccui.VideoPlayer keeps stopping!

ccui.VideoPlayer keeps stopping!
0.0 0

#1

Code nearly the same as in the unit test to play a video:

    var video = new ccui.VideoPlayer();

    video.setEventListener(ccui.VideoPlayer.EventType.PLAYING, this._videoPlaying.bind(this));
    video.setEventListener(ccui.VideoPlayer.EventType.PAUSED, this._videoPaused.bind(this));
    video.setEventListener(ccui.VideoPlayer.EventType.STOPPED, this._videoStopped.bind(this));
    video.setEventListener(ccui.VideoPlayer.EventType.COMPLETED, this._videoCompleted.bind(this));

    video.setContentSize(this._videoWidth + 20, this._videoHeight);
    video.setPosition(cc.grid.getVisibleTop());
    video.setScale(winSize.width / this._videoWidth * 0.80);
    video.setAnchorPoint(cc.AnchorPointTop);
    window.video = video;

    this._video = video;

    this.addChild(video, TD.groundPlace.AboveAll);
    video.setURL(this._webUrl);
    
    video.play();

One minute it works fine… the next I get:

Uncaught (in promise) DOMException: The play() request was interrupted by a call to pause(). https://goo.gl/LdLk22
Promise (async)
cb @ UIVideoPlayer.js?_t=1517326753242:477

Here is what my console log looks like:

video._videoPlaying -> Playing
video.js?_t=1517327173677:49 video._videoPaused -> Paused
127.0.0.1/:1 Uncaught (in promise) DOMException: The play() request was interrupted by a call to pause(). https://goo.gl/LdLk22
video.js?_t=1517327173677:44 video._videoPlaying -> Playing
video.js?_t=1517327173677:49 video._videoPaused -> Paused

It seems when the “video.play()” is executed sometimes it will just go into pause state. If I tell it to play by pressing a button and on the callback calling “video.play()” again it will play and then immediately (or not) pause. This is ad hoc and a challenge to fix.

This is on chrome. I have tried setting a timeout but it seems to make the problem worse.

Help!!?

Tim