I have Samsung Galaxy S5. Is there a way to lock the screen but keep YouTube videos playing?
For example, a particular browser app or add-on that would allow for the audio to continue playing while the screen is off.
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It only takes a minute to sign up.
Sign up to join this communityI have Samsung Galaxy S5. Is there a way to lock the screen but keep YouTube videos playing?
For example, a particular browser app or add-on that would allow for the audio to continue playing while the screen is off.
Update #1
Only For Rooted: You can install Xposed Modules Installer and use Repository called Youtube Background Play
Update #2
As suggested by @Tanishq Banyal in comment YouTube Vanced is pretty good alternative if you are open to installing 3rd party application/mod.
It works for both rooted and non-rooted Android.
Using Youtube Vanced Manager is pretty straightforward, in case your mobile is not rooted you are required to install Micro G along with main application.
Along with background play you can also block ads in Vanced.
The newest workaround doesn't require any new apps to be installed.
Follow these directions:
This works without any fault as long as you keep the video playing. I played single videos for up to two hours without an issue. I noticed the following issues, which affect when I'll use this workaround:
If you pause the video from the notification, you will be able to play it again, but not if you leave it paused for too long. I didn't time it, but the notification control disappears in less than 30 minutes. You'd have to then open Chrome again and replay the video. The same is true if you pause the video with a blue tooth control.
If the video buffers because of a loss of connection, it will start again automatically, but only if it doesn't buffer for too long. Again, I did not time it, but I had issues after only a few minutes of lost connection, but that could have been related to item 3 below.
Switching from wifi to data or data to wifi connection often created a buffer issue. It always seems to auto play after a few seconds when going from wifi to data, but not when going from data to wifi. Data to wifi would take longer and sometimes not autoplay at all. I think this is because when the phone establishes the wifi connection, there's a delay in the ping back that lets apps know that connection has been reestablished. I noticed multiple times that autoplay would work within seconds of unlocking the screen.
After a video's end, autoplay doesn't always work. I found no pattern for when it would work.
On long videos that you might listen to parts of over several days, in addition to having to start the video from Chrome again between every break longer than an hour, you may also have to scrub to the time where you left off. Multiple times, it seemed Chrome would decide to reload the tab, making the video reload to the beginning. It seems to be more reliable if I leave Chrome open (but in the background), but it still occasionally reloads the tab. If you're fast enough, you can read your time as you open the tab before it reloads, making this only a simple nuisance.
I've been listening to a lecture series in a playlist this last week and these are the issues I've noticed. In light of the trouble I've had, I think I'll just download the MP3 from now on, but I'll use this hack method if there's just a single video that piques my interest in the moment. In other words, I recommend that if you have the time and desire to listen to a playlist, it's just easier to go through the steps to download the MP3.