Use methods with Android SDK
Methods allow you to initialize and control Players behavior programmatically, customize the user experience and create dynamic interactions.
Example to initialize a Player:
You can initialize a Player on your app using the createPlayer() method and include your Player ID, Video ID and any other element you need.
val playerParameters = PlayerParameters(
mute = false,
)
Dailymotion.createPlayer(
context = context,
playerId = "MY_PLAYER_ID", // replace by desired player id
videoId = "A_VIDEO_ID", // replace by desired video id
playlistId = "A_PLAYLIST_ID", // replace by desired playlist id
playerParameters = playerParameter,
playerSetupListener = object : Dailymotion.PlayerSetupListener {
....
},
playerListener = object : PlayerListener {
...
}
videoListener = object : VideoListener {
...
}
adListener = object : AdListener {
...
}
)Find all available methods in the Android SDK Reference .
Updated 18 days ago
