Skip to content
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

Change WKYTPlayerView output to speaker in Swift? #32

Open
ArunVicky001 opened this issue Jan 18, 2023 · 0 comments
Open

Change WKYTPlayerView output to speaker in Swift? #32

ArunVicky001 opened this issue Jan 18, 2023 · 0 comments

Comments

@ArunVicky001
Copy link

I am currently facing some issues with my application, I am trying to stream youtube videos in iOS 16.1 using WKYTPlayerView.
here the player audio is not output to the speaker in Swift.

but previously it was working well.

I have tried the below code but it's not working

let audioSession = AVAudioSession.sharedInstance()

    do {
        try audioSession.setCategory(AVAudioSession.Category.playAndRecord, mode: AVAudioSession.Mode.voiceChat, options: AVAudioSession.CategoryOptions.mixWithOthers)
        try audioSession.overrideOutputAudioPort(.none)
        try audioSession.setActive(true)
    } catch {
        debugPrint(error.localizedDescription)
    }

can anyone please suggest something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant