ios - Reducing the initial delay when playing remote video content -
hi using mpmovieplayercontroller stream video app. however, takes long time load , want able pre-buffer video. suggestions?
use
[mpmovieplayercontrollerinstance preparetoplay]
know user might start playback of movie. might want setmpmovieplayecontroller.autoplay
fits best, depending on application.from apple's documentation;
this method called automatically when call play method. calling before call play gives receiver chance prepare items sooner , may result in decreased latency when starting playback. however, calling method may interrupt active audio sessions.
make sure http stream contains low bandwidth alternative using less 64kbps (audio , video combined). note
mpmovieplayercontroller
starts buffering low rate playback index profile before raising bar , attempting load higher bandwidth profiles. prepared play once has few seconds worth of movie data.use
mpmovieplayercontroller.moviesourcetype
property when initializing player cut down media recognition delay.from mpmovieplayercontroller class reference:
the default value of property mpmoviesourcetypeunknown. property provides clue playback system how should download , buffer movie content. if know source type of movie, setting value of property before playback begins can improve load times movie content. if not set source type explicitly before playback, movie player controller must gather information, might delay playback.
Comments
Post a Comment