project Websites / videos.bentasker.co.uk avatar

Websites / videos.bentasker.co.uk: 930fbef8




Add a README

Add a README

Commit 930fbef8.

Authored 2019-03-27T17:44:39.000+00:00 by B Tasker in project Websites / videos.bentasker.co.uk

+58 lines -0 lines

Changes

diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
# @@ -0,0 +1,58 @@
# +# videos.bentasker.co.uk
# +
# +A set of javascript used to simplify embedding a video player into other sites (allowing playback from a core, cacheable video domain).
# +
# +
# +### Issues
# +
# +The project is tracked in JIRA project [VID](https://jiralist.bentasker.co.uk/browse/VID.html)
# +
# +
# +----
# +
# +
# +### Uploading Videos
# +
# +For now, videos should be SCP'd up, ideally as HLS
# +
# + scp -r 20170111-noisy-bearing/ hiyori:/usr/share/nginx/static/videos/2017/
# +
# +
# +### Embedding Videos
# +
# +The player will take on the dimensions of it's parent container, so it's probably desirable to wrap the call to it in a div of the desired size.
# +
# +Call in the `embed` script, and then call the embed function passing the video path to it:
# +
# + <div style="width: 60%">
# + <script type="text/javascript" src="https://videos.bentasker.co.uk/resources/embed/embed.js?v=0.12"></script>
# + <script type="text/javascript">embedBensPlayer('2017/20170111-noisy-bearing/noisy_bearing_master.m3u8');</script>
# + </div>
# +
# +Videos must be hosted on https://videos.bentasker.co.uk otherwise the player will refuse to play them.
# +
# +The path is simply the path under the docroot (i.e. the path as seen below `/usr/share/nginx/static/videos/` on hiyori).
# +
# +
# +#### Non-HLS media
# +
# +It's preferred that media be HLS, however if that's not the case, then `embedBensPlayer` can be passed a mime-type to ensure things are declared to VideoJS correctly:
# +
# + <div style="width: 600px">
# + <script type="text/javascript" src="https://videos.bentasker.co.uk/resources/embed/embed.js?v=0.12"></script>
# + <script type="text/javascript">embedBensPlayer('2018/03/201803-trivium_oh_fuck.mp3','audio/mpeg');</script>
# + </div>
# +
# +
# +----
# +
# +### Caching
# +
# +As of [CDN-13](https://jiralist.bentasker.co.uk/browse/CDN-13.html) media files are cached in a dedicated cache zone on the edge, and will be kept in cache for a year (assuming they aren't LRU'd out first).
# +
# +
# +----
# +
# +### Copyright
# +
# +Copyright (c) 2019 [B Tasker](https://www.bentasker.co.uk/)
#