Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26530] iOS: App requests microphone permissions when playing video on macOS Mojave iOS 12 Simulator

GitHub Issuen/a
TypeBug
PriorityNone
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterChristopher Williams
AssigneeJan Vennemann
Created2018-11-07T19:39:05.000+0000
Updated2018-11-07T19:39:32.000+0000

Description

This is an odd one seen on our unit tests after we upgraded to macOS Mojave. The unit test app's Ti.Media.VideoPlayer tests would pop up prompts for microphone permissions, specifically for the tests that actually played a video. I can reproduce locally, but once the prompt appears I have to choose to approve or deny, and then after that I cannot reproduce. When it did appear, I passed the debugger in Xcode and it pointed at this code: https://github.com/appcelerator/titanium_mobile/blob/master/iphone/Classes/TiMediaVideoPlayerProxy.m#L969 The test case is:
var win = Ti.UI.createWindow({
	backgroundColor: 'white'
});
var nav = Ti.UI.iOS.createNavigationWindow({
	window: win
});

win.addEventListener('focus', openWindow);

nav.open();

function openWindow() {
	var detailWindow,
		videoPlayer;
	win.removeEventListener('focus', openWindow);
	detailWindow = Ti.UI.createWindow({
		backgroundColor: 'black'
	});

	videoPlayer = Ti.Media.createVideoPlayer({
		url: 'https://www.w3schools.com/html/mov_bbb.mp4',
		autoplay: true,
		backgroundColor: 'blue',
		height: 300,
		width: 300,
		mediaControlStyle: Ti.Media.VIDEO_CONTROL_NONE,
		scalingMode: Ti.Media.VIDEO_SCALING_ASPECT_FILL,
		repeatMode: Ti.Media.VIDEO_REPEAT_MODE_ONE,
		showsControls: false
	});

	detailWindow.addEventListener('open', function () {
		setTimeout(function () {
			detailWindow.close();
		}, 2000);
	});

	detailWindow.addEventListener('close', function () {
		setTimeout(function () {
			nav.close();
			Ti.API.info('DONE!!!');
		}, 2000);
	});

	detailWindow.add(videoPlayer);
	nav.openWindow(detailWindow);
}

Comments

  1. Christopher Williams 2018-11-07

    Note the similar issue mentioned here: https://github.com/insidegui/WWDC/issues/445

JSON Source