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: 
uarlive
Visitor

strange error when player is suddenly exited

I am using the modified Vast video player and everything works fine until a user clicks play in a video then suddenly exits the video. (while the video is buffering) I receive the error below. No error is shown if the user exits the video gracefully. Thanks in advance.

'Dot' Operator attempted with invalid BrightScript Component or interface reference. (runtime error &hec) in ...:/source/VAST_VideoScreen.brs(80)

080: RegWrite(episode.id, nowpos.toStr())
Backtrace:
Function showvideoscreen(episode As <uninitialized>) As Integer
file/line: /tmp/plugin/ADAAAAcaU9ft/...:/source/VAST_VideoScreen.brs(80)
Function showspringboardscreen(episode As ) As
file/line: /tmp/plugin/ADAAAAcaU9ft/pkg:/source/appScreens.brs(57)
Function main() As
file/line: /tmp/plugin/ADAAAAcaU9ft/pkg:/source/appMain.brs(56)


Showvideoscreen while loop


066: while true
067: msg = wait(0, port)
068: if type(msg) = "roVideoScreenEvent" then
069: print "showVideoScreen | msg = "; msg.getMessage() " | index = "; msg.GetIndex()
070: if msg.isScreenClosed()
071: print "Screen closed"
072: exit while
073: else if msg.isfullresult()
074: RegDelete(episode.id)
075:
076:
077:
078:
079: else if msg.isPartialResult()
080: RegWrite(episode.id, nowpos.toStr())
081: Google analytics track event here
082:
083:
084: else if msg.isRequestFailed() then
085: showVideoFailureMessage()
086: 'print "Video request failure: "; msg.GetIndex(); " " msg.GetData()
087: else if msg.isStatusMessage()
088: print "Video status: "; msg.GetIndex(); " " msg.GetData()
089: else if msg.isButtonPressed()
090: print "Button pressed: "; msg.GetIndex(); " " msg.GetData()
091: else if msg.isPlaybackPosition() then
092: nowpos = msg.GetIndex()
093: RegWrite(episode.id, nowpos.toStr())
094:
095: else if msg.isPaused() then
096:
097: else if msg.isResumed() then
098:
099: end if
100: else
101: print "Unexpected message class: "; type(msg)
102: end if
103: end while
104: end sub
0 Kudos
2 REPLIES 2
TheEndless
Channel Surfer

Re: strange error when player is suddenly exited

The error would suggest that either "episode" or "nowpos" is invalid.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
uarlive
Visitor

Re: strange error when player is suddenly exited

Thanks. So I removed the code


showVideoScreen | msg = Playback interrupted by user. | index =  0
<UNINITIALIZED>
showVideoScreen | msg = | index = 0
Screen closed
Unknown event: 5 msg:


I fixed it with this:

            else if msg.isPartialResult()
if msg.GetIndex() <> 0
RegWrite(episode.id, nowpos.toStr())
GA tracking events
endif
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.