Unexpected event type: 15

Hi!
I run this player after msg.isButtonPressed() in roSpringboardScreen


episode = CreateObject("roAssociativeArray")
episode.Stream = { 
    url:"http://techslides.com/demos/sample-videos/small.mp4",
    bitrate:2000
    quality:false
    streamType: "mp4" ' change to ism 
    contentid:"1"
}

port = CreateObject("roMessagePort")
screen = CreateObject("roVideoScreen")
screen.SetMessagePort(port)
screen.SetPositionNotificationPeriod(30)
screen.SetContent(episode)
screen.Show()

Player work, but if i exit with backbutton or toparrow the roSpringboardScreen not work.
Play again video not work, OK button not respond in roPoster and roSpringboardScreen

Debug:

ButtonPressed
showHomeScreen | msg = Stream started. | index = 1
Unexpected event type: 20
showHomeScreen | msg = | index = 0
showHomeScreen | msg = Playback interrupted by user. | index = 0
Unexpected event type: 15
showHomeScreen | msg = | index = 0
Screen closed
Button pressed: 0 0
Note: GC - Found 149 orphaned objects (objects in a circular ref loop).

ROKU 3 4200X - 6.1 build 5604

That snippet of code seems to work okay. The problem is most likely elsewhere in your code. The event type 15 is an IsPartialResult event, meaning that the video has stopped the video before getting to the end.

Yep, i stopped video with “back button”.

After stop video i return to “roSpringboardScreen”, this stop working correctly: OK button and play again with press msg.isButtonPressed() → and msg.GetIndex() = 1 not work and return Unexpected event type: 15


   while true
        msg = wait(0, screen.GetMessagePort())

        if type(msg) = "roSpringboardScreenEvent" then
            if msg.isScreenClosed()
                print "Screen closed"
                exit while
            else if msg.isRemoteKeyPressed() 
            'DISABLE LEFT/RIGHT Poster Detail change
            
                'print "Remote key pressed"
                'if msg.GetIndex() = remoteKeyLeft then
                '        showIndex = UI_getPrevShow(showList, showIndex)
                '        if showIndex <> -1
                '            UI_refreshShowDetail(screen, showList, showIndex)
                '        end if
                ' else if msg.GetIndex() = remoteKeyRight
                '    showIndex = UI_getNextShow(showList, showIndex)
                '        if showIndex <> -1
                '           UI_refreshShowDetail(screen, showList, showIndex)
                '        end if
                'endif
            else if msg.isButtonPressed() 
                print "ButtonPressed"
                if msg.GetIndex() = 1 'watch
                    
                    episode = CreateObject("roAssociativeArray")
                    
                    episode.Stream = { 
                        url:"http://techslides.com/demos/sample-videos/small.mp4",
                        bitrate:2000
                        quality:false
                        streamType: "mp4" ' change to ism 
                        contentid:"1"
                    }

                    port = CreateObject("roMessagePort")
                    screen = CreateObject("roVideoScreen")
                    screen.SetMessagePort(port)
                    screen.SetPositionNotificationPeriod(30)
                    screen.SetContent(episode)
                    screen.Show()
                endif
                if msg.GetIndex() = 2 'add playlist

                endif
                if msg.GetIndex() = 3 'add fav
                
                endif
                if msg.GetIndex() = 4 'disabled
                
                endif
                if msg.GetIndex() = 5 'add fav
                    return -1 'delete current screen and not break OK button
                endif
                print "Button pressed: "; msg.GetIndex(); " " msg.GetData()
            end if
        else
            print "Unexpected message class: "; type(msg)
        end if
    end while