ios - Adjust Quality while streaming video with AVPlayer -
how can able set low or high quality video withstreaming video avplayer?
my code follow:
self.videoplayeritem = [avplayeritem playeritemwithurl:videourl]; videoplayer = [avplayer playerwithplayeritem:self.videoplayeritem]; videoplayer.actionatitemend = avplayeractionatitemendnone; cgrect frame = self.frame; videoplayerlayer = [avplayerlayer layer]; [videoplayerlayer setplayer:videoplayer]; [videoplayerlayer setvideogravity:avlayervideogravityresizeaspectfill];
thanks time
you can lower video quality/bitrate setting avplayeritem
's preferredpeakbitrate.
re-set 0 usual "highest quality/bitrate supported connection" behaviour.
n.b. bitrate less or equal preferredpeakbitrate
must available work, e.g. in hls stream.
Comments
Post a Comment