From d1b1c68e0e82853106e73d4a4442e1bc9a1517ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Mon, 26 Oct 2020 14:39:38 +0100 Subject: [PATCH 1/2] MOBILE-3543 emulator: Use new HTMLMediaElement when capturing --- src/core/emulator/pages/capture-media/capture-media.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/core/emulator/pages/capture-media/capture-media.ts b/src/core/emulator/pages/capture-media/capture-media.ts index 42324569a..0bf1c5912 100644 --- a/src/core/emulator/pages/capture-media/capture-media.ts +++ b/src/core/emulator/pages/capture-media/capture-media.ts @@ -192,7 +192,13 @@ export class CoreEmulatorCaptureMediaPage implements OnInit, OnDestroy { }; // Set the stream as the source of the video. - this.streamVideo.nativeElement.src = window.URL.createObjectURL(this.localMediaStream); + if ('srcObject' in this.streamVideo.nativeElement) { + this.streamVideo.nativeElement.srcObject = this.localMediaStream; + } else { + // Fallback for old browsers. + // See https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/srcObject#Examples + this.streamVideo.nativeElement.src = window.URL.createObjectURL(this.localMediaStream); + } // If stream isn't ready in a while, show error. waitTimeout = setTimeout(() => { From d2c7ee4b39beb0993ad47a77e4f75b866fa56686 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Mon, 26 Oct 2020 14:40:00 +0100 Subject: [PATCH 2/2] MOBILE-3543 electron: Update electron to 8.0.2 --- package.json | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index a2049cb93..a4f73ed0d 100644 --- a/package.json +++ b/package.json @@ -261,14 +261,19 @@ } ], "compression": "maximum", - "electronVersion": "4.2.5", + "electronVersion": "8.0.2", "mac": { "category": "public.app-category.education", "icon": "resources/desktop/icon.icns", "target": "mas", "bundleVersion": "3.9.3", "extendInfo": { - "ElectronTeamID": "2NU57U5PAW" + "ElectronTeamID": "2NU57U5PAW", + "NSLocationWhenInUseUsageDescription": "We need your location so you can attach it as part of your submissions.", + "NSLocationAlwaysUsageDescription": "We need your location so you can attach it as part of your submissions.", + "NSCameraUsageDescription": "We need camera access to take pictures so you can attach them as part of your submissions.", + "NSMicrophoneUsageDescription": "We need microphone access to record sounds so you can attach them as part of your submissions.", + "NSPhotoLibraryUsageDescription": "We need photo library access to get pictures from there so you can attach them as part of your submissions." } }, "win": {