V1.01 johnmci@smalltalkconsulting.com Nov 8th 2000
A Simple MPEG Player for playing MPEG3 audio or video
| foo |
foo _ MpegPlayer playFile: 'my.mpg'.
foo playStream: 0. "To play both audio and video, stream #0 "
foo playAudioStream: 0 "To play audio stream".
foo playVideoStream: 0 "To play video stream"
foo playStreamWaitTilDone: 0 "To play audio/video as currrent process"
or
| foo |
foo _ MPEGPlayer playFile: 'my.mpg' onForm: Display.
foo playStream: 0.
To play full screen.
Warning this might not return what you want, it gets percentage based on audio, or video stream based on last usage, because we buffer audio it may give incorrect information when playing mpeg movies
Alternate method is to seek all video/audio for stream to a certain percentage using the primitive, but I think your mpeg must have timecodes! otherwise endless loop