i have created a mobile player control. I want to display a custom progressbar to indicate the progress of the movie. I use the following to get the values needed for calculating the width of my progressbar:
Code: Select all
put mobileControlGet("video", "currentTime") into timecode
put mobileControlGet("video", "duration") into duration
While I found this to be true for Android, for iOS the currentTime is given in my case in milliseconds but the duration is given in seconds. It is not a big deal but it took me a while to figure it out. Furthermore, can I trust that it will give the duration always in seconds? Can I force the player control to give me the duration of the clip in milliseconds?"duration": returns the duration of a movie, measured in milliseconds. This is an integer value.
A second issue is about the starting the video, since the videofiles are located on a wasabi server it might take a while before the video can start playing. What would be the most elegant way to deal with this delay between starting the video and the actual start of the playback? what I currently do when I want to show a video-clip is the following:
1. set the player control invisible
2. set the filename of the player control to filepath
3. start playback of player control
4. show spinner widget
5. send "showvideo" to me in 800 milliseconds
6. on showvideo: if currentTime of player is > 0 show player control, hide spinner widget, otherwise send "showvideo" to me in 50 milliseconds
It works very well on android, on iOS it crashes now and then, not sure what is the issue.
Thanks
Oliver