Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS - Play next track while device is locked #31

Open
alexweinstein opened this issue Jun 18, 2019 · 1 comment
Open

iOS - Play next track while device is locked #31

alexweinstein opened this issue Jun 18, 2019 · 1 comment

Comments

@alexweinstein
Copy link

alexweinstein commented Jun 18, 2019

Not sure if this is new behavior or I just never paid attention.

I'm using the latest soundcloud-audio.js version (1.4.0) on an iPhone X with the most recent OS. If a user chooses a track it will play normally. When the song is completed, the next track in a list is played. However, when the device is locked or has gone to sleep, it simply stops at the end of the selected track.

Here's what I'm using:

function playTrack(track-identifier-example){
	global.currentSoundObject.play({
    		streamUrl: track-identifier-example_stream_url
	});

	global.currentSoundObject.on('ended', function() {
		playTrack(next-track-identifier-example);
	});
}

Anyone else seeing this behavior? Should I be triggering the next track in a different way or is this a bug?

@voronianski
Copy link
Owner

Hi @alexweinstein, thanks for letting me know, I will check if it's a bug in the lib or OS related 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants