Class ccui.VideoPlayer
- Defined in: UIVideoPlayer.js
- Extends ccui.Widget
Constructor Attributes | Constructor Name and Description |
---|---|
Method Summary
Class Detail
ccui.VideoPlayer()
Field Detail
<static>
ccui.VideoPlayer.EventType
The VideoPlayer support list of events
{String}
path
- The video path
Method Detail
-
{String} getURL()Get the video path
- Returns:
- {String}
-
isFullScreenEnabled()Determine whether already full screen
-
{boolean} isPlaying()Whether the video is playing
- Returns:
- {boolean}
-
onPlayEvent()Trigger playing events
-
pause()Pause the video
-
play()Play the video
-
removeEventListener(event)Delete events
- Parameters:
- {ccui.VideoPlayer.EventType} event
-
resume()Resume the video
-
seekTo(sec)Jump to the specified point in time
- Parameters:
- {Number} sec
-
setEventListener(event, callback)The binding event
- Parameters:
- {ccui.VideoPlayer.EventType} event
- {Function} callback
-
setFullScreenEnabled(enable)Set whether the full screen May appear inconsistent in different browsers
- Parameters:
- {boolean} enable
-
setKeepAspectRatioEnabled(enable)Whether to keep the aspect ratio
- Parameters:
- enable
-
setURL(address)Set the video address Automatically replace extname All supported video formats will be added to the video
- Parameters:
- {String} address
-
stop()Stop the video