-
- All Implemented Interfaces:
public interface YouTubePlayerUse this interface to control the playback of YouTube videos and to listen to their events.
-
-
Method Summary
Modifier and Type Method Description abstract UnitloadVideo(String videoId, Float startSeconds)Loads and automatically plays the video. abstract UnitcueVideo(String videoId, Float startSeconds)Loads the video's thumbnail and prepares the player to play the video. abstract Unitplay()abstract Unitpause()abstract Unitmute()abstract UnitunMute()abstract UnitsetVolume(Integer volumePercent)abstract UnitseekTo(Float time)abstract UnitsetPlaybackRate(PlayerConstants.PlaybackRate playbackRate)abstract BooleanaddListener(YouTubePlayerListener listener)abstract BooleanremoveListener(YouTubePlayerListener listener)-
-
Method Detail
-
loadVideo
abstract Unit loadVideo(String videoId, Float startSeconds)
Loads and automatically plays the video.
- Parameters:
videoId- id of the videostartSeconds- the time from which the video should start playing
-
cueVideo
abstract Unit cueVideo(String videoId, Float startSeconds)
Loads the video's thumbnail and prepares the player to play the video. Does not automatically play the video.
- Parameters:
videoId- id of the videostartSeconds- the time from which the video should start playing
-
setVolume
abstract Unit setVolume(Integer volumePercent)
- Parameters:
volumePercent- Integer between 0 and 100
-
setPlaybackRate
abstract Unit setPlaybackRate(PlayerConstants.PlaybackRate playbackRate)
-
addListener
abstract Boolean addListener(YouTubePlayerListener listener)
-
removeListener
abstract Boolean removeListener(YouTubePlayerListener listener)
-
-
-
-