disable previous / next video preloading
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 119
- Forks
- 72
- Avg merge
- 18h 42m
- Merged PRs (30d)
- 24
Description
Is your feature request related to a problem? Please describe.
when playing some high rate video (from a gopro for example), with many in the same folder, the viewer preloads simultaneously the previous and the next video, which can be very laggy.
Describe the solution you'd like
we could :
- totally disable video preloading there : https://github.com/nextcloud/viewer/blob/aee0712b4114124a1562e3740e2cd35332b21012/src/components/Videos.vue#L39
- disable preloading for previous / next video only
- only preload after a while, when the current video is buffered and already playing
- have a setting that allows user to disable this globally, or maybe per folder
Describe alternatives you've considered
I don't really know how to develop with vue.js and compile this sources, but I figured out this workaround :
- in nextcloud dir, edit : apps/viewer/js/viewer-main.js
- find {ref:"video",attrs:{autoplay:!!e.active||null,playsinline:!0,poster:e.livePhotoPath,src:e.src,preload:"metadata"}
- change "metadata" to "none"
we can see in FF network debugger that only one video file is requested (before we could see 3 different videos requested)
Additional context
it is not a cpu problem, my hosting server is ok, it's really a bandwidth problem, which is felt more from internet than locally.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading src/components/Videos.vue around line 39, where video preloading is identified, and compare its behavior with the generated apps/viewer/js/viewer-main.js workaround. Reproduce playback with several high-rate videos while watching network requests, then implement and verify one agreed preload policy for the current, previous, and next videos.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100