Reputation: 81
I have a problem with player on IOS. I use VMediaPlayer (Vitamio) to play mp4 file and HLS stream. On ios 10 and lower works fine, but in ios 11 I haven't video, only sound.
This is my code:
if (!mMPlayer) {
mMPlayer = [VMediaPlayer sharedInstance];
[mMPlayer setupPlayerWithCarrierView:self.videoCanvas withDelegate:self];
[mMPlayer setBufferSize:512*1024];
[mMPlayer setVideoQuality:VMVideoQualityHigh];
[mMPlayer setVolume:1.0f];
}
NSURL *videoURL = [ [ NSURL alloc ] initWithString: self.videoURL ];
[mMPlayer setDataSource:videoURL header:nil];
NSArray *key = @[@"-rtmp_live"];
NSArray *val = @[@"-1"];
[mMPlayer setOptionsWithKeys:key withValues:val];
[mMPlayer prepareAsync];
[player start];
Upvotes: 0
Views: 119
Reputation: 1
You can use this workaround.
mMPlayer.setVideoShown(false)
mMPlayer.setVideoShown(true)
Upvotes: 0
Reputation: 3228
There is an issue on GitHub about your exact problem:
https://github.com/yixia/Vitamio-iOS/issues/58
and no solution so far, one user suggesting switch to another player like ijkplayer
Upvotes: 0