hypothesis / via

Proxies third-party PDF files and HTML pages with the Hypothesis client embedded, so you can annotate them
https://via.hypothes.is/
BSD 2-Clause "Simplified" License
19 stars 7 forks source link

Support disabling video download controls via `allow_download` query param #1329

Closed robertknight closed 5 months ago

robertknight commented 5 months ago

Support disabling obvious video download controls via an allow_download query param. The default behavior if not specified is to show the browser's default controls, which includes a download option in all major browsers.

Note this is only a "soft" mechanism for preventing downloads, which won't stop anyone who is able to fetch the video URL via developer tools etc. It nevertheless matches the level of protection for content that eg. Canvas Studio's own video player provides.

Testing:

  1. Load the test video URL from https://github.com/hypothesis/via/pull/1294 in Chrome. The video should have a download button in its "..." menu and context menu.
  2. Add allow_download=0 to the URL and reload. The download option in the "..." menu should disappear and right-clicking on the video should not show the context menu.