[Q] The best way to stream music from youtube in background on any android device - Android Q&A, Help & Troubleshooting

Hi,
I have been a silent reader/observer of xda forums for a long time now and I thank everyone of the awesome developers out there for giving such good ROMs.
I've been meaning to ask this question for a long time but I was delaying it hoping I can get an answer for it myself. But today after spending close to 5 hrs on this with no answer I decided to ask it here.
I'm a music fan and I'd like to listen to it on my phone as well. I have an HTC One XL with the latest Viper ROM.
I have tried the following options.
1. Downloaded numerous apps (PVStar, NextVid and the likes). Some worked but not to my satisfaction. They're either very laggy or buggy or have unattractive UI to use.
2. Visited sites like youtify.com and tried on various browsers. (Chrome, firefox, UC, Dolphin, Opera etc.) hoping it won't stop playing audio when switched to another app or screen locked. On chrome and all the others it just stops playing audio when you switch to another app. On firefox it works but when screen is locked, audio becomes choppy (app's priority gets lower I think slowly). I tried to search for apps which can keep an app's priority higher but in no vain.
3. I also tried to find alternatives to Youtube like grooveshark app but it just keeps crashing whenever other apps are launched. I also tried Radio apps like TuneIn radio or pandora but you can't search for specific songs there.
P.S: Also some YouTube videos are specifically blocked by Google itself to not stream it to other apps/sites I think. How can we avoid this?
So, basically my problem is I need to be able to search and stream Youtube videos (Preferably have my own saved playlists) on my android phone while the screen is locked or in background while accessing other apps. (I know google is trying to bring 'play in background' feature to YouTube app itself but we can't create playlists there if I'm not wrong). Please suggest me a solution.
Thanks.

http://www.makeuseof.com/tag/play-youtube-videos-background-even-screen/
or
http://forum.xda-developers.com/showthread.php?t=2213945

es0tericcha0s said:
http://www.makeuseof.com/tag/play-youtube-videos-background-even-screen/
or
http://forum.xda-developers.com/showthread.php?t=2213945
Click to expand...
Click to collapse
Thanks for a lot for the links. Tried both but the first one (Viral) is not so stable. It crashes often and a pain to use. However the second option (Modded youtube APK) seems to be the best option. I can have my own playlists saved in my youtube account and play them using this modded youtube app. The music will continue to play even when screen is locked but the app must be in the foreground. The moment you switch to another app or press home button or even pressing "back" within youtube, it stops.
It's a solution I can live with for now, but I would love to have something which can run even when in background. Suggestions welcome.
Thanks.

[BUMP] Any youtube modded APK?
Trying to bump up this as I wasn't able to find a modded youtube APK which can continue to run in background (i.e. even after pressing home button and accessing other apps). Right now the modded APK only allows screen to be locked but the app should remain in foreground.
And the youtube APK also doesn't play all files in playlist. It plays just one file that we select and stops after that even though there are other items in the playlist.

Related

Can we hack Flash player to work in the background?

