Hi,
I can’t get video to play in html. I’m getting the below error with the below code.
Uncaught (in promise) DOMException: The play() request was interrupted by a new load request.
I’d really appreciate some help here. I’ve pushed a small demo project to github here.
class Main extends Sprite
{
var netStream: NetStream ;
public function new()
{
super();
var netConnection = new NetConnection();
netConnection.connect (null);
netStream = new NetStream (netConnection);
netStream.client = { }
netStream.client.onMetaData = ns_onMetaData;
netStream.client.onCuePoint = ns_onCuePoint;
var video = new Video(640, 480);
addChild(video);
video.attachNetStream (netStream);
netStream.play ('V5.mp4' );
}
function ns_onMetaData(item:Dynamic) {
trace("metaData");
}
function ns_onCuePoint(item:Dynamic) {
trace("cuePoint");
trace(item.name + "\t" + item.time);
}
}