MPMoviePlayerViewController not showing volume slider?

喜欢而已 提交于 2019-12-25 05:10:08

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!