From ef246d3cdfcd4d3212dc8dc708e673f061bfab44 Mon Sep 17 00:00:00 2001 From: Eusmilis Date: Sat, 20 May 2017 19:27:32 +0200 Subject: [PATCH 1/5] Replaced jwplayer with HTML5 player using MediaElement.js --- .../resources/liquibase/legacy/schema43.xml | 76 +- .../resources/liquibase/legacy/schema46.xml | 6 +- .../src/main/webapp/WEB-INF/jsp/playQueue.jsp | 63 +- .../main/webapp/WEB-INF/jsp/playQueueCast.jsp | 4 +- .../main/webapp/WEB-INF/jsp/videoPlayer.jsp | 3 +- .../webapp/WEB-INF/jsp/videoPlayerCast.jsp | 66 +- .../main/webapp/script/mediaelement/jquery.js | 9597 +++++++++++++++++ .../webapp/script/mediaelement/lang/ca.js | 89 + .../webapp/script/mediaelement/lang/cs.js | 90 + .../webapp/script/mediaelement/lang/de.js | 90 + .../webapp/script/mediaelement/lang/es.js | 90 + .../webapp/script/mediaelement/lang/fr.js | 91 + .../webapp/script/mediaelement/lang/hr.js | 87 + .../webapp/script/mediaelement/lang/hu.js | 90 + .../webapp/script/mediaelement/lang/it.js | 90 + .../webapp/script/mediaelement/lang/ja.js | 90 + .../webapp/script/mediaelement/lang/ko.js | 90 + .../webapp/script/mediaelement/lang/nl.js | 91 + .../webapp/script/mediaelement/lang/pl.js | 90 + .../webapp/script/mediaelement/lang/pt-br.js | 91 + .../webapp/script/mediaelement/lang/pt.js | 92 + .../webapp/script/mediaelement/lang/ro.js | 90 + .../webapp/script/mediaelement/lang/ru.js | 90 + .../webapp/script/mediaelement/lang/sk.js | 90 + .../webapp/script/mediaelement/lang/sv.js | 89 + .../webapp/script/mediaelement/lang/uk.js | 89 + .../webapp/script/mediaelement/lang/zh-cn.js | 90 + .../webapp/script/mediaelement/lang/zh.js | 90 + .../mediaelement/mediaelement-and-player.js | 9292 ++++++++++++++++ .../mediaelement-and-player.min.js | 36 + .../mediaelement-flash-audio-ogg.swf | Bin 0 -> 303685 bytes .../mediaelement/mediaelement-flash-audio.swf | Bin 0 -> 4350 bytes .../mediaelement-flash-video-hls.swf | Bin 0 -> 91195 bytes .../mediaelement-flash-video-mdash.swf | Bin 0 -> 401418 bytes .../mediaelement/mediaelement-flash-video.swf | Bin 0 -> 7303 bytes .../script/mediaelement/mediaelement.js | 4223 ++++++++ .../script/mediaelement/mediaelement.min.js | 34 + .../mediaelementplayer-legacy.css | 716 ++ .../mediaelementplayer-legacy.min.css | 1 + .../mediaelement/mediaelementplayer.css | 716 ++ .../script/mediaelement/mediaelementplayer.js | 7709 +++++++++++++ .../mediaelement/mediaelementplayer.min.css | 1 + .../mediaelement/mediaelementplayer.min.js | 35 + .../script/mediaelement/mejs-controls.png | Bin 0 -> 6379 bytes .../script/mediaelement/mejs-controls.svg | 122 + .../mediaelement/renderers/dailymotion.js | 489 + .../mediaelement/renderers/dailymotion.min.js | 22 + .../script/mediaelement/renderers/facebook.js | 426 + .../mediaelement/renderers/facebook.min.js | 22 + .../mediaelement/renderers/soundcloud.js | 442 + .../mediaelement/renderers/soundcloud.min.js | 22 + .../script/mediaelement/renderers/twitch.js | 539 + .../mediaelement/renderers/twitch.min.js | 22 + .../script/mediaelement/renderers/vimeo.js | 529 + .../mediaelement/renderers/vimeo.min.js | 22 + 55 files changed, 37004 insertions(+), 120 deletions(-) create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/jquery.js create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/lang/ca.js create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/lang/cs.js create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/lang/de.js create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/lang/es.js create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/lang/fr.js create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/lang/hr.js create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/lang/hu.js create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/lang/it.js create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/lang/ja.js create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/lang/ko.js create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/lang/nl.js create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/lang/pl.js create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/lang/pt-br.js create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/lang/pt.js create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/lang/ro.js create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/lang/ru.js create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/lang/sk.js create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/lang/sv.js create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/lang/uk.js create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/lang/zh-cn.js create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/lang/zh.js create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/mediaelement-and-player.js create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/mediaelement-and-player.min.js create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/mediaelement-flash-audio-ogg.swf create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/mediaelement-flash-audio.swf create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/mediaelement-flash-video-hls.swf create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/mediaelement-flash-video-mdash.swf create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/mediaelement-flash-video.swf create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/mediaelement.js create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/mediaelement.min.js create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/mediaelementplayer-legacy.css create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/mediaelementplayer-legacy.min.css create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/mediaelementplayer.css create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/mediaelementplayer.js create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/mediaelementplayer.min.css create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/mediaelementplayer.min.js create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/mejs-controls.png create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/mejs-controls.svg create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/renderers/dailymotion.js create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/renderers/dailymotion.min.js create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/renderers/facebook.js create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/renderers/facebook.min.js create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/renderers/soundcloud.js create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/renderers/soundcloud.min.js create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/renderers/twitch.js create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/renderers/twitch.min.js create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/renderers/vimeo.js create mode 100644 libresonic-main/src/main/webapp/script/mediaelement/renderers/vimeo.min.js diff --git a/libresonic-main/src/main/resources/liquibase/legacy/schema43.xml b/libresonic-main/src/main/resources/liquibase/legacy/schema43.xml index eadf978a..ff7441f1 100644 --- a/libresonic-main/src/main/resources/liquibase/legacy/schema43.xml +++ b/libresonic-main/src/main/resources/liquibase/legacy/schema43.xml @@ -23,97 +23,97 @@ - target_format = 'flv' and source_format in ('avi', 'mpg', 'mpeg', 'mp4', 'm4v', 'mkv', 'mov', 'wmv', 'ogv') + target_format = 'mp4' and source_format in ('avi', 'mpg', 'mpeg', 'mp4', 'm4v', 'mkv', 'mov', 'wmv', 'ogv') - + - - + + - insert into player_transcoding(player_id, transcoding_id) select p.id as player_id, t.id as transaction_id from player p, transcoding t where t.name = 'avi > flv' + insert into player_transcoding(player_id, transcoding_id) select p.id as player_id, t.id as transaction_id from player p, transcoding t where t.name = 'avi > mp4' - + - - + + - insert into player_transcoding(player_id, transcoding_id) select p.id as player_id, t.id as transaction_id from player p, transcoding t where t.name = 'mpg > flv' + insert into player_transcoding(player_id, transcoding_id) select p.id as player_id, t.id as transaction_id from player p, transcoding t where t.name = 'mpg > mp4' - + - - + + - insert into player_transcoding(player_id, transcoding_id) select p.id as player_id, t.id as transaction_id from player p, transcoding t where t.name = 'mpeg > flv' + insert into player_transcoding(player_id, transcoding_id) select p.id as player_id, t.id as transaction_id from player p, transcoding t where t.name = 'mpeg > mp4' - - - - + + + + - insert into player_transcoding(player_id, transcoding_id) select p.id as player_id, t.id as transaction_id from player p, transcoding t where t.name = 'mp4 > flv' + insert into player_transcoding(player_id, transcoding_id) select p.id as player_id, t.id as transaction_id from player p, transcoding t where t.name = 'flv > mp4' - + - - + + - insert into player_transcoding(player_id, transcoding_id) select p.id as player_id, t.id as transaction_id from player p, transcoding t where t.name = 'm4v > flv' + insert into player_transcoding(player_id, transcoding_id) select p.id as player_id, t.id as transaction_id from player p, transcoding t where t.name = 'm4v > mp4' - + - - + + - insert into player_transcoding(player_id, transcoding_id) select p.id as player_id, t.id as transaction_id from player p, transcoding t where t.name = 'mkv > flv' + insert into player_transcoding(player_id, transcoding_id) select p.id as player_id, t.id as transaction_id from player p, transcoding t where t.name = 'mkv > mp4' - + - - + + - insert into player_transcoding(player_id, transcoding_id) select p.id as player_id, t.id as transaction_id from player p, transcoding t where t.name = 'mov > flv' + insert into player_transcoding(player_id, transcoding_id) select p.id as player_id, t.id as transaction_id from player p, transcoding t where t.name = 'mov > mp4' - + - - + + - insert into player_transcoding(player_id, transcoding_id) select p.id as player_id, t.id as transaction_id from player p, transcoding t where t.name = 'wmv > flv' + insert into player_transcoding(player_id, transcoding_id) select p.id as player_id, t.id as transaction_id from player p, transcoding t where t.name = 'wmv > mp4' - + - - + + - insert into player_transcoding(player_id, transcoding_id) select p.id as player_id, t.id as transaction_id from player p, transcoding t where t.name = 'ogv > flv' + insert into player_transcoding(player_id, transcoding_id) select p.id as player_id, t.id as transaction_id from player p, transcoding t where t.name = 'ogv > mp4' diff --git a/libresonic-main/src/main/resources/liquibase/legacy/schema46.xml b/libresonic-main/src/main/resources/liquibase/legacy/schema46.xml index fd009415..54d02119 100644 --- a/libresonic-main/src/main/resources/liquibase/legacy/schema46.xml +++ b/libresonic-main/src/main/resources/liquibase/legacy/schema46.xml @@ -47,10 +47,10 @@ - - + + - + diff --git a/libresonic-main/src/main/webapp/WEB-INF/jsp/playQueue.jsp b/libresonic-main/src/main/webapp/WEB-INF/jsp/playQueue.jsp index db402fae..6d1096a5 100644 --- a/libresonic-main/src/main/webapp/WEB-INF/jsp/playQueue.jsp +++ b/libresonic-main/src/main/webapp/WEB-INF/jsp/playQueue.jsp @@ -10,9 +10,10 @@ - + <%@ include file="playQueueCast.jsp" %> "> + "> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libresonic-main/src/main/webapp/script/mediaelement/renderers/dailymotion.js b/libresonic-main/src/main/webapp/script/mediaelement/renderers/dailymotion.js new file mode 100644 index 00000000..867bc4a4 --- /dev/null +++ b/libresonic-main/src/main/webapp/script/mediaelement/renderers/dailymotion.js @@ -0,0 +1,489 @@ +/*! + * MediaElement.js + * http://www.mediaelementjs.com/ + * + * Wrapper that mimics native HTML5 MediaElement (audio and video) + * using a variety of technologies (pure JavaScript, Flash, iframe) + * + * Copyright 2010-2017, John Dyer (http://j.hn/) + * License: MIT + * + */(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o approach and uses DailyMotion API to manipulate it. + * @see https://developer.dailymotion.com/player + * + */ + +var DailyMotionApi = { + /** + * @type {Boolean} + */ + isSDKStarted: false, + /** + * @type {Boolean} + */ + isSDKLoaded: false, + /** + * @type {Array} + */ + iframeQueue: [], + + /** + * Create a queue to prepare the creation of