-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No audio coming from the car for CarPlay when playing audio tracks #2255
Comments
FYI I do not have this issue. I'm not setting |
@uzegonemad What are you setting for However, our app has both audio and video content which led me create this PR because I need to switch the |
@watadarkstar I'm not currently setting There are certain category modes that are incompatible with CarPlay by design, so it makes sense that VideoRecording wouldn't work but SpokenAudio would. |
For anyone who runs into this issue. To get Carplay working I had to do the following: await TrackPlayer.setupPlayer({
// Important: CarPlay works with IOSCategory.Playback.
iosCategory: IOSCategory.Playback,
// We must set this to the empty array, otherwise the player will
// only play audio in airplane mode. AND it breaks lock screen controls if its not
// the empty array.
// https://react-native-track-player.js.org/docs/api/constants/ios-category-options#allowairplay
iosCategoryOptions: [],
// We must set this to SpokenAudio for lock screen controls to work with
// IOSCategory.Playback.
iosCategoryMode: IOSCategoryMode.SpokenAudio,
}) The combination of these Additionally, this library does not show the lock screen controls if you set: iosCategory: IOSCategory.Playback,
iosCategoryOptions: [IOSCategoryOptions.AllowAirPlay], Because
Found here: https://developer.apple.com/documentation/avfaudio/avaudiosession/categoryoptions/1771736-allowairplay This library should probably throw a warning or error if you try to set iosCategory: IOSCategory.Playback, |
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
This issue was closed because it has been stalled for 7 days with no activity. |
Describe the Bug
I'm currently playing audio using track player but the audio does not play via the car speakers. Audio comes from the phone instead.
Steps To Reproduce
Code To Reproduce
Please provide a simple code example that allows others to replicate the bug.
I'm using
mp3
files locally and via a url. Same issue.Replicable on Example App?
Can you replicate this bug in the React Native Track Player Example App?
TBD
Environment Info:
Paste the results of
npx react-native info
Paste the exact
react-native-track-player
version you are usingReal device? Or simulator?
Real device. iOS iPhone 12 mini
What OS are you running?
Mac OSX
The text was updated successfully, but these errors were encountered: