Extends
React.Component
Extended by
Implements
Constructors
new Media()
new Media(props,mediaPlayer): Media
Parameters
props
any
mediaPlayer
MediaPlayer
Returns
MediaProperties
preservesPitch?
https://html.spec.whatwg.org/multipage/media.html#dom-media-preservespitch Not implementedoptionalpreservesPitch:boolean | undefined
Methods
addEventListener()
addEventListener(type:Adds a event listenerstring, listener: EventListener, options?:boolean | AddEventListenerOptions | undefined):void
Parameters
type
string
listener
EventListeneroptions?
boolean | AddEventListenerOptions | undefined
addTextTrack()
addTextTrack(kind: TextTrackKind, label?:https://html.spec.whatwg.org/multipage/media.html#dom-media-addtexttrackstring | undefined, language?:string | undefined, uri?:string | undefined, mimeType?:string | undefined): TextTrack
Parameters
kind
TextTrackKind The kind attribute must return the text track kind of the text track that the TextTrack object represents.label?
string | undefined
The label attribute must return the text track label of the text track that the TextTrack object represents.
language?
string | undefined
The language attribute must return the text track language of the text track that the TextTrack object represents.
uri?
string | undefined
The uri attribute must return the uri of the out of band subtitle of the text track that the TextTrack object represents.
This is a custom addition (not as per w3c spec). If uri is provided, this component will take care of parsing and rendering subtitles.
mimeType?
string | undefined
The mimeType attribute must return the mime type of the out of band subtitle of the text track that the TextTrack
object represents. This is a custom addition (not as per w3c spec).
Returns
TextTrackcanPlayType()
canPlayType(type: string): CanPlayTypeResult
https://html.spec.whatwg.org/multipage/media.html#dom-navigator-canplaytype
Parameters
type
string
mime type
Returns
CanPlayTypeResultcomponentDidMount()
componentDidMount(): void
componentWillUnmount()
componentWillUnmount(): void
fastSeek()
fastSeek(time:https://html.spec.whatwg.org/multipage/media.html#dom-media-fastseeknumber):void
Parameters
time
number
getStartDate()
getStartDate(): Date
https://html.spec.whatwg.org/multipage/media.html#dom-media-getstartdate
Returns
Date
handleEvent()
handleEvent(event:Handle all media element and audio/video track list events.NativeInterfaces.NativeMediaElementEvent):void
Parameters
event
NativeInterfaces.NativeMediaElementEvent
load()
load(): void
onCaptionViewCreated()
onCaptionViewCreated(captionViewHandle:string):void
Parameters
captionViewHandle
string
pause()
pause(): void
https://html.spec.whatwg.org/multipage/media.html#dom-media-pause
play()
play(): Promise<void>
https://html.spec.whatwg.org/multipage/media.html#dom-media-play
Returns
Promise<void>
removeEventListener()
removeEventListener(type:Removes event listenerstring, listener: EventListener, options?:boolean | EventListenerOptions | undefined):void
Parameters
type
string
listener
EventListeneroptions?
boolean | EventListenerOptions | undefined
setMediaKeys()
setMediaKeys(mediaKeys?: MediaKeys| undefined):Promise<void>
Parameters
mediaKeys?
MediaKeys | undefined
Returns
Promise<void>
