2013-03-20 51 views
1

我一直在開發一個roku頻道,主要來自http://www.herofish.com/2012/01/how-to-create-you-own-roku-videoplayer-channel/上的教程,它已經很好地融合在了一起。現在我的問題是我試圖將頻道連接到Kit Digital Live流(.m3u8流),我不知道如何將頻道連接到該流,而不是常規選擇視頻流。Roku從Kit Digital的流媒體頻道

有誰知道我在哪裏可以找到說明如何做到這一點或文件,可以幫助嗎? (我已經瀏覽了開發者指南和論壇,但找不到任何線索)

回答

1

看看演示代碼:http://sourceforge.net/projects/rokusdkexamples/files/customvideoplayer.zip/download向您展示瞭如何使用HLS和其他一些酷播放功能。

this.player.SetMessagePort(this.port) 
this.player.SetLoop(true) 
this.player.SetPositionNotificationPeriod(1) 
this.player.SetDestinationRect(this.layout.left) 
this.player.SetContentList([{ 
    Stream: { url: "http://ec2-184-72-239-149.compute-1.amazonaws.com:1935/demos/smil:bigbuckbunnyiphone.smil/playlist.m3u8" } 
    StreamFormat: "hls" 
    SwitchingStrategy: "full-adaptation" 
}]) 
this.player.Play() 
+0

它確實有效。我真的很喜歡我的Roku,但現在我崇拜它! – 2014-01-20 09:24:42

0

可能用於測試HLS流的最簡單的例子就是simplevideoplayer例如,在SourceForge上或在您下載的SDK。只需找到「Big Buck Bunny」部分,用.m3u8 url替換引號中的url,添加srt =「」,然後註釋掉其他示例。

' Big Buck Bunny test stream from Wowza 
urls = ["http://myserver.com/mystream.m3u8"] 
streamformat = "hls" 
title = "Big Buck Bunny" 
srt=""