6.1-roVideoEvent, roAudioEvent
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 |
| The current media item has started playing. |
8 |
| The media item has completed playback. |
12 |
| A particular timecode has been reached. See the entry on Timecode Events for more details. |
13 |
| An roAudioPlayerMx instance has begun playback of an audio file. |
14 |
| An roAudioPlayerMx instance has completed playback of an audio file. |
15 |
| The EventTimeStamp of an roAudioPlayerMx instance has been been reached. |
16 |
| A media error has been detected. |
17 |
| A media error has been detected during roAudioPlayerMx playback. |
18 |
| The current media item has completed fading out. See the roVideoPlayer.SetFade() entry for more details. |
19 |
| |
20 |
| The FadeOutLocation of an roAudioPlayerMx instance has been reached. |
21 |
| |
26 |
| 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. |
ifInt
The ifInt interface contains the event ID enumerated above and provides the following:
GetInt As Integer()
SetInt(a As Integer)
GetSourceIdentity() As Integer
SetSourceIdentity() As Integer
ifData
The ifData interface contains userdata and provides the following:
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