MPMoviePlayerViewController not showing volume sli

2019-08-17 06:03发布

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条回答
混吃等死
2楼-- · 2019-08-17 06:39

You can use MPVolumeView object.

volume = [[MPVolumeView alloc] initWithFrame: rect];
[self addSubview:volume];
查看更多
登录 后发表回答