i think it would be nice to stop playing the actual video when choosing to play another not after it's fully loaded this way we won't be looking at the comments section of a video and another is being played on the background.
i don't know maybe?
nothing..
every other app does this so newpipe should as well?
well i guess it's helpful because it's what everyone expects to happen !
Why does it matter? The current way, you get less of a gap where you're left staring at the screen waiting for things to load. You get to enjoy the video until the new one is ready.
@opusforlife2 it does matter because sometimes you don't enjoy the current playing video that's why you start playing another ?
Pause it before playing another. 馃き
@opusforlife2 yeah that's an option but it doesn't solve the issue permenantly (the youtube app does solve it tho)
The Youtube app uses proprietary code to _directly_ access the Google servers and fetch videos. So they can do this super fast. Newpipe has to first obtain data from the website and _then_ fetch the video details, which means we can never be as fast as Youtube at fetching videos. So there's no point in comparing the two.
@opusforlife2 i know that and i think you missing the point! what am saying is not to fetch videos as fast as youtube. am saying have some mechanism to stop the ongoing video whenever another video's tumbnail is pressed
My opinion is:
Pause it before playing another. 馃き
So let's wait until more people weigh in on this.
What about an option (SwitchPreference) in preferences under "video and audio" regarding this behavior?
@opusforlife2 I agree with all your comments here. Actually I didn't pause a video just because of the silent gap between streams. Without pause it feels like a kind of instant playback
@avently Yep. I consider it a feature, not a bug.
@avently @opusforlife2 i can't agree enough but i'm raising this issue because sometimes i have terrible internet (or for those using tor or vpn) considering the amount of time the app takes to fetsh the video, Retrieve the comments and recommended videos there's a huge amount of delay here ranging from a few seconds to minutes !
there's no need for me to keep playing the other video (which takes a considarable amount of memory and cache). that's all what i'm trying to say and what i am familiar with on other apps but if you feel like a production oriented philosophy is good for you go for it guys.
I don't think you'll get better results in terms of delay before next video if you just stop playback instead of loading in parallel. You can try it yourself and to compare with current behavior. Just stop playback via notification and than choose another video, compare the delay. Or pause and select another video
I think the question here, @avently, is that does the current video stop _loading_ when you open a new one? @panacist is concerned about the data usage. If the app keeps playing the already buffered video, but stops downloading more of it when you open another one, he should be fine.
Am I correct, @panacist?
@opusforlife2 yess!! thtat's exactly what am trying to say keep loading the actuall video when not needed takes a nontrivial amount of data memory and cache for those who have bad internet connection and old phones.
@opusforlife2 the player always preloads some parts of a video and at some point of timeline IR doesn't load anything but at some point it loads next part.
The answer is no, the player don't stop prealoading.
Hmmm. Is it possible to programmatically stop preloading when another video is opened?
@opusforlife2 in fact it is (I tried it myself some hours ago) but I doubt it is good practice.
If you add playerService.stop(false) to the beginning of VideoDetailFragment#selectAndLoadVideo (link), the video/service stops but the latest frame remains until the new video has been enqueued/starts to buffer.
From this line it looks like playerService.stop stops the actual player, not just the preloading/buffering part.
@vkay94 there is hideMainPlayer() for stopping without issues. But it still not allowing to continue playing with just disabled preloading, i'm not sure how to do it in exoplayer
Try this apk. Should work fine. The toast will tell you when preload is enabled or disabled. You can also check with any network monitor.
PR #4246
Didn't you test the apk, @panacist?
@avently thank you for working on that really appriciate it !
@opusforlife2 yeah it does work as expected (although i still think stopping the actual player is the best thing to do but we will see other users impressions once the new version is released :) )
The issue will be closed automatically when the PR is merged.
Most helpful comment
My opinion is:
So let's wait until more people weigh in on this.