VID-3: Only load HLS code if video is HLS



Issue Information

Issue Type: Task
 
Priority: Major
Status: Closed

Reported By:
Ben Tasker
Assigned To:
Ben Tasker
Project: Videos.bentasker.co.uk (VID)
Resolution: Done (2019-03-27 13:16:35)
Target version: v0.12,
Components: Embed Code ,

Created: 2019-03-27 12:51:56
Time Spent Working


Description
It's possible to embed media that isn't HLS by passing a mimetype that isn't application/x-mpegURL into embedBensPlayer:
embedBensPlayer('2018/03/201803-trivium_oh_fuck.mp3','audio/mpeg');


Assuming that works (not actually tested it yet), we'll still load the HLS plugin, which will slightly delay start up time, for no good reason.

So, the embed code should check the specified mime-type and skip the HLS plugin if it doesn't look like it's going to be required.


Toggle State Changes

Activity


Repo: videos.bentasker.co.uk
Host:Rimmer

commit 4abcd6903d7f218963970d36fb851aa50db4774d
Author: B Tasker <github@<Domain Hidden>>
Date: Wed Mar 27 12:54:35 2019 +0000

Commit Message: VID-3 Add MP3 playback to test page to verify MP3 playback works before making changes

resources/test.html | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)


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

commit bfa17d9545dc6e6cb5e1007df50a5589e6273719
Author: B Tasker <github@<Domain Hidden>>
Date: Wed Mar 27 13:09:03 2019 +0000

Commit Message: VID-3 Add Test page containing only MP3 playback

resources/tests/vid_3_mp3_test.html | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)


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

commit 845dce1315031c3343ad8ca24ae6d11a4615a07a
Author: B Tasker <github@<Domain Hidden>>
Date: Wed Mar 27 13:10:35 2019 +0000

Commit Message: VID-3 Only load the HLS plugin if HLS playback is expected to take place

resources/embed/embed.js | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)


View Commit | View Changes
btasker changed status from 'Open' to 'Resolved'
btasker added 'Done' to resolution
btasker changed status from 'Resolved' to 'Closed'