This version is adding a new public event to the player. The event onActiveVideoElementChange
is emitted when the active video element for playback has been created and if the element has been changed in case of a stream switch on iOS. The event data is providing the activeVideoElement
and the complete videoElementList
.
Having a reference to the activeVideoElement
simplifies use cases like drawing or rendering images to a canvas or saving snapshots from the video.
See the api description of the event and our docs feature entry for more information.
onActiveVideoElementChange
videoElementList
{Array.HTMLVideoElement} and the activeVideoElement
{HTMLVideoElement} in the event data