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];
}
精彩评论