Offline video token that generated by BrightcovePlayerUtil. Video download session must be completed before setting prop and playback. If set videoToken, videoId and referenceId will be ignored.
autoPlay
boolean
Set true to play automatically
play
boolean
Control playback and pause
fullscreen
boolean
Control full screen state
volume
number
Set audio volume (0.0 ~ 1.0)
bitRate
number
Set maximum buffering bitrate. Set 0 to automatic quality
playbackRate
number
Set playback speed scale. Default is 1
disableDefaultControl
boolean
Disable default player control. Set true when you implement own video controller.
onReady
Function
Indicates the video can be played back
onPlay
Function
Indicates the video playback starts
onPause
Function
Indicates the video is paused
onEnd
Function
Indicates the video is played to the end
onProgress
Function
Indicates the playback head of the video advances.
Displays a poster specified by videoId, referenceId or videoToken.
Prop is about the same as BrightcovePlayer.
Prop
Type
Description
accountId
string
Required
policyKey
string
Required
videoId
string
referenceId
string
videoToken
string
resizeMode
string
Set the image resize method. Specifying cover or contain works the same as CSS keywords of background-size. Specifying fit, scales to fit the component size without considering aspect ratio of the image. Default value is cover.
BrightcovePlayerUtil
Promise for all methods may be invoke reject. Be sure to catch the exception.
Starts downloading the specified video with videoId or referenceId for offline playback.
Returns VideoToken in string wrapped with Promise. This value will be used for offline playback with BrightcovePlayer, acquisition for download status or deletion of offline videos.
Note that this promise resolves the download start, not the download complete.
In case that specified video has already been downloaded Promise will be rejected.
If the download is in progress, the download is retried on iOS and rejected on Android.
Does not work properly on simulator.
bitrate controls the quality of the downloading video in bps.
Downloads a rendition with the largest bitrate less than or equal to this value.
If no rendition can be found with a bitrate that is smaller than or equal to this bitrate, the lowest rendition will be downloaded.
If this value is 0 or not specified, the lowest rendition with video will be downloaded.
Lists downloaded offline videos and downloading progresses.
downloadProgress equals 1 indicates that offline playback available.
Otherwise the download is in progress and the value shows the progress ratio in 0.0 ~ 1.0.
Note that iOS returns offline videos for all accounts but Android only returns for the specified account. In other words iOS does not consider accountId and policyKey.