VID-8: Player Page



Issue Information

Issue Type: New Feature
 
Priority: Major
Status: Closed

Reported By:
Ben Tasker
Assigned To:
Ben Tasker
Project: Videos.bentasker.co.uk (VID)
Resolution: Done (2019-04-02 17:41:47)
Target version: v0.13,
Components: Resources ,

Created: 2019-03-29 08:59:42
Time Spent Working


Description
There should be a simple HTML page on videos.bentasker.co.uk that embeds the player (with video selection based on the querystring) so that videos can be linked to and not just embedded (for example, embedding in JIRA isn't really doable).


Toggle State Changes

Activity


Very, very basic implementation in place, so this link should now work - https://videos.bentasker.co.uk/Player.html?url=2018/03/201803_hls_33_sed_error/hls_33_rec_master.m3u8
Repo: videos.bentasker.co.uk
Host:Rimmer

commit 702a9f2b6177399f7b54ce9ed4741fd3d60f1d64
Author: B Tasker <github@<Domain Hidden>>
Date: Sat Mar 30 10:23:29 2019 +0000

Commit Message: VID-8 Add embed code snippet to player page

Also adds some basic styling to the page. Scripts and CSS will be broken out into seperate files later

Player.html | 116 +++++++++++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 102 insertions(+), 14 deletions(-)


View Commit | View Changes
Repo: videos.bentasker.co.uk
Host:Rimmer

commit f4631b48dfeda8ffab770a84b968e8677d38499b
Author: B Tasker <github@<Domain Hidden>>
Date: Sat Mar 30 10:42:04 2019 +0000

Commit Message: VID-8 Player page now supports showing some information about videos

When the page loads, a request will be placed for a file called details.json within the video's directory. If this exists, it's contents will be used to populate the page title and a description section.

Generating the JSON can be done trivially in a JSON shell:
    	>>> import json
    	>>> s = { 'title' : 'Repaired Generator first run', 'description' : 'First start of a Performance Power generator following replacement of the running capacitor' }
    	>>> json.dumps(s)
    	'{"description": "First start of a Performance Power generator following replacement of the running capacitor", "title": "Repaired Generator first run"}'
    


The result of this can be viewed at https://videos.bentasker.co.uk/Player.html?url=2018/03/20180327_genny_run/VID_20190327.mp4_master.m3u8

Javascript and CSS have also now been broken out into external files so that the size of the player page itself is minimal (currently 840b)

Player.html | 90 +++------------------------------------
resources/css/player/player.css | 39 +++++++++++++++++
resources/js/player/player.js | 86 +++++++++++++++++++++++++++++++++++++
3 files changed, 131 insertions(+), 84 deletions(-)


View Commit | View Changes
There's a new attribute added to the JSON - keywords - so the snippet above should now be
>>> s = { 'title' : 'Gather Speed metrics from Curl', 'description' : 'Example of how to have curl output connection and request speed metrics, from https://snippets.bentasker.co.uk/page-1707191143-Getting-connection-speed-metrics-from-curl-BASH.html', 'keywords': 'curl,speed,statistics,metrics'}
>>> json.dumps(s)
'{"keywords": "curl,speed,statistics,metrics", "description": "Example of how to have curl output connection and request speed metrics, from https://snippets.bentasker.co.uk/page-1707191143-Getting-connection-speed-metrics-from-curl-BASH.html", "title": "Gather Speed metrics from Curl"}'


Although the page is currently quite plain, it is now implemented. There's plenty of scope for improvement in the future, but that can be recorded under new issues. Marking complete.
btasker changed status from 'Open' to 'Resolved'
btasker added 'Done' to resolution
btasker changed status from 'Resolved' to 'Closed'