Lars
Lars

Reputation: 1

Why does my video not loop in native dailymotion swift player?

I implemented the DailyMotion video control a few months back. When I checked it now again, the loop functionality does not work anymore. At the end of every video the user gets a list of next videos that start automatically after 5 seconds. Every other parameter seems to work.

My version is 4.0.0. Did anything changed in the API? Below the parameters I used to configure the player.

// setup the Dailymotion controller
  fileprivate lazy var playerViewController: DMPlayerViewController = {
    let parameters: [String: Any] = [
      "fullscreen-action": "trigger_event",
      "sharing-action": "trigger_event",
      "ui-logo": true, // to disable the Dailymotion logo
      "ui-start-screen-info": false, // disable video information (title and owner)
      "ui-highlight": "FFFFFF", // to color the player UI using HEX value
      "loop": true,
      "controls": false,
      "mute": true
    ]
    
    let controller = DMPlayerViewController(parameters: parameters, allowIDFA: false, allowPiP: false)
    controller.delegate = self
    return controller
  }()

Upvotes: 0

Views: 319

Answers (1)

HOCiNE BEKKOUCHE
HOCiNE BEKKOUCHE

Reputation: 589

I had the same problem. my solution is to create a playlist with only one video

var player = DM.player("video-player", {
  video: "<VIDEO_ID>",
  playlist: "<PLAYLIST_ID>",
  height: "100%",
  width: "100%",
  params: {
    autoplay: true,
    loop: true,
    mute: true,
  }
});

Upvotes: 0

Related Questions