Create an instance of Player.
A video/audio tag or its identifier.
A URL to play Ads via Google IMA SDK.
Determine if video should be scaled and scrop to fit container.
Options to enhance Hls and Dash players.
Instance of Ads object.
URL that defines a valid Ad XML file to be read by Google IMA SDK
Flag to determine if player can autoplay media.
Flag that indicates if browser supports autoplay.
Flag that indicates if browser supports autoplay in mute mode.
This is the case with iOS.
Instance of Controls object.
Native video/audio tag to create player instance.
Events that will be triggered in Player to show/hide Play button and loader element, and to interact with the player using a keyboard for accessibility purposes.
Flag to determine if player must be scaled and scrop to fit parent container (only for video elements)
Storage for media's original height, to be used when calculating media's ratio aspect.
Element to indicate that media is being loaded.
Only applies for Media
object, since Ads
does not need it.
Instance of Media object.
Container for other player options.
Button to play media.
Unique identified for the current player instance.
Storage for original volume level vaue, when testing browser's autoplay capabilities to restore it back.
Storage for media's original width, to be used when calculating media's ratio aspect.
Collection of OpenPlayer instances.
Retrieve current player's unique identifier.
Attempt to autoplay media depending on browser's capabilities.
It does not consider autoplaying Ads since that workflow is established already as part of that object.
Build HTML markup for media controls.
Create a Play button in the main player's container.
Also, it creates a loader element, that will be displayed when seeking/waiting for media.
Generate a unique identifier for the current player instance, if no id
attribute was detected.
Create fill effect on video, scaling and croping dimensions relative to its parent.
This methods centers the video view using pure CSS, and uses algorithm to search for the next immediate parent.
Check if the element passed in the constructor is a valid video/audio tag
with 'om-player__media' class (at the very least, since om-player
works
for automatic instantiation)
Load media and events depending of media type.
Set events to show/hide play button and loader element, and to use the player using keyboard for accessibility purposes.
Wrap media instance within a DIV tag.
It detects also wheter the user is using a mouse, or TAB for accessibility purposes.
Append a new <track>
tag to the video/audio tag and dispatch event
so it gets registered/loaded in the player, via controlschanged
event.
Destroy OpenMedia Player instance (including all events associated) and return the video/audio tag to its original state.
Retrieve an instance of the Ads
object.
Retrieve the parent element (with om-player
class) of the native video/audio tag.
This element is mostly useful to attach other player component's markup in a place different than the controls bar.
Retrieve an instance of the controls object used in the player instance.
This element is mostly useful to attach other player component's markup in the controls bar.
Retrieve the original video/audio tag.
This element is useful to attach different events in other player's components.
Retrieve the events attached to the player.
This list does not include individual events associated with other player's components.
Retrieve an instance of the Media
object.
Create all the markup and events needed for the player.
Note that no controls will be created if user is trying to instantiate a video element in an iPhone, because iOS will only use QuickTime as a default constrain.
Check if current media is an instance of an Ad.
Check if current media is an instance of a native media type.
Load media.
HLS and M(PEG)-DASH perform more operations during loading if browser does not support them natively.
Pause media.
If Ads are detected, different methods than the native ones are triggered with this operation.
Play media.
If Ads are detected, different methods than the native ones are triggered with this operation.
Convert all the video/audio tags with om-player
class in a OpenMedia player instance.
Generated using TypeDoc
OpenMedia Player.
This class generates controls to play native media (such as MP4, MP3, HLS, M(PEG-DASH), and have a unified look-and-feel on all modern browsers (including IE11)
Player