fix: remove video element which was never inserted before

fixes #802
pull/803/head
Matthias Seemann 2023-05-25 20:41:26 +02:00 committed by GitHub
parent 0a952839c7
commit 76ec592865
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -700,7 +700,7 @@ export class Publisher extends StreamManager {
getVideoDimensions(): Promise<{ width: number; height: number }> {
return new Promise((resolve, reject) => {
// Ionic iOS and Safari iOS supposedly require the video element to actually exist inside the DOM
const requiresDomInsertion: boolean = platform.isIonicIos() || platform.isIOSWithSafari();
const requiresDomInsertion: boolean = (platform.isIonicIos() || platform.isIOSWithSafari()) && (this.videoReference.readyState < 1);
let loadedmetadataListener;
const resolveDimensions = () => {