Skip to main content
Inspiring
April 19, 2012
Question

Problem pausing video on iOS when a meeting reminder happens?

  • April 19, 2012
  • 1 reply
  • 782 views

I'm trying to figure out why my mp4 video file is not pausing when my app has lost focus and I have told it to pause?

I have created a video player for the iPad using netstream and StageVideo.

I have set it up to pause the video when the Event.DEACTIVATE is dispatched.

So when a meeting reminder happens from the Calendar app, my app loses focus. The video loses sound but doesn't pause. I cancel out of the meeting reminder window, the video still plays w/o sound and after a few seconds the video pauses. And then the video just goes away, (this last part may be an unreleated issue though).

I added a few trace statements in the code and I see that after receiving Event.DEACTIVATE, the video player does call "netstream.pause()"., but the video isn't paused immediately.

Another thing I noticed is that the video player is behaving like it is playing streaming videos instead of progressive downloaded videos. In other words, I can skip to any part of the video and the video will play immediately. I am not using streaming videos, so I assumed that this is just the behavior of iOS somehow. I add this fact in case it relates to why my video won't pause immediately when I tell it to when the application has lost focus.

thanks,

Jack

This topic has been closed for replies.

1 reply

Colin Holgate
Inspiring
April 19, 2012

I don't know the answer to your main question, but, it's normal for progressive download mp4 files to allow random access these days. At least the ones you make with QuickTime Player do work that way.

Inspiring
April 19, 2012

That's a pretty cool feature, Colin. Is there any documentation on this feature so I can learn more about it?

Colin Holgate
Inspiring
April 19, 2012

This is a Windows Media related article, but I'm sure the technique is basically the same:

http://blog.smarx.com/posts/smooth-streaming-with-windows-azure-blobs-and-cdn