RCTVideoModule #

Implements basic video playback. Example usage:

videoModule.addHandle(handle); videoModule.setUrl(handle, url); videoModule._setOnVideoReadyCallback(handle, function() { videoModule.play(handle); }); videoModule.load(handle);

Methods #

addHandle(handle) #

Add a new handle to the video module @param {string} handle - The video handle.

setUrl(handle, url) #

Set the video url @param {string} handle - The video handle.

setFormat(handle, format) #

Set the video format @param {string} handle - The video handle. @param {string} format - The video format.

setMetaData(handle, metaData) #

Set video metaData to video player, this can be used for customized video player @param {string} handle - The video handle. @param {any} metaData - The video metaData.

load(handle) #

load the video @param {string} handle - The video handle.

play(handle) #

play the video @param {string} handle - The video handle.

pause(handle) #

pause the video @param {string} handle - The video handle.

seekTo(handle, position) #

seek to a position in a video @param {string} handle - The video handle. @param {number} position - The video position to seek to

setMuted(handle, muted) #

Set the muted attributed of the video @param {string} handle - The video handle. @param {boolean} muted - Whether the video's audio should be muted.

setVolume(handle, volume) #

Set the volume of the video @param {string} handle - The video handle. @param {number} volume - The video volume.

unload(handle) #

unload the video and dispose of any resources. @param {string} handle - The video handle.

You can file an issue on GitHub if you see a typo or error on this page!