openvidu-browser: replace setAttribute('playsinline') with playsInline=true

pull/739/head
pabloFuente 2022-06-23 13:28:00 +02:00
parent 17ff9105aa
commit 556b3a0a2b
3 changed files with 4 additions and 4 deletions

View File

@ -217,7 +217,7 @@ export class LocalRecorder {
this.videoPreview.autoplay = true; this.videoPreview.autoplay = true;
if (platform.isSafariBrowser()) { if (platform.isSafariBrowser()) {
this.videoPreview.setAttribute('playsinline', 'true'); this.videoPreview.playsInline = true;
} }
if (typeof parentElement === 'string') { if (typeof parentElement === 'string') {

View File

@ -746,7 +746,7 @@ export class Publisher extends StreamManager {
this.videoReference.autoplay = true; this.videoReference.autoplay = true;
this.videoReference.controls = false; this.videoReference.controls = false;
if (platform.isSafariBrowser() || (platform.isIPhoneOrIPad() && (platform.isChromeMobileBrowser() || platform.isEdgeMobileBrowser() || platform.isOperaMobileBrowser() || platform.isFirefoxMobileBrowser()))) { if (platform.isSafariBrowser() || (platform.isIPhoneOrIPad() && (platform.isChromeMobileBrowser() || platform.isEdgeMobileBrowser() || platform.isOperaMobileBrowser() || platform.isFirefoxMobileBrowser()))) {
this.videoReference.setAttribute('playsinline', 'true'); this.videoReference.playsInline = true;
} }
this.stream.setMediaStream(mediaStream); this.stream.setMediaStream(mediaStream);
if (!!this.firstVideoElement) { if (!!this.firstVideoElement) {

View File

@ -127,7 +127,7 @@ export abstract class StreamManager extends EventDispatcher {
canplayListenerAdded: false canplayListenerAdded: false
}; };
if (platform.isSafariBrowser() || (platform.isIPhoneOrIPad() && (platform.isChromeMobileBrowser() || platform.isEdgeMobileBrowser() || platform.isOperaMobileBrowser() || platform.isFirefoxMobileBrowser()))) { if (platform.isSafariBrowser() || (platform.isIPhoneOrIPad() && (platform.isChromeMobileBrowser() || platform.isEdgeMobileBrowser() || platform.isOperaMobileBrowser() || platform.isFirefoxMobileBrowser()))) {
this.firstVideoElement.video.setAttribute('playsinline', 'true'); this.firstVideoElement.video.playsInline = true;
} }
this.targetElement = targEl; this.targetElement = targEl;
this.element = targEl; this.element = targEl;
@ -403,7 +403,7 @@ export abstract class StreamManager extends EventDispatcher {
video.controls = false; video.controls = false;
if (platform.isSafariBrowser() || (platform.isIPhoneOrIPad() && (platform.isChromeMobileBrowser() || platform.isEdgeMobileBrowser() || platform.isOperaMobileBrowser() || platform.isFirefoxMobileBrowser()))) { if (platform.isSafariBrowser() || (platform.isIPhoneOrIPad() && (platform.isChromeMobileBrowser() || platform.isEdgeMobileBrowser() || platform.isOperaMobileBrowser() || platform.isFirefoxMobileBrowser()))) {
video.setAttribute('playsinline', 'true'); video.playsInline = true;
} }
if (!video.id) { if (!video.id) {