I am using a, ActionScript class to play MP4 video in a Flex mobile application. The class fairly is simple and is instantiated and initialised when the view fires it’s viewActivate event. I am playing videos bundled with the application.
The class follows the same principles as this tutorial http://www.adobe.com/devnet/flashplayer/articles/stage_video.html to create the NetConnection, NetStream objects and attaching the NetStream to a stageVideo with a fallback to the Video component. I am doing nothing special with colorSpaces or panning, the only thing I have added is a timer that fires every 500ms once the object is initialised and dispatches an event containing the value in the NetStream.time property.
During playback on an Android device, I can pause the video by calling NetStream.pause() which will pause the video on screen and the value returned by NetStream.time does not change. However, the bufferLength continues to increment during the pause and when it reaches ~12 the value returned by NetStream.time jumps ~10 seconds after pause() was called and continues to increment as though the video is playing. Subsequent calls to NetStream.pause() and NetStream.resume() result in the video visually pausing and resuming but the NetStream.time will continue to increment regardless. Once the NetStream.time property indicates the playhead has reached the end of the video, the NetStatusEvent with the code “Netstream.Play.Stop” is fired.
I have tried using both StageVideo and a Video object and setting the bufferTimeMax and bufferTime properties to 0.
I am unable to reproduce the problem on iOS but can do so on Android 4.3 and Android 4.4 with AIR 4 and Flex 4.6, Flex 4.6 beta and Flex 4.11 from apache using both captive and shared runtimes.
I have other bugs with video playback on Android including overlays which never disappear, but will create another question targeted at that issue.
Thanks in advance for anyone that can offer any advice or feedback on this issue.