dailymotion / dailymotion-swift-player-sdk-ios

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

Autoplay problem in iOS < 11.4 #34

Closed Anatoli4 closed 6 years ago

Anatoli4 commented 6 years ago

When i start play video in iOS >= 11.4 it's play fine. When i start play video in iOS 11.2 and 10.3 it's didn't start play. For test i use demo app.

override func viewDidLoad() {
    super.viewDidLoad()
    setupPlayerViewController()
    playerViewController.load(videoId: "x4r5udv", params: "{ \"autoplay\": true }")
}

or

 fileprivate lazy var playerViewController: DMPlayerViewController = {
    let parameters: [String: Any] = [
      "fullscreen-action": "trigger_event",
      "sharing-action": "trigger_event",
      "autoplay": true
    ]
    let controller = DMPlayerViewController(parameters: parameters)
    controller.delegate = self
    return controller
  }()
romainbiard commented 6 years ago

Hi @Anatoli4 and thank you for your feedback. I've open a PR (#35) which might fix your problem (you can even test the fix btw).

Estimated release will be within a couple of hours

romainbiard commented 6 years ago

new version is released - could you tell me if it fix your problem?

Many thanks

Anatoli4 commented 6 years ago

Hi @romainbiard. Thx this patch fixing problem.

romainbiard commented 6 years ago

Happy to hear that, thank you. Closing it then.