invidious icon indicating copy to clipboard operation
invidious copied to clipboard

Add configuration option to control preloading of video data

Open Nerdmind opened this issue 2 years ago • 4 comments

This PR should fix #4110 by adding a configuration option to control the preloading of video data on page load by making use of the HTML5 preload attribute of the <video> element.

The option is enabled by default, so the preload attribute will have the default value auto. If users want to prevent preloading of video data, they can change the option to false so that the attribute will have the value none.

Nerdmind avatar Sep 26 '23 20:09 Nerdmind

Hi. No, not a specific reason. But your question got me thinking about something else:

I've set the preload option in VideoJS explicitly because preload: "auto" is currently defined in the player.js file in the master branch and I didn't consider that this option could be removed completely from the player.js when the HTML <video> element already contains the preload attribute directly so that VideoJS can inherit it.

I just tested it locally when removing setting the preload option in player.js completely and it works as expected. I will add a new commit to this PR in a few minutes. This seems to be a cleaner solution with less redundancy.

Nerdmind avatar Sep 27 '23 13:09 Nerdmind

This pull request has been automatically marked as stale and will be closed in 30 days because it has not had recent activity and is much likely abandoned or outdated. If you think this pull request is still relevant and applicable, you just have to post a comment and it will be unmarked.

github-actions[bot] avatar Dec 28 '23 01:12 github-actions[bot]

I just want to inform you that I'm actively using this feature on my private instance since about half a year now. It works flawlessly and never made a problem. Any chance this PR will get reviewed/merged soon?

Nerdmind avatar Mar 08 '24 22:03 Nerdmind

@SamantazFox Any chance this can be merged in the next batch?

syeopite avatar Mar 08 '24 23:03 syeopite