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: 

RoVideoScreen Issue

Hey I just faced an issue i cant say it as a bug.But i am trying to implement Closed Captioning(Subtitles) in RoVideoScreen for Audio Files.The below code working fine for displaying subtitles but some times the seek bar always become visible due to which subtitles hide and sometimes they work efficiently.Is their Any way to set seekbar visibility duration.




Function Main()
print "###################Main Screen Started"
port = CreateObject("roMessagePort")
screen = CreateObject("roVideoScreen")
episode=CreateObject("roAssociativeArray")
episode.HDBranded = false
episode.IsHD = false
subtitle_config = {
TrackName: "http://****.srt"
}

episode.Stream = { url:"http://******",
bitrate:2000
quality:false
contentid:"mycontent-2000"
StreamFormat:"hls"

}
'SubtitleConfig:subtitle_config
episode.StreamFormat="hls"
episode.SubtitleConfig=subtitle_config
screen.EnableTrickPlay(true)
screen.SetContent(episode)
screen.SetMessagePort(port)
screen.Show()

while true
msg = wait(0, port)

if type(msg) = "roVideoScreenEvent" then
print "showVideoScreen | msg = "; msg.GetMessage() " | index = "; msg.GetIndex()
if msg.isScreenClosed()
print "Screen closed"
exit while
else if msg.isStatusMessage()
print "status message: "; msg.GetMessage()
else if msg.isPlaybackPosition()
print "playback position: "; msg.GetIndex()
else if msg.isFullResult()
print "playback completed"
exit while
else if msg.isPartialResult()
print "playback interrupted"
exit while
else if msg.isRequestFailed()
print "request failed – error: "; msg.GetIndex();" – "; msg.GetMessage()
exit while
end if
end if
end while
End Function

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.