I noticed lately a lot of sites now have embedded video’s where if you leave the tab or open another browser the video’s stop playing because of some detection system probably in the JavaScript they are using where if it see if the user is not in the tab it automatically stops the video? is there are way to put a stop to this and make a setting so that the video thinks you are still actively viewing without stopping it or make something in a future Brave version to prevent video’s detecting that you went on another tab?
I think I see what is happening
Many sneaky web developers are now doing is injecting JavaScript code into the video’s so once “Focus” is lost from the main tab you are viewing the embedded video player is instructed to stop all functions of playing until “Focus” is gained back.
Now if Brave had a way to “Trick” the JavaScript in the tab that it’s in active view and always in “Focus” it would think you are still actively viewing the tab and will not stop. I think just web developers doing this on purpose so people stay on their page and not browse around on purpose.
@qmod1000 I’m not 100% confident on this, but wanted to present a possible solution if you’re willing to test it out. Have you tried going to brave://discards/ and make sure to turn off the toggles to Auto Discardable? It’s going to be the opposite of the screenshot below, where I have it all enabled. (I think I’m saying that right)
At least know others said that resolved it for them. What happens is Chromium browsers can be really resource heavy. So when you’re not using tabs, they try to essentially hibernate them. This can stop content from the page from playing, but also can cause it to refresh when you go back to them.
If you have it set not to discard, then it keeps it active. Just be advised that this can also increase cpu usage.
Again, not 100% sure I’m giving the right solution to the problem, but you can test and let me know. Trying to think if I even have the issue as almost everything continues to run for me. It may also just be the idea of having Continue running background apps when Brave is closed or something going. If you test and doesn’t work, then I’ll try to get Support to advise.
I tried unfortunately did not work, the thing that many sneaky web developers are now doing is injecting JavaScript code into the video’s so once “Focus” is lost from the main tab you are viewing the embedded video player is instructed to stop all functions of playing until “Focus” is gained back.
Now if Brave had a way to “Trick” the JavaScript in the tab that it’s in active view and always in “Focus” it would think you are still actively viewing the tab and will not stop. I think just web developers doing this on purpose so people stay on their page and not browse around on purpose.
@qmod1000 thanks for trying. Just knew it had resolved for someone else so I felt comfortable at least putting out there to attempt. Normally would tag Mattches on this but know I’ve already tagged a lot recently and he’s been very busy. I’m going to try to tag in @Evan123 and @SaltyBanana to see if either can help. I know they’ve been doing a lot of stuff outside of Community, but they do still check in on occasion. Hopefully they pop in and know what to suggest, if anything.
No I already did that, as I mentioned It’s mostly a JavaScript programming issue where sneaky web developers are implementing code where if the tab you are on loses “focus” the video automatically stops on purposes because the browser sends a signal to the JavaScript saying the user opened another tab or browser so stop the video. The only solution would be to “Trick” the javascript code of the tab to make it think that the tab is still in focus.
I found an addon in the Chrome store but does not work "small script is injected into every webpage which overwrites the “document.visibilityState”, and “document.hidden” properties to pretend the tab is always in the active state (document.visibilityState = ‘visible’ and document.hidden = false). "
Maybe if somebody know how to trick/spoof the JavaScript with a code that actually works it would work.
@qmod1000 interesting, that’s the first videos I’ve seen that didn’t continue playing. I tested on Chrome and Edge, to which both of them replicated. I see that the player is Brightcove Player Version 6.67.3. Not sure if this would be something to be taken up with Chromium (they tend to move faster on things) or if shouldn’t just try to contact Brightcove on it. Might be interesting to see if it’s the same type of player on other areas you’re experiencing this.
I would suggest the same as what Saoiray has mentioned.
I’m not entirely sure what the solution is here as I am able to replicate this across different browsers.
Maybe Brightcove may have more answers to your questions.