dailymotion / dailymotion-swift-player-sdk-ios

Dailymotion Player SDK for iOS in Swift
MIT License
34 stars 15 forks source link

How to set Extra Parameters in swift #9

Closed musy closed 7 years ago

musy commented 7 years ago

I want to add set parameters like android: setExtraParameters("ui-logo=false&ui-start-screen-info=false&sharing-enable=false&endscreen-enable=false");

JanGorman commented 7 years ago

The usage section shows how: https://github.com/dailymotion/dailymotion-swift-player-sdk-ios#usage

Anything that you pass in the parameters parameter (🙃) to DMPlayerViewController is appended to the URL that's called. From the README sample:

let parameters: [String: Any] = [
  "fullscreen-action": "trigger_event", // Trigger an event when the users toggles full screen mode in the player
  "sharing-action": "trigger_event" // Trigger an event to share the video to e.g. show a UIActivityViewController
]
let controller = DMPlayerViewController(parameters: parameters)

So from this, you can expect something like this to be appended to your URL: …&fullscreen-action=trigger_event&sharing-action= trigger_event.

musy commented 7 years ago

I already try it and than success. thanks @JanGorman