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": { 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(() => {