1
여기 YouTube-Player-iOS-Helper
라운드 해왔다 : https://github.com/youtube/youtube-ios-player-helper어떻게하면 Youtube iOS API로 특정 순간에 갈 수 있습니까?
하지만 특정 초에서 iOS 앱에 포함 된 비디오, 어떤 생각을 시작하는 방법을 알아낼 수 없습니다? 당신이 볼 수 있듯이
은 내가 HTML5 키 - 값 쌍 "start": 100
을 추가
- 을 시도하지만,
- 충돌 및 비디오,
pv.seekToSeconds(100, allowSeekAhead: true)
를로드 한 후 추구하려고 노력하지만 효과가 없습니다
===
class ViewController: UIViewController {
@IBOutlet weak var pv: YTPlayerView!
override func viewDidLoad() {
super.viewDidLoad()
pv.loadWithVideoId("M7lc1UVf-VE", playerVars: ["controls": 0, "playsinline": 1, "autohide": 1, "showinfo": 0, "modestbranding": 1]) //, "start": 100
NSNotificationCenter.defaultCenter().addObserver(self, selector: "receivedPlaybackStartedNotification:", name: "Playback started", object: nil)
}
func receivedPlaybackStartedNotification(notification: NSNotification) {
pv.seekToSeconds(100, allowSeekAhead: true)
}
}
동영상을 전혀 재생할 수 있습니까? – Zigglzworth
예, 재생할 수 있습니다 –
흠 .. viewdidload 대신에 viewdidappear에서 작업을 시도하십시오 – Zigglzworth