Skip to content

Commit f2df105

Browse files
authored
Merge pull request #2587 from crazyserver/MOBILE-3543
Mobile 3543
2 parents 08b3dc4 + d2c7ee4 commit f2df105

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,14 +261,19 @@
261261
}
262262
],
263263
"compression": "maximum",
264-
"electronVersion": "4.2.5",
264+
"electronVersion": "8.0.2",
265265
"mac": {
266266
"category": "public.app-category.education",
267267
"icon": "resources/desktop/icon.icns",
268268
"target": "mas",
269269
"bundleVersion": "3.9.3",
270270
"extendInfo": {
271-
"ElectronTeamID": "2NU57U5PAW"
271+
"ElectronTeamID": "2NU57U5PAW",
272+
"NSLocationWhenInUseUsageDescription": "We need your location so you can attach it as part of your submissions.",
273+
"NSLocationAlwaysUsageDescription": "We need your location so you can attach it as part of your submissions.",
274+
"NSCameraUsageDescription": "We need camera access to take pictures so you can attach them as part of your submissions.",
275+
"NSMicrophoneUsageDescription": "We need microphone access to record sounds so you can attach them as part of your submissions.",
276+
"NSPhotoLibraryUsageDescription": "We need photo library access to get pictures from there so you can attach them as part of your submissions."
272277
}
273278
},
274279
"win": {

src/core/emulator/pages/capture-media/capture-media.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,13 @@ export class CoreEmulatorCaptureMediaPage implements OnInit, OnDestroy {
192192
};
193193

194194
// Set the stream as the source of the video.
195-
this.streamVideo.nativeElement.src = window.URL.createObjectURL(this.localMediaStream);
195+
if ('srcObject' in this.streamVideo.nativeElement) {
196+
this.streamVideo.nativeElement.srcObject = this.localMediaStream;
197+
} else {
198+
// Fallback for old browsers.
199+
// See https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/srcObject#Examples
200+
this.streamVideo.nativeElement.src = window.URL.createObjectURL(this.localMediaStream);
201+
}
196202

197203
// If stream isn't ready in a while, show error.
198204
waitTimeout = setTimeout(() => {

0 commit comments

Comments
 (0)