MPMoviePlayerViewController没有显示音量滑块? [英] MPMoviePlayerViewController not showing volume slider?

查看:78
本文介绍了MPMoviePlayerViewController没有显示音量滑块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在播放网址中的视频:

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?

推荐答案

您可以使用MPVolumeView对象.

You can use MPVolumeView object.

volume = [[MPVolumeView alloc] initWithFrame: rect];
[self addSubview:volume];

这篇关于MPMoviePlayerViewController没有显示音量滑块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