Add runtime Player parameters (iOS SDK)
In addition to Player configuration settings, you can add extra parameters that can change at runtime.
While the main Player experience is controlled using the settings defined in your Player configuration from the Dailymotion Studio (Players tab) or the API , additional runtime customization is achievable using client-side parameters. They allow you to specify additional Player behavior or pass in required values to a specific Player embed.
In the example below, we're adding the following runtime parameters to the existing Player config defined in the {Player ID} placeholder:
startTime=15: video will start playing from second 15.mute=true: video will start muted.
Add runtime parameters in the dmPlayerParameters variable:
var dmPlayerParameters = DMPlayerParameters()
dmPlayerParameters.customConfig = ["keyvalues":"category=sport§ion=video", "dynamiciu":"USERID/12345"]
dmPlayerParameters.allowIDFA = true
dmPlayerParameters.allowPIP = true
dmPlayerParameters.defaultFullscreenOrientation = .landscapeRight
dmPlayerParameters.mute = true
dmPlayerParameters.scaleMode = .fit
dmPlayerParameters.startTime = 15
dmPlayerParameters.loop = false
Dailymotion.createPlayer(playerId: "PlayerId", playerParameters: dmPlayerParameters, logLevels: [.all]) { playerView, error in
}
More runtime Player parametersFind all available runtime parameters in the iOS SDK Reference.
Updated 17 days ago
