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

How to use hdmi speaker as output when using usb-c to hdmi adaptor? #636

Open
MatthewVoyceGlobal opened this issue Nov 15, 2021 · 0 comments

Comments

@MatthewVoyceGlobal
Copy link

Before filing an issue please check that the issue is not already addressed by the following:

If this is an issue with the QuickStart itself, file it here. If this is an issue with the SDK or how to do something with the SDK please use twilio-video-ios instead.

Please ensure that you are not sharing any
Personally Identifiable Information(PII)
or sensitive account information (API keys, credentials, etc.) when reporting an issue.

Description

Here is use case, when I use adaptor connect iphone/ipad to hdmi monitor (with speaker), I want to force the audio sound out from the hdmi speaker. The playing ring tong comes from the hdmi speaker, but as long as the video room initialed all the sound come from the ipad/iphone speaker, I guess there is some overwrite when the sdk audio track initialed, so I search the twilio video document and try to overwrite the audio output devices, but the document seems like un finished, I put code into the block(The following code is what I am using).

            TVIConnectOptions *connectOptions = [TVIConnectOptions optionsWithToken:self.videoAccessToken
                                                                              block:^(TVIConnectOptionsBuilder * _Nonnull builder) {
                                builder.audioTracks = self.localAudioTrack ? @[ self.localAudioTrack ] : @[ ];
                builder.videoTracks = self.localVideoTrack ? @[ self.localVideoTrack ] : @[ ];               
                builder.roomName = roomName;
            }];
            TVIDefaultAudioDevice * defaultDevice =  [TVIDefaultAudioDevice audioDevice];
            defaultDevice.block =^ {
                kTVIDefaultAVAudioSessionConfigurationBlock();
                AVAudioSession * session = [AVAudioSession sharedInstance];
                [session setActive:YES error:nil];

                [session setMode:AVAudioSessionModeVoiceChat error:nil];
                [session setCategory:AVAudioSessionCategoryPlayAndRecord error:nil];
                [session overrideOutputAudioPort:AVAudioSessionPortOverrideNone error:nil];

            };
            dispatch_async(dispatch_get_main_queue(), ^{
                TwilioVideoSDK.audioDevice = defaultDevice;
                defaultDevice.block();
                _room = [TwilioVideoSDK connectWithOptions:connectOptions delegate:self];
                [self fetchConferenceInfo];
            });

And my question is
1 does twiliovideo sdk support change output device?
2 if question 1 is yes, how can I do that, any document or reference I can learn

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