nativescript-audio icon indicating copy to clipboard operation
nativescript-audio copied to clipboard

IOS App crash if there is no audio

Open HunterJS-bit opened this issue 7 years ago • 6 comments

Hello guys I have issue on my iphone, also this is happening with your demo app you can test If I try to play some audio from url, and that url is invalid or doesnt contain audio File app will crash Sample code:

var playerOptions = {
		audioFile: 'test.com' + "record/get/" + 'samplesong.mp3',
		loop: false,
		completeCallback: function () {
			console.log('finished playing')
		},
		errorCallback: function (errorObject) {
			console.log(JSON.stringify(errorObject));
		},
		infoCallback: function (args) {
			console.log(JSON.stringify(args));
		}
	};

	player.playFromUrl(playerOptions)
		.then(function (res) {
			console.log(res);
		})
		.catch(function () {
			console.log("something went wrong...");
		})

HunterJS-bit avatar Feb 08 '18 14:02 HunterJS-bit

Anybody ????

HunterJS-bit avatar Feb 09 '18 08:02 HunterJS-bit

Does it get to the catch or you mean it actually crashes the app?

bradmartin avatar Feb 12 '18 17:02 bradmartin

I can't reproduce this on the simulator, are you on a sim or device, what iOS version, etc? Thanks

bradmartin avatar Feb 12 '18 17:02 bradmartin

IPhone 8, IOS11 :) It doesnt go to catch block it just crashes whole app.

HunterJS-bit avatar Feb 12 '18 21:02 HunterJS-bit

Were you able to reproduce it ?????

HunterJS-bit avatar Feb 19 '18 13:02 HunterJS-bit

Haven't had any time to look into this right now. Sorry. You can try the slack channel for NS if you need some help faster or the NS forums are really awesome. Tons of helpful developers, I'm just short on time right now.

bradmartin avatar Feb 22 '18 14:02 bradmartin