VideoElement.play() error - The play() request was interupted by a new load request

Hi,

I’ve switched from Haxe 3 to Haxe 4 and can’t make VideoElement work (target:HTML5). In Haxe 3, that element used to work fine.

So assuming, we have:

my_video_element:VideoElement;
my_video_element.scr = my_string_url;
my_video_element.play();

The following error shows up on VideoElement.play():

"The play() request was interupted by a new load request".

My first thought was that I should wait for the source to be loaded, but no matter how long I wait, the error remains.
I’ve also noticed that my_video_element.readyState is always equal to zero.

I use MP4 (H.264).

Did anybody manage to use Haxe 4 for web video playback?
Please share your experience.

Thanks in advance.

DOMException: The play() request was interrupted ?

From what I understand, VideoElement.play() returns a Promise and you MUST handle it (using .then() or .catch() method).

How do you wait for the load to finish?