Hello all,
As maybe some know, Adobe's Flash player in Android has a feature. The object doesn't activate if it is not in focus (or maybe touched?). This seems to be a security or battery performance related improvement as Adobe puts it.. However, it is really annoying.. Because;
You can't listen to most of the radio stations, or playlists even, if you send them to background. I love to listen to some of my favorite music while reading the daily news.. As many other have pointed out in the following threads:
Thread ID: 854896, 672639, 543354, 489142
I am writing this question here, as this is an Android Flash player implementation issue and this behaviour is by design. There may be many ways to modify the Flash player, or modify the browser to make the Flash Player act as if it is in the foreground even if it is not..
So can anyone work on this? Or maybe we can submit some kind of CR to CyanogenMod issue list? Better yet, how can we submit this problem to Adobe's developers/designers?
Or maybe a hacker has already read this and has solved it already
Thanks a lot..
Maybe this works on other (Sense?) phones, but I know this worked on my 3.29 stock rooted Evo. In the browser you can hit menu > windows and then open a new window, and then close the new window. Now you will still be in the windows view, but are "hovering" above the window you have your Flash content in. Now you should be able to hit the home button and do other things.
I would suggest just using a real music player/radio app.....
deathsled said:
I would suggest just using a real music player/radio app.....
Click to expand...
Click to collapse
x2... I think most, (if not all) standalone music/radio apps will run happily along in the background.
mik101 said:
x2... I think most, (if not all) standalone music/radio apps will run happily along in the background.
Click to expand...
Click to collapse
True, but most (if not all) standalone music/radio apps won't play arbitrary flash content online.
I know somebody who likes to listen to a particular TV program, and typically networks only make these available via flash. I'm sure if he works at it he can extract the audio on a computer or find it on a torrent or something, but it would be nice if this were at least an option.
Of course, compared to a normal app I imagine it would suck down a lot more power.
I've found a way to have a Flash webpage running on the background without needing to hack Flash Player on ICS. I stumbled across an unadvertised "feature" of the Dual Screen Browser app by Curry Cat v2.1.
All you have to do is launch the Dual Screen browser, do a google search for the flash web page you want, and once the audio starts playing just hit the OS Home button and the audio keeps playing in the background. It blew my mind.
The device I got this working on is a stock ASUS Transformer TF101 w/ ICS (v4.0.3)
Dual Screen Browser has a bunch of FC and seems to be heavily reliant on the stock browser some how. If you get FC when trying to launch it try the following:
Open stock Browser, press OS Home button, then relaunch Dual Screen Browser
Turn internet connection off, then relaunch Dual Screen Browser
Dual Screen Browser appears to be better optimized for flash/html5 video playback in portrait mode. I had two flash videos playing at the same time on each screen without much of a performance hit.
When in landscape mode pick the left most screen. It plays movies better without cutting off part of it.
Questions or Problems Should Not Be Posted in the Development Forum
Please Post in the Correct Forums & Read the Forum Rules
Moving to Q&A
loganss said:
I've found a way to have a Flash webpage running on the background without needing to hack Flash Player on ICS. I stumbled across an unadvertised "feature" of the Dual Screen Browser app by Curry Cat v2.1.
All you have to do is launch the Dual Screen browser, do a google search for the flash web page you want, and once the audio starts playing just hit the OS Home button and the audio keeps playing in the background. It blew my mind.
The device I got this working on is a stock ASUS Transformer TF101 w/ ICS (v4.0.3)
Dual Screen Browser has a bunch of FC and seems to be heavily reliant on the stock browser some how. If you get FC when trying to launch it try the following:
Open stock Browser, press OS Home button, then relaunch Dual Screen Browser
Turn internet connection off, then relaunch Dual Screen Browser
Dual Screen Browser appears to be better optimized for flash/html5 video playback in portrait mode. I had two flash videos playing at the same time on each screen without much of a performance hit.
When in landscape mode pick the left most screen. It plays movies better without cutting off part of it.
Click to expand...
Click to collapse
Wow, I even forgot that I asked this question. But your solution seems very promising. Well, I'd still like to see HTML5 work in the background to (for the obvious reason that I want to play a youtube playlist while screen off ) Well if I'd have to install a separate app, I think there are other players that does this already.
Thanks anyways.. (Sorry for the late response)
I am using "nextvid" to play youtube videos on the backgroud, no need for hacking it does it by default( free app)
https://play.google.com/store/apps/details?id=Nextvid.mobile.player&hl=pt_PT

[Q] youtube: problem with multitasking

