简体   繁体   English

iOS应用程序-启用蓝牙音频

[英]IOS app - bluetooth audio enabling

I'm working on an IOS 6 app that's currently in development. 我正在开发当前正在开发的IOS 6应用程序。 The app has about 5-6 snippets of audio that play at various stages, currently when the device is paired with some bluetooth speakers (eg in a car) the audio does not play through the speakers. 该应用程序有大约5-6个音频片段,可以在各个阶段播放,目前,当设备与某些蓝牙扬声器配对时(例如在汽车中),音频无法通过扬声器播放。

Does anyone know what's involved with making this app work with paired bluetooth speakers? 有谁知道与配对的蓝牙扬声器一起使用使该应用程序涉及什么? My initial assumption was that it wouldn't need anything extra done, it would just work. 我最初的假设是,它不需要做任何额外的事情,就可以了。 I had thought bluetooth paired speakers worked like as if you'd plugged in speakers directly into the device, all audio was routed through the speakers as long as they were paired. 我以为蓝牙配对扬声器的工作方式就像您将扬声器直接插入设备一样,只要配对,所有音频都会通过扬声器传递。

This doesn't appear to be the case though. 事实并非如此。

I think you have to place an MPVolumeView somewhere in your interface, and enable the showsRouteButton property, then users can use that button to change the audio route to Bluetooth. 我认为您必须将MPVolumeView放置在界面中的某个位置,并启用showsRouteButton属性,然后用户才能使用该按钮将音频路由更改为蓝牙。 You can also disable the showsVolumeSlider property if you don't need the volume slider. 如果不需要音量滑块,也可以禁用showsVolumeSlider属性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM