Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
5ytech
Visitor

My roVideoplayer is not playing

My...rovideoplayer is not playing after adding id to the media source name, i am not sure why?

url "http://public.agnozine.com/Clients/39A8D100-E3F2-4E78-9B6B-81E1B2E99C7DChildrensArts&Crafts1.ism/manifest"
before adding id it was working fine

please find the code for your reference.?
p = CreateObject("roMessagePort")
video = CreateObject("roVideoScreen")
video.setMessagePort(p)

bitrates = [0] ' 0 = no dots, adaptive bitrate
bitrates = [348] ' <500 Kbps = 1 dot
bitrates = [664] ' <800 Kbps = 2 dots
bitrates = [996] ' <1.1Mbps = 3 dots
bitrates = [2048] ' >=1.1Mbps = 4 dots
bitrates = [0]
' print "bitrates" + bitrates

'Swap the commented values below to play different video clips...
urls = ["http://public.agnozine.com/Clients/39A8D100-E3F2-4E78-9B6B-81E1B2E99C7DChildrensArts&Crafts1.ism/manifest"]
qualities = ["HD"]
StreamFormat = "mp4"
title = "Craig Venter Synthetic Life"
srt = "file://pkg:/source/craigventer.srt"
print urls

'urls = ["http://video.ted.com/talks/podcast/DanGilbert_2004_480.mp4"]
'qualities = ["HD"]
'StreamFormat = "mp4"
'title = "Dan Gilbert asks, Why are we happy?"

' Apple's HLS test stream
'urls = ["http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8"]
'qualities = ["SD"]
'streamformat = "hls"
'title = "Apple BipBop Test Stream"

' Big Buck Bunny test stream from Wowza
'urls = ["http://ec2-174-129-153-104.compute-1.amazonaws.com:1935/vod/smil:BigBuckBunny.smil/playlist.m3u8"]
'qualities = ["SD"]
'streamformat = "hls"
'title = "Big Buck Bunny"

if type(args) = "roAssociativeArray"
if type(args.url) = "roString" and args.url <> "" then
urls[0] = args.url
end if
if type(args.StreamFormat) = "roString" and args.StreamFormat <> "" then
StreamFormat = args.StreamFormat
end if
if type(args.title) = "roString" and args.title <> "" then
title = args.title
else
title = ""
end if
if type(args.srt) = "roString" and args.srt <> "" then
srt = args.StreamFormat
else
srt = ""
end if
end if

videoclip = CreateObject("roAssociativeArray")
videoclip.StreamBitrates = bitrates
videoclip.StreamUrls = urls
videoclip.StreamQualities = qualities
videoclip.StreamFormat = StreamFormat
videoclip.Title = title
'videoclip.Playstart=10740
print "srt = ";srt
if srt <> invalid and srt <> "" then
videoclip.SubtitleUrl = srt
end if

video.SetContent(videoclip)

video.show()

lastSavedPos = 0
statusInterval = 10 'position must change by more than this number of seconds before saving

while true
msg = wait(0, video.GetMessagePort())
if type(msg) = "roVideoScreenEvent"
if msg.isScreenClosed() then 'ScreenClosed event
print "Closing video screen"
exit while
else if msg.isPlaybackPosition() then
nowpos = msg.GetIndex()
print "Hello" + nowpos
if nowpos > 10000
if abs(nowpos - lastSavedPos) > statusInterval
lastSavedPos = nowpos
end if
end if
if nowpos < 10000
if abs(nowpos - lastSavedPos) > statusInterval
lastSavedPos = nowpos
end if
end if
if nowpos > 0
if abs(nowpos - lastSavedPos) > statusInterval
lastSavedPos = nowpos
end if
end if
else if msg.isRequestFailed()
print msg.isRequestFailed()
print "play failed: "; msg.GetMessage()
else
print "Unknown event: "; msg.GetType(); " msg: "; msg.GetMessage()
endif
end if
end while
0 Kudos
2 REPLIES 2
destruk
Streaming Star

Re: My roVideoplayer is not playing

Try setting the StreamFormat to "ism".
And this won't play on Roku 1's - only 2's and 3's.
0 Kudos
5ytech
Visitor

Re: My roVideoplayer is not playing

I tried "ism", but it is not working....and i am also using roku 2
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.