开发者

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

开发者 https://www.devze.com 2022-12-14 03:55 出处:网络
Wh开发者_运维百科en we start play streaming video via url via mpmovieplayer , wolume bar is in 0 position , but there is sound when startplaying http streaming video .

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

精彩评论

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