getVideoElement

Description

Returns the media element used by the RxPlayer.

You're not encouraged to use its APIs as they can enter in conflict with the RxPlayer's API.

Despite its name, this method can also return an audio element if the RxPlayer was instantiated with one.

Syntax

const elt = player.getVideoElement();
  • return value HTMLMediaElement: The media element attached to the RxPlayer.

Example

const videoElement = player.getVideoElement();
videoElement.className = "my-video-element";
Page List