Forum Discussion
marsradio
13 years agoVisitor
@ Mark:
Thank you for your input. However, I wish I was able to figure out how to implement your suggestion. Sadly, my experience with this type of code is very limited so far, but I'm happy that I am learning a lot as I push through these challenges.
@ Joel:
I thought I tried to implement the few changes you suggested. Unfortunately, I'm still getting the same results I reported last night.
Here's the section of code as it stands now:
And here is the XML file:
As you suggested, I took out <streamFormat> and just left <contentType>.
Then, I shortened:
To this:
But, still, it's just not opening the image. It still does the "retrieve" for a split second and then back.
Any help is greatly appreciated. And, if this type of function is just not meant to coexist within a video app, then that's fine too. This channel will be video driven. This is just an extra "perk" that I'd like to have in there.
Thanks again for any advice that could assist me in accomplishing this.
Thank you for your input. However, I wish I was able to figure out how to implement your suggestion. Sadly, my experience with this type of code is very limited so far, but I'm happy that I am learning a lot as I push through these challenges.
@ Joel:
I thought I tried to implement the few changes you suggested. Unfortunately, I'm still getting the same results I reported last night.
Here's the section of code as it stands now:
'***************************************************************
'** The show detail screen (springboard) is where the user sees
'** the details for a show and is allowed to select a show to
'** begin playback. This is the main event loop for that screen
'** and where we spend our time waiting until the user presses a
'** button and then we decide how best to handle the event.
'***************************************************************
Function showDetailScreen(screen As Object, showList As Object, showIndex as Integer) As Integer
if validateParam(screen, "roSpringboardScreen", "showDetailScreen") = false return -1
if validateParam(showList, "roArray", "showDetailScreen") = false return -1
refreshShowDetail(screen, showList, showIndex)
'remote key id's for left/right navigation
remoteKeyLeft = 4
remoteKeyRight = 5
while true
msg = wait(0, screen.GetMessagePort())
if type(msg) = "roSpringboardScreenEvent" then
if msg.isScreenClosed()
print "Screen closed"
exit while
else if msg.isRemoteKeyPressed()
print "Remote key pressed"
if msg.GetIndex() = remoteKeyLeft then
showIndex = getPrevShow(showList, showIndex)
if showIndex <> -1
refreshShowDetail(screen, showList, showIndex)
end if
else if msg.GetIndex() = remoteKeyRight
showIndex = getNextShow(showList, showIndex)
if showIndex <> -1
refreshShowDetail(screen, showList, showIndex)
end if
endif
else if msg.isButtonPressed()
print "ButtonPressed"
print "ButtonPressed"
if msg.GetIndex() = 1
PlayStart = RegRead(showList[showIndex].ContentId)
if PlayStart <> invalid then
showList[showIndex].PlayStart = PlayStart.ToInt()
endif
if Showlist[showIndex].contentType="image" then
showImage(showList[showIndex])
else
showVideoScreen(showList[showIndex])
end if
refreshShowDetail(screen,showList,showIndex)
endif
if msg.GetIndex() = 2
showList[showIndex].PlayStart = 0
if showList[showIndex].contentType="image" then
showImage(showList[showIndex])
else
showVideoScreen(showList[showIndex])
end if
refreshShowDetail(screen,showList,showIndex)
endif
if msg.GetIndex() = 3
endif
print "Button pressed: "; msg.GetIndex(); " " msg.GetData()
end if
else
print "Unexpected message class: "; type(msg)
end if
end while
return showIndex
End Function
And here is the XML file:
<feed>
<!-- resultLength indicates the total number of results for this feed --><resultLength>1</resultLength><!-- endIndix indicates the number of results for this *paged* section of the feed --><endIndex>1</endIndex>
<item sdImg="http://www.spc.noaa.gov/products/outlook/day1probotlk_1200_torn.gif" hdImg="http://www.spc.noaa.gov/products/outlook/day1probotlk_1200_torn.gif">
<title>24 Hour Tornado Outlook</title>
<contentType>image</contentType>
<contentQuality>SD</contentQuality>
<media>
<streamQuality>SD</streamQuality>
<streamBitrate>1500</streamBitrate>
<streamUrl>http://www.spc.noaa.gov/products/outlook/day1probotlk_1200_torn.gif</streamUrl>
</media>
<synopsis>The 24 Hour Tornado Outlook from the National Weather Service.</synopsis>
<genres>Weather</genres><runtime>100</runtime></item>
</feed>
As you suggested, I took out <streamFormat> and just left <contentType>.
Then, I shortened:
if Showlist[ShowIndex].streamformat=".gif" or Showlist[Showindex].contentType="image" then
To this:
if Showlist[Showindex].contentType="image" then
But, still, it's just not opening the image. It still does the "retrieve" for a split second and then back.
Any help is greatly appreciated. And, if this type of function is just not meant to coexist within a video app, then that's fine too. This channel will be video driven. This is just an extra "perk" that I'd like to have in there.
Thanks again for any advice that could assist me in accomplishing this.