aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/static
diff options
context:
space:
mode:
Diffstat (limited to 'mediagoblin/static')
l---------mediagoblin/static/extlib/video-js2
l---------mediagoblin/static/extlib/videojs-resolution-switcher1
-rw-r--r--mediagoblin/static/js/change-video-resolution.js27
3 files changed, 29 insertions, 1 deletions
diff --git a/mediagoblin/static/extlib/video-js b/mediagoblin/static/extlib/video-js
index 58401be0..c13a7532 120000
--- a/mediagoblin/static/extlib/video-js
+++ b/mediagoblin/static/extlib/video-js
@@ -1 +1 @@
-../../../extlib/video.js/dist/video-js \ No newline at end of file
+../../../extlib/video.js/dist/ \ No newline at end of file
diff --git a/mediagoblin/static/extlib/videojs-resolution-switcher b/mediagoblin/static/extlib/videojs-resolution-switcher
new file mode 120000
index 00000000..ace672d9
--- /dev/null
+++ b/mediagoblin/static/extlib/videojs-resolution-switcher
@@ -0,0 +1 @@
+../../../extlib/videojs-resolution-switcher/lib/ \ No newline at end of file
diff --git a/mediagoblin/static/js/change-video-resolution.js b/mediagoblin/static/js/change-video-resolution.js
new file mode 100644
index 00000000..0cae2b46
--- /dev/null
+++ b/mediagoblin/static/js/change-video-resolution.js
@@ -0,0 +1,27 @@
+var glplayer;
+
+$(document).ready(function()
+{
+ // fire up the plugin
+ glplayer = videojs('video_1', {
+ controls: true,
+ muted: true,
+ height: 400,
+ width: 700,
+ plugins: {
+ videoJsResolutionSwitcher: {
+ ui: true,
+ default: 'low', // Default resolution [{Number}, 'low', 'high'],
+ dynamicLabel: true // Display dynamic labels or gear symbol
+ }
+ }
+ }, function(){
+ var player = this;
+ window.player = player
+ player.on('resolutionchange', function(){
+ console.info('Source changed to %s', player.src());
+ console.log(player.currentTime());
+ })
+ })
+
+}); \ No newline at end of file