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: 
ncognito66
Visitor

Re: Combining Audio and Video...

*** ERROR compiling /pkg:/source/appDetailScreen.brs:
Syntax Error. (compile error &h02) in ...g:/source/appDetailScreen.brs(72)
Note: GC - Found 50 orphaned objects (objects in a circular ref loop).
*** ERROR compiling /pkg:/source/appDetailScreen.brs:
Syntax Error. (compile error &h02) in ...g:/source/appDetailScreen.brs(72)

I'm assuming (72) refers to the line number? if so, here it is:

if msg.GetIndex() = 2
if showlist[showindex].contentformat <> "audio" then
showList[showIndex].PlayStart = 0
showVideoScreen(showList[showIndex])
refreshShowDetail(screen,showList,showIndex)
else
playaudio(showlist[showindex))
refreshShowDetail(screen,showList,showIndex)
end if
endif
Al
Creator, Producer, and Co-Host - Country Dreams radio show
http://www.countrydreamsradio.com
Founder - Independent Country Music Association
http://www.icmanet.com
Station Engineer - WBTN 1370 AM
http://www.wbtnam.org
0 Kudos
RokuJoel
Binge Watcher

Re: Combining Audio and Video...

typo:

playaudio(showlist[showindex))

should be

playaudio(showlist[showindex])

square bracket instead of curved

- Joel
0 Kudos
ncognito66
Visitor

Re: Combining Audio and Video...

Well sir..we're getting closer!

It nivigates through the screens now, but when you actually go to play either an MP3 audio or an MP4 video, neither plays...it just kinda sits there.

The debugger shows:

playstart &h0000 <uninitialized> val:Uninitialized
BrightScript Debugger> ☺Note: GC - Found 66 orphaned objects (objects in a circu
lar ref loop).
Al
Creator, Producer, and Co-Host - Country Dreams radio show
http://www.countrydreamsradio.com
Founder - Independent Country Music Association
http://www.icmanet.com
Station Engineer - WBTN 1370 AM
http://www.wbtnam.org
0 Kudos
ncognito66
Visitor

Re: Combining Audio and Video...

Now I'm getting "wrong number of function parameters. <runtime error &hf1> in ...g:source/appDetailScreen.brs<72>

072: playaudio<showlist[showindex]>

Backtrace:
Function showdetailscreen<screen As <uninitialized>, showlist As <uninitilaized>, showindex As Integer> As Integer

Pretty much each function says <uninitialized>.....

It also appears it's not picking up the "audiostreamurl" as that listing is blank.

Here's my .xml...look right?

<item sdImg="http://rokudev.roku.com/rokudev/examples/videoplayer/images/CameronCarpenter.jpg" hdImg="http://rokudev.roku.com/rokudev/examples/videoplayer/images/CameronCarpenter.jpg">
<title>Test MP3 file</title>
<contentId>10031</contentId>
<contentType>Music</contentType>
<contentQuality>SD</contentQuality>
<contentformat>audio</contentformat>
<streamformat>mp3</streamformat>
<media>
<streamQuality>SD</streamQuality>
<streamBitrate></streamBitrate>
<audiostreamurl>http://www.hauntedamericaradio.com/audio/Episode10.mp3</audiostreamurl>
</media>
<synopsis>Haunted America Radio Episode 10</synopsis>
<genres>Paranormal</genres>
<runtime>3617</runtime>
</item>

Video is working by the way....just the audio that won't play now. Maybe I put the AudioPlayer in the wrong place? I placed it in the appVideoScreen.brs file.
Al
Creator, Producer, and Co-Host - Country Dreams radio show
http://www.countrydreamsradio.com
Founder - Independent Country Music Association
http://www.icmanet.com
Station Engineer - WBTN 1370 AM
http://www.wbtnam.org
0 Kudos
bandal
Visitor

Re: Combining Audio and Video...

