Player APIs (BrightScript & Ja...
...
Object Reference
Presentation and Widget Object...
roVideoEvent, roAudioEvent
9min
video and audio events are declared as separate classes events can have one of the following values, which are retrieved using the getint() method 3 playing the current media item has started playing 8 mediaended the media item has completed playback 12 timehit a particular timecode has been reached see the entry on rovideoplayer docid\ ztuz0ldazcml2kqmdbkcn for more details 13 overlay playing an roaudioplayermx instance has begun playback of an audio file 14 overlay mediaended an roaudioplayermx instance has completed playback of an audio file 15 overlay timehit the eventtimestamp of an roaudioplayermx instance has been been reached 16 mediaerror a media error has been detected as opposed to code 30, this event usually indicates transient errors (e g low buffer levels) 17 overlay mediaerror a media error has been detected during roaudioplayermx playback 18 fadingout the current media item has completed fading out see the rovideoplayer setfade() entry for more details 19 decodereos 20 overlay fadingout the fadeoutlocation of an roaudioplayermx instance has been reached 21 overlay decodereos 26 underflow the stream seems to be underflowing this event usually indicates that the streaming latency is set too low it will be generated every few seconds as long as underflow is detected 28 resourceshortage you are trying to play more video simultaneously than is allowed if you are playing a single video by creating new video tags, reuse the existing video tag when possible to avoid race conditions when a video tag might hold onto a hardware video resource or take too long to disassociate a video player from the video tag 30 mediaerror notstarted a fatal error has been encountered while attempting to start playback (e g the video format is not supported) the diagnostic web server (dws) docid\ qxt4yhey7iej m9dh73wm log may return more specific information about media error states ifint getint() as integer returns the event id as an integer value setint(value as integer) as void sets the integer value ifuserdata setuserdata(user data as object) as void sets the user data getuserdata() as object returns the user data that has previously been set via setuserdata() (on either the event or source object) it will return invalid if no data has been set ifsourceidentity getsourceidentity() as integer setsourceidentity() as integer the ifsourceidentity interface has been deprecated we recommend using the ifuserdata interface instead ifdata getdata() as integer setdata(a as integer) example vp msg loop msg=wait(tiut, p) if type(msg)="rovideoevent" then if debug then print "video event";msg getint() if msg getint() = 8 then if debug then print "videofinished" retcode=5 return endif else if type(msg)="rogpiobutton" then if debug then print "button press";msg if escm and msg=bm then retcode=1\ return if esc1 and msg=b1 then retcode=2\ return if esc2 and msg=b2 then retcode=3\ return if esc3 and msg=b3 then retcode=4\ return else if type(msg)="rotint32" then if debug then print "timeout" retcode=6 return endif goto vp msg loop