seriously, and i mean it.. did you guys have trouble multitasking with youtube?
When you buffer anything inside youtube, and you switch to ANY other app for example browser or calendar or whatever, all the buffer you have done, will gone back to zero !! Wtf!
How stupid this is?? And i wonder why nobody has ever noticed this and complained about it somewhere over the net.
Yes, I have even basic problem with youtube. When I switch to another app, why does the video stop playing? Sometimes, I am only interested in the audio!
Osho
Hi, I'm having same prob and I don't think we can do anything to it ;/
Sent from my GT-I9003 using XDA App
oshogg said:
Yes, I have even basic problem with youtube. When I switch to another app, why does the video stop playing? Sometimes, I am only interested in the audio!
Osho
Click to expand...
Click to collapse
you mean the video stops playing but audio still play? I dont think so
denis_sianto said:
you mean the video stops playing but audio still play? I dont think so
Click to expand...
Click to collapse
No, the video can continue to play but in the background. For example, on a PC, if I have youtube video playing in a browser tab, and I switch to another browser tab - the video continues to play back. So, I can at least listen to audio (which is useful for music videos).
Thanks,
Osho
I have this problem and it annoys me, as I have very slow internet,so last thing I need is for it to restart again.
Sent from my GT-P1000 using XDA Premium App
oshogg said:
No, the video can continue to play but in the background. For example, on a PC, if I have youtube video playing in a browser tab, and I switch to another browser tab - the video continues to play back. So, I can at least listen to audio (which is useful for music videos).
Thanks,
Osho
Click to expand...
Click to collapse
Yea, i know that if in pc, you switch to another tab, youtube would still continue buffering. But this did not happen in tab's youtube. If I buffer any video, and then i switched to browser, then switch back again to youtube, all the buffers would have gone to zero.
Are you 100% sure you dont have this problem with your stock youtube app?
vauxhallastra said:
I have this problem and it annoys me, as I have very slow internet,so last thing I need is for it to restart again.
Sent from my GT-P1000 using XDA Premium App
Click to expand...
Click to collapse
Are you talking about p1000 or the new gt with honeycomb?
Don't be fooled into thinking that Android's multitasking is that much more robust than iOS. When you move away from an app, the system sleeps the VM that it is running in to devote clock cycles and memory to your current working application. The only way an app can continue to persist alive in the background is to specifically request to remain alive and working on something with background processes. The YouTube app doesn't do this, so when you move away from it the application sleeps.
The only advantage Android has over iOS in terms of multitasking is the easy ability for an app to run background processes if it so chooses. Fortunately no sane app developer is going to write an app that tries to stay completely active in a non-windowing OS.
sassafras
sassafras_ said:
Don't be fooled into thinking that Android's multitasking is that much more robust than iOS. When you move away from an app, the system sleeps the VM that it is running in to devote clock cycles and memory to your current working application. The only way an app can continue to persist alive in the background is to specifically request to remain alive and working on something with background processes. The YouTube app doesn't do this, so when you move away from it the application sleeps.
The only advantage Android has over iOS in terms of multitasking is the easy ability for an app to run background processes if it so chooses. Fortunately no sane app developer is going to write an app that tries to stay completely active in a non-windowing OS.
sassafras
Click to expand...
Click to collapse
Okay, i know it make sense to not write an app that tries to stay completely active in background. But wouldnt it make sense for an app such as youtube that needs a lot of buffer (since not all country in the world have fast mobile connection), to be partially active in background, such as the buffering ability?
I think that make sense! And i still wonder why wouldnt honeycomb developer realize this .
Sent from my GT-P7500 using XDA App
Be careful, Playbook owners might start feeling smug about their device if they see things like this
Sent from my GT-I9100 using XDA App
I would also like Youtube to be able to play in the background, just like on a PC. Why not? It can't be too hard to programme either.
Swedish national radio, Sveriges Radio, has a good app that allows you to listen to all their programmes and the app runs smoothly in the background while I surf or do other stuff on the tablet. You'll find it at Google Play (former Market) if you're interested.
An other thing that Youtube on Android does not do is to run playlists. Again, why not?
I can't really see the point in removing great features when you develop a new OS. The goal can't really be to make it worse compared to the PC, can it?
labovski said:
An other thing that Youtube on Android does not do is to run playlists. Again, why not?
If your mostly worried about the playlist feature, it works when running stock browser and you are signed in. All you have to do is tap on the bottom-right corner of the video's preveiw image, afterr tapping, the little '+' shows up
Sent from my GT-P7500R using XDA
Click to expand...
Click to collapse
A solution would be using OverSkreen (Browser) and just open youtube in a small window.

problems with youtube app

Hi guys.I am running task and phantoms extreme stock rom which is pretty much just normal honeycomb 3.1 without touchwiz. The YouTube app that came with it is v3.1.1.
Its causing me a couple of problems. Firstly, not all videos which appear on YouTube using the browser appear on the app. Example I can watch the official video of a song called black and yellow on the browser but can't find it on the app. Secondly 90% of the videos start with ads. Once the ad finishes,all I get is a button to replay the ad and the actual video does not start. I have turned off safefilter under settings but that didn't help either. What am i doing wrong? Thanks
dpakrr said:
Hi guys.I am running task and phantoms extreme stock rom which is pretty much just normal honeycomb 3.1 without touchwiz. The YouTube app that came with it is v3.1.1.
Its causing me a couple of problems. Firstly, not all videos which appear on YouTube using the browser appear on the app. Example I can watch the official video of a song called black and yellow on the browser but can't find it on the app. Secondly 90% of the videos start with ads. Once the ad finishes,all I get is a button to replay the ad and the actual video does not start. I have turned off safefilter under settings but that didn't help either. What am i doing wrong? Thanks
Click to expand...
Click to collapse
You might need to delete and reinstall your youtube app.

