From 3c5a7794e075f37f50d37ca61989d8cfa916b618 Mon Sep 17 00:00:00 2001 From: scottdowne Date: Tue, 19 Mar 2013 12:24:59 -0400 Subject: [PATCH 1/3] [#3405] Make sequencer work in a super simple example, plus example. --- .../plugins/sequencer/popcorn.sequencer.css | 0 .../plugins/sequencer/popcorn.sequencer.html | 44 +++++++++++++++++++ .../plugins/sequencer/popcorn.sequencer.js | 20 ++++++--- 3 files changed, 59 insertions(+), 5 deletions(-) create mode 100644 public/templates/assets/plugins/sequencer/popcorn.sequencer.css create mode 100644 public/templates/assets/plugins/sequencer/popcorn.sequencer.html diff --git a/public/templates/assets/plugins/sequencer/popcorn.sequencer.css b/public/templates/assets/plugins/sequencer/popcorn.sequencer.css new file mode 100644 index 000000000..e69de29bb diff --git a/public/templates/assets/plugins/sequencer/popcorn.sequencer.html b/public/templates/assets/plugins/sequencer/popcorn.sequencer.html new file mode 100644 index 000000000..03d0ed845 --- /dev/null +++ b/public/templates/assets/plugins/sequencer/popcorn.sequencer.html @@ -0,0 +1,44 @@ + + + + Popcorn Subtitle Plug-in Demo + + + + + + + + + + +

Popcorn Sequencer Plug-in Demo

+
+
+
+
+
+ + diff --git a/public/templates/assets/plugins/sequencer/popcorn.sequencer.js b/public/templates/assets/plugins/sequencer/popcorn.sequencer.js index 6f16fee0d..0275b9722 100644 --- a/public/templates/assets/plugins/sequencer/popcorn.sequencer.js +++ b/public/templates/assets/plugins/sequencer/popcorn.sequencer.js @@ -51,20 +51,26 @@ target.appendChild( container ); }; options.displayLoading = function() { - var bigPlay = document.getElementById( "controls-big-play-button" ); + var bigPlay = document.getElementById( "controls-big-play-button" ), + loadingMessage = document.querySelector( ".loading-message" ); _this.on( "play", options._surpressPlayEvent ); if ( bigPlay ) { bigPlay.classList.add( "hide-button" ); } - document.querySelector( ".loading-message" ).classList.add( "show-media" ); + if ( loadingMessage ) { + loadingMessage.classList.add( "show-media" ); + } }; options.hideLoading = function() { - var bigPlay = document.getElementById( "controls-big-play-button" ); + var bigPlay = document.getElementById( "controls-big-play-button" ), + loadingMessage = document.querySelector( ".loading-message" ); _this.off( "play", options._surpressPlayEvent ); if ( bigPlay ) { bigPlay.classList.remove( "hide-button" ); } - document.querySelector( ".loading-message" ).classList.remove( "show-media" ); + if ( loadingMessage ) { + loadingMessage.classList.remove( "show-media" ); + } }; if ( !options.from || options.from > options.duration ) { @@ -362,6 +368,10 @@ return options.title || options.source || ""; }; + if ( !options.duration ) { + options.duration = 0; + } + if ( options.duration > 0 && options.end - ( options.start - ( +options.from ) ) > options.duration ) { options.end = options.duration + ( options.start - ( +options.from ) ); @@ -388,7 +398,7 @@ if ( updates.title ) { options.title = updates.title; } - if ( updates.denied ) { + if ( updates.hasOwnProperty( "denied" ) ) { options.denied = updates.denied; } if ( updates.hasOwnProperty( "hidden" ) ) { From bdcc439c509a9947b4e1bfb8e98ba38bd8699039 Mon Sep 17 00:00:00 2001 From: scottdowne Date: Tue, 19 Mar 2013 12:49:50 -0400 Subject: [PATCH 2/3] [#3405] Removed file that was not needed. --- .../assets/plugins/sequencer/popcorn.sequencer.css | 0 .../assets/plugins/sequencer/popcorn.sequencer.html | 13 +++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) delete mode 100644 public/templates/assets/plugins/sequencer/popcorn.sequencer.css diff --git a/public/templates/assets/plugins/sequencer/popcorn.sequencer.css b/public/templates/assets/plugins/sequencer/popcorn.sequencer.css deleted file mode 100644 index e69de29bb..000000000 diff --git a/public/templates/assets/plugins/sequencer/popcorn.sequencer.html b/public/templates/assets/plugins/sequencer/popcorn.sequencer.html index 03d0ed845..2f46f3a26 100644 --- a/public/templates/assets/plugins/sequencer/popcorn.sequencer.html +++ b/public/templates/assets/plugins/sequencer/popcorn.sequencer.html @@ -9,6 +9,15 @@ + -

Popcorn Sequencer Plug-in Demo

+

Popcorn Sequencer Plug-in Demo

-
+
From 377ed6268a4c86f693934da33d536d497d92e882 Mon Sep 17 00:00:00 2001 From: scottdowne Date: Wed, 20 Mar 2013 12:37:58 -0400 Subject: [PATCH 3/3] [#3405] Extend sequencer demo to load in controls module. --- .../plugins/sequencer/popcorn.sequencer.html | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/public/templates/assets/plugins/sequencer/popcorn.sequencer.html b/public/templates/assets/plugins/sequencer/popcorn.sequencer.html index 2f46f3a26..26a713f9d 100644 --- a/public/templates/assets/plugins/sequencer/popcorn.sequencer.html +++ b/public/templates/assets/plugins/sequencer/popcorn.sequencer.html @@ -9,6 +9,8 @@ + + @@ -48,6 +77,7 @@

Popcorn Sequencer Plug-in Demo

+