【问题标题】:streaming videos from google drive in swift 2在swift 2中从谷歌驱动器流式传输视频
【发布时间】:2016-06-29 11:28:13
【问题描述】:

我试图从谷歌驱动器流式传输视频,但它不工作

这是我的代码

func playVideo () {


    let url = NSURL(string: "https://drive.google.com/file/d/0B9XuPgWwSkzrdHN5WWUydjJScDg/preview")!

    let player = AVPlayer(URL: url)

    let playerViewController = AVPlayerViewController()

    playerViewController.player = player

    self.presentViewController(playerViewController, animated: true) {
        playerViewController.player?.play()
    }

}

当我启动函数image here时得到这个

【问题讨论】:

标签: ios swift google-drive-api


【解决方案1】:

我通过解码链接中的 html 并从中获取蒸汽链接解决了这个问题

您可以在此处查看代码:https://github.com/DevZaid/GDSLink

【讨论】:

  • 这个解决方案不起作用,还有其他更新吗?
【解决方案2】:

您的链接是 Flash 视频,而不是 AVPlayer 支持的某些视频。

【讨论】:

猜你喜欢
  • 2015-06-18
  • 2016-02-26
  • 1970-01-01
  • 2020-08-26
  • 2021-12-16
  • 2019-01-06
  • 1970-01-01
  • 1970-01-01
  • 2012-01-09
相关资源
最近更新 更多