I am playing videos from our web server and I’m using the MPMoviePlayerController to play it. It first, downloaded the file while simultaneously playing it.
I need to post a log back in our web server every time a video reaches the 10% mark while downloading the file. How would I know that the downloading of the file reaches 10%? By the way, I already got the file size and already computed the 10th percent of any file, All I want to know is when will I be able to know that it already downloaded 10% of the file? Thanks
Try it using the
playableDurationduration ofMPMoviePlayerController. When using this in conjunction with thedurationproperty, you should roughly get an idea if 10% of the entire download are reached.From the MPMoviePlayerController reference:
The amount of currently playable content. (read-only)
Example:
The following code could be run within a timer, triggered with a delay of 1 second on less, depending on the accuracy you actually need this functionality to have.