Roku Developer Program

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

Why fastforward/rewind button first time working too slow

I am working on video player using video node. My issue is when i press first time fastforward/rewind button during video playing/buffering then button is not working. After pressing 4-6 times fast forward or rewind button is working after that it is working properly but for first time i have to press 4-6 time button then working. My code is...

function setVideo()
m.InnerVideo ="InnerVideo")
inner = createObject("RoSGNode", "ContentNode")
inner.url = "url..."
inner.streamformat = "hls"

m.innerVideo.visible = true
m.innerVideo.content = inner
m.innerVideo.control = "play"
end function

function onKeyEvent(key as String, press as Boolean) as Boolean
handled = false

if press
if key = "fastforward"
print "fastforward" // Working after 4-6 times pressing for first job

handled = true
end if
end if

return handled
end function

Please suggest me what should be issue? Is issue related to video file format or encoding/decoding?

0 Kudos
Level 7

Re: Why fastforward/rewind button first time working too slo

Thank you
After adding code
inner.SwitchingStrategy = "full-adaptation"

It's working properly
0 Kudos