Forum Discussion

hugetv's avatar
hugetv
Visitor
9 years ago

roVideoScreen problem with dual audio

Here is my code that I am using now does not work where double audio


Sub playVideoMovies(episode As Object)

port = CreateObject("roMessagePort")
screen = CreateObject("roVideoScreen")
screen.SetMessagePort(port)
screen.SetCertificatesFile("common:/certs/ca-bundle.crt")
screen.InitClientCertificates()

vid_to_play = episode

vid_to_play = {
Stream: { url: episode.StreamUrl }
StreamFormat: "mkv"
StreamBitrates: "0"
Title: episode.Title
SubtitleUrl: episode.SubtitleUrl
PlayStart: episode.PlayStart
AudioFormat: "dolby-digital"
}

screen.SetLoop(true)
screen.SetPositionNotificationPeriod(1)
screen.SetContent(vid_to_play)
doCerts(screen)
screen.Show()


while (true)
msg = wait(250, port)

if type(msg) = "roVideoScreenEvent" then
print "showHomeScreen | msg = "; msg.getMessage() " | index = "; msg.GetIndex()
if msg.isScreenClosed()
print "Screen closed"
exit while
elseif msg.isStatusMessage()
print "Video status: "; msg.GetIndex(); " " msg.GetData()
elseif msg.isButtonPressed()
print "Button pressed: "; msg.GetIndex(); " " msg.GetData()
elseif msg.isPlaybackPosition() then
'print "Play position: "; msg.GetIndex(); " " msg.GetData()
nowpos = msg.GetIndex()
RegWrite(episode.ContentId, nowpos.toStr())
elseif msg.isFullResult() then
RegWrite(episode.ContentId, "0")
exit while
elseif msg.isPartialResult()
print "Video playback was interrupted: "; msg.GetType()
exit while
else if msg.isRequestFailed()
print "request failed – error: "; msg.GetIndex();" – "; msg.GetMessage()
exit while
else if msg.isRequestInterrupted()
print "request failed – error: "; msg.GetIndex();" – "; msg.GetMessage()
else
print "Unexpected event type: "; msg.GetType()
end if
else
'print "Unexpected message class: "; type(msg)
end if

end while

End Sub
No RepliesBe the first to reply