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

Getting Cannot read property 'appendChild' of null on switchDevice method call #87

Open
kush3107 opened this issue May 4, 2020 · 2 comments

Comments

@kush3107
Copy link

kush3107 commented May 4, 2020

I am trying to switch the input device for the current local stream. I am on sdk version 3.0.2 but when I try to do so I get the error in the attached screenshot. I followed this link

This link clearly says that I just need to call this method above version 2.5.0
I have attached the console error

Screenshot 2020-05-03 at 11 08 22 PM

@kush3107
Copy link
Author

kush3107 commented May 4, 2020

switchDevice(type: 'audio' | 'video', deviceId: string): Promise<void> {
        console.log(type, deviceId);
        this._currentStream?.stop();
        
        return new Promise((resolve, reject) => {
            // @ts-ignore
            this._currentStream?.getAudioTrack().stop();
            this._currentStream!.switchDevice(type, deviceId, () => {
                resolve();
            }, reject);
        });
    }

@plutoless
Copy link
Contributor

the error usually means you are trying to play a dom but that dom does not exist. could you pls check all you play api call

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

2 participants