Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ncognito66
Level 7

Re: Combining Audio and Video...

Thanks Belltown! I had that same problem at work today with a MySQL database..shoulda caught that!

But I still have the fact that audio won't play! Smiley Wink
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
Level 7

Re: Combining Audio and Video...

Here's what I'm getting now:

)
Backtrace:
Function showdetailscreen(screen As <uninitialized>, showlist As <uninitialized>
, showindex As Integer) As Integer
file/line: /tmp/plugin/ADAAAAgUGV7w...g:/source/appDetailScreen.brs(74)
Function displayshowdetailscreen(category As <uninitialized>, showindex As Integ
er) As Integer
file/line: /tmp/plugin/ADAAAAgUGV7w/pkg:/source/appPosterScreen.brs(93)
Function showposterscreen(screen As <uninitialized>, category As <uninitialized>
) As Integer
file/line: /tmp/plugin/ADAAAAgUGV7w/pkg:/source/appPosterScreen.brs(69)
Function displaycategoryposterscreen(category As <uninitialized>) As
file/line: /tmp/plugin/ADAAAAgUGV7w/pkg:/source/appHomeScreen.brs(79)
Function showhomescreen(screen As ) As Integer
file/line: /tmp/plugin/ADAAAAgUGV7w/pkg:/source/appHomeScreen.brs(56)
Function main() As
file/line: /tmp/plugin/ADAAAAgUGV7w/pkg:/source/appMain.brs(20)

Local Variables:
screen &h0010 bsc:roSpringboardScreen, refcnt=2
showlist &h0010 bsc:roArray, refcnt=2
showindex &h0002 Integer val:0
global &h0020 rotINTERFACE:ifGlobal
m &h0010 bsc:roAssociativeArray, refcnt=7
remotekeyleft &h0002 Integer val:4
remotekeyright &h0002 Integer val:5
msg &h0010 bsc:roSpringboardScreenEvent, refcnt=1
playstart &h0000 <uninitialized> val:Uninitialized
BrightScript Debugger>
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
Level 9

Re: Combining Audio and Video...

Change:

playaudio(showlist[showindex])


To:

playaudio(showlist, showindex)
https://github.com/belltown/
0 Kudos
ncognito66
Level 7

Re: Combining Audio and Video...

Still nothing...now I'm getting:

---- AA ----
starrating: 90
hdbifurl:
shortdescriptionline2:
shortdescriptionline1: Ghosts of Deadwood
contentid: 10031
sdbifurl:
categories: (list of 1)...
List(0)= Paranormal
sdposterurl: http://www.hauntedamericaradio.com/images/somalane.jpg
description: David Soma & Kathleen Lane
ishd: false
genre: Paranormal
hdimg: http://www.hauntedamericaradio.com/images/somalane.jpg
streamformat: mp3
length: 7217
contentquality: SD
streamurls: (list of 1)...
List(0)= http://www.hauntedamericaradio.com/audio/Episode10.mp3
runtime: 7217
synopsis: David Soma & Kathleen Lane
streamqualities: (list of 1)...
List(0)= SD
sdimg: http://www.hauntedamericaradio.com/images/somalane.jpg
streambitrates: (list of 1)...
List(0)= 1500
hdposterurl: http://www.hauntedamericaradio.com/images/somalane.jpg
audiostreamurl:
title: Ghosts of Deadwood
contenttype: episode
hdbranded: false
actors: (list of 1)...
List(0)= Paranormal
contentformat: audio
------------
ButtonPressed
ButtonPressed
Current Function:
006: function playaudio(contentlist, index) as integer
007: audio=createobject("roaudioplayer")
008: audio.addcontent({url:contentlist[index].audiostreamurl,streamformat:con
tentlist[index].streamformat})
009: port=createobject("romessageport")
010: audio.setport(port)
011: audio.play()
012: while true
013: msg=wait(0,port)
014: if lcase(type(msg))="roaudioplayerevent" then
015: if msg.isRequestSucceeded() then
016: return -1
017: else if msg.isrequestfailed() then
018: return -2
019: end if
020: end if
021: end while
022:
023: end function
Member function not found in BrightScript Component or interface. (runtime error
&hf4) in ...kg:/source/appVideoScreen.brs(10)

010: audio.setport(port)
Backtrace:
Function playaudio(contentlist As , index As ) As Integer
file/line: /tmp/plugin/CDAAAAuFTzr...kg:/source/appVideoScreen.brs(10)
Function showdetailscreen(screen As <uninitialized>, showlist As <uninitialized>
, showindex As Integer) As Integer
file/line: /tmp/plugin/CDAAAAuFTzrW/pkg:/source/appDetailScreen.brs(74)
Function displayshowdetailscreen(category As <uninitialized>, showindex As Integ
er) As Integer
file/line: /tmp/plugin/CDAAAAuFTzrW/pkg:/source/appPosterScreen.brs(93)
Function showposterscreen(screen As <uninitialized>, category As <uninitialized>
) As Integer
file/line: /tmp/plugin/CDAAAAuFTzrW/pkg:/source/appPosterScreen.brs(69)
Function displaycategoryposterscreen(category As <uninitialized>) As
file/line: /tmp/plugin/CDAAAAuFTzrW/pkg:/source/appHomeScreen.brs(79)
Function showhomescreen(screen As ) As Integer
file/line: /tmp/plugin/CDAAAAuFTzrW/pkg:/source/appHomeScreen.brs(56)
Function main() As
file/line: /tmp/plugin/CDAAAAuFTzrW/pkg:/source/appMain.brs(20)

