开发者

Volume bar is in 0 position , but there is sound when start playing http streaming video of iphone

Wh开发者_运维百科en we start play streaming video via url via mpmovieplayer , wolume bar is in 0 position , but there is sound when start playing http streaming video . Pls advice us how to solve this . Thanks !


You can set and change volume using this way.

UISlider *slider_volumeControl=[[UISlider alloc] init];
slider_volumeControl.minimumValue=0;
slider_volumeControl.maximumValue=1;
[slider_volumeControl setValue:0];
[[MPMusicPlayerController applicationMusicPlayer] setVolume:self.slider_volumeControl.value];

Write method like this for slider value change event

-(IBAction)changeVolumeOnSliderValueChange:(id)sender
{
[[MPMusicPlayerController applicationMusicPlayer] setVolume:self.slider_volumeControl.value];
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