Swift Youtube API 内联模式不起作用



我遇到了一个问题,即使我设置了loseinlinemediaplayback = true true它似乎仍然不起作用,我什至尝试使用inline param初始化播放器但这也不起作用...

    override func viewDidLoad() {
    self.playerView.delegate = self
    playerView.webView?.allowsInlineMediaPlayback = true
    playerView.webView?.allowsLinkPreview = true
    //playerView.isHidden = true
    //playerView.load(withVideoId: "60ItHLz5WEA")
    playerView.load(withVideoId: "60ItHLz5WEA", playerVars: ["playsInline":1])
}

好吧,我明白了,我有拼写错误; c 覆盖func viewdidload(){

self.playerView.delegate = self
playerView.webView?.allowsInlineMediaPlayback = true
playerView.webView?.allowsLinkPreview = true
//playerView.isHidden = true
//playerView.load(withVideoId: "60ItHLz5WEA")
playerView.load(withVideoId: "60ItHLz5WEA", playerVars: ["playsInline":1])}

在Playervars中,属性应该是" PlaySinline",而不是" PlaySinline"愚蠢的我。...现在每个人都可以帮助

相关内容

  • 没有找到相关文章

最新更新