Local Variables:
contentlist &h0010 bsc:roArray, refcnt=3
index &h0002 Integer val:0
global &h0020 rotINTERFACE:ifGlobal
m &h0010 bsc:roAssociativeArray, refcnt=8
audio &h0010 bsc:roAudioPlayer, refcnt=1
port &h0010 bsc:roMessagePort, refcnt=1
msg &h0000 <uninitialized> val:Uninitialized
BrightScript Debugger>
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
Level 9

Re: Combining Audio and Video...

audio.SetMessagePort (port)
https://github.com/belltown/
0 Kudos
ncognito66
Level 7

Re: Combining Audio and Video...

Thanks Belltown!

I'm new at all this, so I wasn't sure where to put it, so I added it to the player code, at the top of the appVIdeoScreen.brs file, which may be the wrong place for that:

.streamformat})
port=createobject("romessageport")
audio.setport(port)
audio.SetMessagePort (port)
audio.play()
while true
msg=wait(0,port)
if lcase(type(msg))="roaudioplayerevent" then
if msg.isRequestSucceeded() then
return -1
else if msg.isrequestfailed() then
return -2
end if
end if
end while

end function


Still getting nothing but errors:

.streamformat})
009: port=createobject("romessageport")
010: audio.setport(port)
011: audio.SetMessagePort (port)
012: audio.play()
013: while true
014: msg=wait(0,port)
015: if lcase(type(msg))="roaudioplayerevent" then
016: if msg.isRequestSucceeded() then
017: return -1
018: else if msg.isrequestfailed() then
019: return -2
020: end if
021: end if
022: end while
023:
024: end function
Member function not found in BrightScript Component or interface. (runtime error
&hf4) in ...kg:/source/appVideoScreen.brs(10)

010: audio.setport(port)
Backtrace:
Function playaudio(contentlist As , index As ) As Integer
file/line: /tmp/plugin/EDAAAAjIJaI...kg:/source/appVideoScreen.brs(10)
Function showdetailscreen(screen As <uninitialized>, showlist As <uninitialized>
, showindex As Integer) As Integer
file/line: /tmp/plugin/EDAAAAjIJaIA/pkg:/source/appDetailScreen.brs(74)
Function displayshowdetailscreen(category As <uninitialized>, showindex As Integ
er) As Integer
file/line: /tmp/plugin/EDAAAAjIJaIA/pkg:/source/appPosterScreen.brs(93)
Function showposterscreen(screen As <uninitialized>, category As <uninitialized>
) As Integer
file/line: /tmp/plugin/EDAAAAjIJaIA/pkg:/source/appPosterScreen.brs(69)
Function displaycategoryposterscreen(category As <uninitialized>) As
file/line: /tmp/plugin/EDAAAAjIJaIA/pkg:/source/appHomeScreen.brs(79)
Function showhomescreen(screen As ) As Integer
file/line: /tmp/plugin/EDAAAAjIJaIA/pkg:/source/appHomeScreen.brs(56)
Function main() As
file/line: /tmp/plugin/EDAAAAjIJaIA/pkg:/source/appMain.brs(20)

Local Variables:
contentlist &h0010 bsc:roArray, refcnt=3
index &h0002 Integer val:0
global &h0020 rotINTERFACE:ifGlobal
m &h0010 bsc:roAssociativeArray, refcnt=8
audio &h0010 bsc:roAudioPlayer, refcnt=1
port &h0010 bsc:roMessagePort, refcnt=1
msg &h0000 <uninitialized> val:Uninitialized
BrightScript Debugger>
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
RokuChris
Roku Employee
Roku Employee

Re: Combining Audio and Video...

"ncognito66" wrote:
Member function not found in BrightScript Component or interface. (runtime error
&hf4) in ...kg:/source/appVideoScreen.brs(10)

010: audio.setport(port)


This bit of the console output is telling you that the crash is happening on line 10 of appVideoScreen.brs and that your audio variable, which is a roAudioPlayer object, does not have a SetPort() function. Instead, you should call audio.SetMessagePort(port) as belltown said.
0 Kudos
ncognito66
Level 7

Re: Combining Audio and Video...

So replace one with the other instead of adding to it?
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
Level 7

Re: Combining Audio and Video...

Okay, now it's not giving me any crashes, it just simply is not playing anything, which I believe is because the "audiostreamurl" is still reading empty:

---- AA ----
starrating: 90
hdbifurl:
shortdescriptionline2:
shortdescriptionline1: Ghosts of Deadwood
contentid: 10031
sdbifurl:
categories: (list of 1)...
List(0)= Paranormal
sdposterurl: http://www.hauntedamericaradio.com/images/somalane.jpg
description: David Soma & Kathleen Lane
ishd: false
genre: Paranormal
hdimg: http://www.hauntedamericaradio.com/images/somalane.jpg
streamformat: mp3
length: 7217
contentquality: SD
streamurls: (list of 1)...
List(0)= http://www.hauntedamericaradio.com/audio/Episode10.mp3
runtime: 7217
synopsis: David Soma & Kathleen Lane
streamqualities: (list of 1)...
List(0)= SD
sdimg: http://www.hauntedamericaradio.com/images/somalane.jpg
streambitrates: (list of 1)...
List(0)= 1500
hdposterurl: http://www.hauntedamericaradio.com/images/somalane.jpg
audiostreamurl:
title: Ghosts of Deadwood
contenttype: episode
hdbranded: false
actors: (list of 1)...
List(0)= Paranormal
contentformat: audio
------------
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
Level 9

Re: Combining Audio and Video...

The fields you're referencing in your code just don't match up with what you have in your XML. In some places you're referring to your audio URL as 'streamurl', in others you use 'audiostreamurl'. Neither will work the way you're referencing them, as they appear enclosed within a <media> tag in your XML which you aren't referencing in your code.
https://github.com/belltown/
0 Kudos