问题
I am playing the video from the url:
MPMoviePlayerViewController *m = [[MPMoviePlayerViewController alloc] initWithContentURL:url];
if([m.moviePlayer respondsToSelector:@selector(setAllowsAirPlay:)])
m.moviePlayer.allowsAirPlay = YES;
[self presentMoviePlayerViewControllerAnimated:m];
It is playing, but there is no volume control slider. Is it possible to add volume control?
回答1:
You can use MPVolumeView object.
volume = [[MPVolumeView alloc] initWithFrame: rect];
[self addSubview:volume];
来源:https://stackoverflow.com/questions/9870907/mpmovieplayerviewcontroller-not-showing-volume-slider