You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current code for iOS, I think, doesn't cover some cases for wired headphones
So I have some BT headphones that I can also connect via an cable and adapter to a lightning port; I believe if you check for line-in you will pick up some more use cases ,but these of course, aren't guaranteed to be headphones per se. Below is a code snippet that you could use to adjust the existing code for this if you wanted. - thank you Apple for the confusion.
if ([[port portType] isEqualToString:AVAudioSessionPortHeadphones] ||
[[port portType] isEqualToString:AVAudioSessionPortAudioUSB] || // strictly speaking not headphones, but might be
[[port portType] isEqualToString:AVAudioSessionPortBluetoothA2DP] ||
[[port portType] isEqualToString:AVAudioSessionPortBluetoothHFP] ||
[[port portType] isEqualToString:AVAudioSessionPortBluetoothLE]) {
returnYES;
}
}
returnNO;
The text was updated successfully, but these errors were encountered:
Hi there! If you proposed a PR we could merge it. Note the code you mention needs a modification is now duplicated, so there's two spots to add the different bluetooth profiles
]
Summary
The current code for iOS, I think, doesn't cover some cases for wired headphones
So I have some BT headphones that I can also connect via an cable and adapter to a lightning port; I believe if you check for line-in you will pick up some more use cases ,but these of course, aren't guaranteed to be headphones per se. Below is a code snippet that you could use to adjust the existing code for this if you wanted. - thank you Apple for the confusion.
The text was updated successfully, but these errors were encountered: