2013-01-20 38 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 
相關問題