I get the same thing. And I have the <contentType>audio</contentType> in the xml.
0 Kudos
ncognito66
Visitor

Re: Combining Audio and Video...

I think I have all my .xml files they way I need them, and the videos are playing. If I could just figure how where the audio player code belongs, and how come I'm getting an "unable to parse" error on the audio .xml files I think I'd be set.
Al
Creator, Producer, and Co-Host - Country Dreams radio show
http://www.countrydreamsradio.com
Founder - Independent Country Music Association
http://www.icmanet.com
Station Engineer - WBTN 1370 AM
http://www.wbtnam.org
0 Kudos
bandal
Visitor

Re: Combining Audio and Video...

Your right where do we insert into videoplayer the audio code function. My xml is ok, just where do we insert the function to make it work?
0 Kudos
RokuJoel
Binge Watcher

Re: Combining Audio and Video...

if they are not parsing, they are not valid xml, you can check your xml here:

http://www.w3schools.com/dom/dom_validate.asp

Remember, ampersands need to be replaced with &amp;

Post an example if you can of your xml that isn't working.

- Joel
0 Kudos
ncognito66
Visitor

Re: Combining Audio and Video...

Joel:

We have two separate problems here. First, the "audiostreamurl" is apparently not being picked up as it reads empty:

---- AA ----
starrating: 90
hdbifurl:
shortdescriptionline2:
shortdescriptionline1: Test MP3 file
contentid: 10031
sdbifurl:
categories: (list of 1)...
List(0)= Paranormal
sdposterurl: http://rokudev.roku.com/rokudev/example ... penter.jpg
description: Haunted America Radio Episode 10 - MP3
ishd: false
genre: Paranormal
hdimg: http://rokudev.roku.com/rokudev/example ... penter.jpg
streamformat: mp3
length: 7217
contentquality: SD
streamurls: (list of 1)...
List(0)=
runtime: 7217
synopsis: Haunted America Radio Episode 10 - MP3
streamqualities: (list of 1)...
List(0)= SD
sdimg: http://rokudev.roku.com/rokudev/example ... penter.jpg
streambitrates: (list of 1)...
List(0)= 1500
hdposterurl: http://rokudev.roku.com/rokudev/example ... penter.jpg
audiostreamurl:
title: Test MP3 file
contenttype: episode
hdbranded: false
actors: (list of 1)...
List(0)= Paranormal
contentformat: audio

Second is the parsing error. Here's is the example xml file that I've modified, adding the <contentformat> and <audiostreamurl> as you suggested above.

<item sdImg="http://www.hauntedamericaradio.com/images/somalane.jpg" hdImg="http://www.hauntedamericaradio.com/images/somalane.jpg">
<title>Ghosts of Deadwood</title>
<description></description>
<contentId>10031</contentId>
<contentType>Talk</contentType>
<contentQuality>SD</contentQuality>
<contentformat>audio</contentformat>
<streamformat>mp3</streamformat>
<media>
<streamQuality>SD</streamQuality>
<streamBitrate>1500</streamBitrate>
<audiostreamurl>http://www.hauntedamericaradio.com/audio/Episode10.mp3</audiostreamurl>
</media>
<synopsis>David Soma & Kathleen Lane</synopsis>
<genres>Paranormal</genres>
<runtime>7217</runtime>
</item>

I'm also not surewhere I'm supposed to drop in the audioplayer code you mentioned earlier. Thanks again for your help.
Al
Creator, Producer, and Co-Host - Country Dreams radio show
http://www.countrydreamsradio.com
Founder - Independent Country Music Association
http://www.icmanet.com
Station Engineer - WBTN 1370 AM
http://www.wbtnam.org
0 Kudos
belltown
Roku Guru

Re: Combining Audio and Video...

To get your XML to parse, replace:

<synopsis>David Soma & Kathleen Lane</synopsis>


by:

<synopsis>David Soma &amp; Kathleen Lane</synopsis>
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.