video
The playable HTMLVideoElement that the Player consumes to obtain video frame data to render to the screen while animating a Live Photo.
Declaration
attribute HTMLVideoElement video;Discussion
If this property is not populated by a playable HTMLVideoElement, the Player cannot play, but can still render as a photo if photo is populated.
You can get a value for this property in one of a few ways:
Set videoSrc to a string URL and wait for the resulting download and preparation to complete, at which point the property is populated with the resulting
HTMLVideoElement.Set the videoSrc to an
ArrayBufferand wait for the resulting preparation to complete, at which point the property is populated with the resultingHTMLVideoElement.Set the property directly to a fully playable
HTMLVideoElementwhosecanplayevent has fired.
Assigning this property directly causes videoSrc to be cleared and set back to null. Moreover, if videoSrc was recently assigned and a network request or asynchronous decoding is still happening, that activity is also canceled.