Home  >  Q&A  >  body text

objective-c - ios 关于跳转至客户端播放视频的问题

如题
现在业务要求是这样的 如果手机上有客户端 比如优酷 就直接跳转至优酷播放,如果没有 就直接跳转网页播放 跳转网页比较简单就是一个连接 但是跳转APP端的该如何跳转 求解答 谢谢

高洛峰高洛峰2711 days ago286

reply all(2)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 17:40:57

    You can use Url Scheme to jump to other apps. I have a note to check whether the third-party APP is installed and jump to start:
    http://www.jianshu.com/p/28f517775214# 🎜🎜#

    reply
    0
  • 阿神

    阿神2017-04-17 17:40:57

    Use URL schema.

    Check the interface of Youku to see if it provides a URL to quickly open the video player, such as youku://media?id=123, id=123 is the id of the video to be opened.

    If provided, construct a similar URL and pass it to the openURL method. The rest of the work is left to youku App.

    func application(app: UIApplication, openURL url: NSURL, options: [String : AnyObject]) -> Bool {
        return true
    }

    reply
    0
  • Cancelreply