Open mobileteamtechaffinity opened 3 years ago
The start
parameter should not be passed during the player init but when the video is loaded:
func loadVideo(_ videoId: String) {
let parameters = [“start”: 30]
guard
let encoded = try? JSONEncoder().encode(parameters),
let params = String(data: encoded, encoding: .utf8)
else { return }
playerViewController.load(videoId: videoId, params: params)
}
I have done a sample project with the below parameters and it's working correctly. After a month I tried the same parameters is not working and the video still starts from 0
let parameters: [String: Any] = [ "fullscreen-action": "trigger_event", "logo": "false", "sharing-action": "trigger_event", "start": Int(25) ] let controller = DMPlayerViewController(parameters: parameters) controller.delegate = self return controller }()