aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/static/js
diff options
context:
space:
mode:
authorBoris Bobrov <breton@cynicmansion.ru>2018-07-12 18:49:35 +0200
committerBoris Bobrov <breton@cynicmansion.ru>2018-07-12 18:49:35 +0200
commit23af1d8cbc188c85d9f6ee9274af5b0102c48d24 (patch)
tree0135ecc29f3322cc7ef24a033e1150f4eebd0f5b /mediagoblin/static/js
parent8e5b7f633910de7e1429f02f0661fcbe311600fb (diff)
parent4551a808beb8aa0dab3f1a331d022bfa84ee933c (diff)
downloadmediagoblin-23af1d8cbc188c85d9f6ee9274af5b0102c48d24.tar.lz
mediagoblin-23af1d8cbc188c85d9f6ee9274af5b0102c48d24.tar.xz
mediagoblin-23af1d8cbc188c85d9f6ee9274af5b0102c48d24.zip
Merge branch 'transcoding_progress'
This probably broke stuff
Diffstat (limited to 'mediagoblin/static/js')
-rw-r--r--mediagoblin/static/js/change-video-resolution.js27
1 files changed, 27 insertions, 0 deletions
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