Play youtube vids while screen is off ""NoRoot""No3rdPartyApps""

Play youtube vids while screen is off ""NoRoot""No3rdPartyApps""
Hi,
So I Discovered a way to play YouTube videos without the need of being in the youtube app, You can even play when The screen is off
# This method does not require youtube red
# No root is needed
It's actually pretty simple all you need is headphones or earphones with a pause/play Physical button.
1) Plug in the headphones
2) Play any youtube video from the youtube app.
3) Press your home button or switch off your screen, But don't remove youtube from memory.
4) Now all you need to do is click the Physical play button in your headphones.
Idk if it does work on other devices. But it worked on mine
LG G5 (H850) running nougat
Lol that actually worked. It's probably a bug, but i'll take it while it lasts.
the other way, is to use firefox instead of the youtube app.. you can keep it playing in the backgroud or with screen off
Or use OGyoutube. There is a NoRoot version and it enables background play, download and screen off play. I'm using it right now.
@stay-down
My poster-of-the-day
stay-down said:
Or use OGyoutube. There is a NoRoot version and it enables background play, download and screen off play. I'm using it right now.
Click to expand...
Click to collapse
Yup, OGyoutube ftw!
Works on Bluetooth in my car as well.
Anyone have a link to a clean ogYouTube apk? The one I found is telling me to add an install of something else, microG; Avast didn't flag it, but better safe than sorry.
markfm said:
Anyone have a link to a clean ogYouTube apk? The one I found is telling me to add an install of something else, microG; Avast didn't flag it, but better safe than sorry.
Click to expand...
Click to collapse
Sorry, I should have mentioned that. The microG APK is required to run OGyoutube.
Got it, thanks! I looked it up, it was legitimate, so I went ahead with the install.
It's an older post but you can also go to the youtube home page, request desktop site, start a video, turn off the screen, turn on the lockscreen and press play.
That was my method until today. Now I use just the play button on the head phones.
thanks.
No Pause Lock
try No Pause Lock for youtube with lock screen nopauselock eu
Or you guys could just get Ogyoutube. That's what I use to play videos in the background
Y Music is also awesome. Doesn;t play the videos, just music. No ads, and background play.
You can also download.

Disabling audio focus on android

Edit: Found an app that works, see comments.
Hey, is there any currently working way of disabling audiofocus for centan apps?
I want to listen to music on spotify and play video audio out of chrome or opera at the same time. I would prefer for the sporify audio to duck (reduce the volume) when opera is playing audio, but not stop compleately. If ducking isnt an option, playing with the same volume is fine too.
Ive tried the ADB command thing here on chrome, but it just made chrome not able to play any video. The video would play for .1 second and stop everytime.
Also ive tried samsung sound assistant, but a) there isnt an option to disable audio focus on apps anymore, b) my tab s2 (gts210velte/SM-T819) cant run the app anymore after installed lineage os 16.0 (android 9)
I dont care if its an app i have to buy, but i just need to be able to play multiple audio at the same time. If i cant mess with audiofocus is it possible to make spotify automatically play the music again after the other audio stops? Now i have to lower the drop-down notification bar and continue evrery time and its driving me crazy!
Also, the tablet is rooted via magisk.
Any help is appreciated
Bump
Anybody?
Nnm, if anybody has the same problem: found an app called app ops (root) that allows to disable audio focus.
First touhgt i had to disable it on opera browser, but when i did this opera wasnt able to play anything, then i disabled it from spotify and now its working as intended.
99% sure it works on chrome too.
Mirovalol said:
Nnm, if anybody has the same problem: found an app called app ops (root) that allows to disable audio focus.
First touhgt i had to disable it on opera browser, but when i did this opera wasnt able to play anything, then i disabled it from spotify and now its working as intended.
99% sure it works on chrome too.
Click to expand...
Click to collapse
Thanks! app ops offer exactly what i want and even more!
Wow, i forgot how i did this. Recently got a new phone, started googling and found this thread i forgot i made.
At first it wasnt working, but noticed that if you are using viper4android you have to change settings to "Legacy mode". Im guessing it will work fine if not using viper.
Im trying to achieved the same thing. Successfully gained access to disable audio focus but when i do that it just doesnt allow apple music to play anything. Any specifics i should do?
Hello,
Using App Ops, I disabled "audio focus" on the Spotify app, and was able to simultaneously play YouTube in browser (m.youtube.com via Kiwi).
Thanks for this discovery !

Categories

Resources