在iOS设备上打开youtube播放列表的方案 [英] scheme to open a youtube playlist on a iOS device

查看:298
本文介绍了在iOS设备上打开youtube播放列表的方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道一个打开YouTube播放列表的方案.

I want to know a scheme to open a Youtube playlist.

我有此代码:

if ([[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString      stringWithFormat:@"youtube://playlist?list=PLgrYntDWyYDdHwZney5QoTDFQrphRmYoK"]]]//https://twitter.com/cms24es
    ) {

}else if ([[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://twitter.com/TmrrrsApp"]]]//https://twitter.com/cms24es
          ) {

}

如果使用youtube://,我知道打开视频的方案,但是我不知道如何打开播放列表.

I know a scheme to open a video, if I use youtube://, but to open a playlist instead I don't know how.

推荐答案

好吧,我猜youtube无法理解这样的播放列表的浏览器网址-

Well I guess youtube doesn't understand browser URL of playlist like this -

http://www.youtube.com/playlist?list=PLgrYntDWyYDdHwZney5QoTDFQrphRmYoK

或者,转到您的视频->播放列表-

Alternatively, go to your video->playlist -

右键单击播放列表,然后选择复制链接地址"

Right click on the playlist and select "copy link address"

它提供了类似这样的链接-

It provides a link something like this -

http://www.youtube.com/watch?v=ILwOQV32rHg&list=FLLpWow4PGIVkCJifJxrMfwA

使用它作为URI可以在本机youtube应用中播放.

Use this as a URI to play in native youtube app.

youtube://www.youtube.com/watch?v=ILwOQV32rHg&list=FLLpWow4PGIVkCJifJxrMfwA

这篇关于在iOS设备上打开youtube播放列表的方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