voc / voctoweb

voctoweb – the frontend and backend software behind media.ccc.de
GNU General Public License v3.0
188 stars 55 forks source link

Player should not start buffering immediately once the page is opened #194

Open mark-orion opened 7 years ago

mark-orion commented 7 years ago

Current behaviour: The embedded video player starts buffering immediately once one of the pages on media.ccc.de is opened. Expected behaviour: The embedded player does nothing except offering a thumbnail until the "play" button is pressed. There are many reasons why this might be a good idea:

Bandwidth: If you are on a low bandwidth or unstable internet connection you probably want to download the video directly from the server or via torrent. An unusable player that is hogging bandwidth is highly counterproductive in this case. And always having to close the page in order to stop the buffering is very uncomfortable.

Security: With some of the content that is being published probably not being in the interest of certain three or four letter organizations, people may want to browse the site via TOR and download the videos via other means of anonymization. Again, a player that immediately consumes bandwidth is not helpful in this case.

saerdnaer commented 7 years ago

possibly duplicate of #114

saerdnaer commented 5 years ago

should be implemented now

fridtjof commented 5 years ago

This is still an issue for me.

When loading a video (through media.ccc.de, or embedded), something preloads roughly 7MB from the CDN.

I am using Firefox 66.0.2 with uMatrix. (Disabling uMatrix does not affect this behaviour)

The video I'm loading is this one: https://media.ccc.de/v/35c3-9778-open_source_firmware/oembed Although, it should be the same for all videos. (Note I used the oembed link because it only loads one js file, oembed-player)

I tested disabling JS, which does not eliminate the issue.

I disabled the cache, and reloaded a couple of times. First i thought it's affected by the mirror that is used, but after some more attempts, I observed the behaviour to be completely random. For the same mirror, Firefox will either load 6-7 MB, 0 MB or nothing (empty size field in the network analyzer).

Can someone reproduce this?

saerdnaer commented 5 years ago

We could add an URL or Cookie option, so users can customise the preload: 'metadata', to preload: 'none', which would lead to some usability issues, but reduce bandwidth consumption.

https://github.com/voc/voctoweb/blob/8eb08a527218b03a4e2c9f513cf7b09144f1f303/app/views/frontend/shared/_player_video.haml#L4