2013-01-20 39 views
1

我想知道打开Youtube播放列表的方案。计划在iOS设备上打开YouTube播放列表

我有这样的代码:

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://,而是打开一个播放列表,而不是我不知道怎么办。

回答

0

嗯,我想YouTube不了解播放列表的浏览器URL这样的 -

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

或者,去你video->播放列表 - Your playlist

右键单击播放列表,并选择“复制链接地址”

Copy Link Address

它提供了一个链接是这样的 -

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

将此作为URI在本机的YouTube应用中播放。

youtube://www.youtube.com/watch?v=ILwOQV32rHg&list=FLLpWow4PGIVkCJifJxrMfwA 
相关问题