[[UIDevice currentDevice] setProximityMonitoringEnabled:YES];

    AVAudioSession *audioSession = [AVAudioSession sharedInstance];

    

    //默认情况下扬声器播放

    [audioSession setCategory:AVAudioSessionCategoryPlayback withOptions:AVAudioSessionCategoryOptionMixWithOthers error:nil];

    

    [audioSession setActive:YES error:nil];

相关文章:

  • 2021-12-02
  • 2022-12-23
  • 2022-12-23
  • 2021-12-02
  • 2022-12-23
  • 2021-11-25
  • 2021-04-23
猜你喜欢
  • 2021-08-06
  • 2022-12-23
  • 2021-12-05
  • 2022-12-23
  • 2021-08-16
  • 2022-12-23
  • 2021-06-02
相关资源
相似解决方案