diff options
author | vijeth-aradhya <vijthaaa@gmail.com> | 2017-07-18 09:46:37 +0530 |
---|---|---|
committer | vijeth-aradhya <vijthaaa@gmail.com> | 2017-07-18 09:46:37 +0530 |
commit | 19d7c450706df1aae74003fcfcfa03d17ebd6f54 (patch) | |
tree | 9386786b548a7af5de16954eff857ba32c73a026 /extlib/videojs-resolution-switcher/examples/flash.html | |
parent | 0e49df65fea13b15c5566f2ee44842feaeaaccd0 (diff) | |
download | mediagoblin-19d7c450706df1aae74003fcfcfa03d17ebd6f54.tar.lz mediagoblin-19d7c450706df1aae74003fcfcfa03d17ebd6f54.tar.xz mediagoblin-19d7c450706df1aae74003fcfcfa03d17ebd6f54.zip |
Add video-resolution-switcher (v0.4.2) plugin
Diffstat (limited to 'extlib/videojs-resolution-switcher/examples/flash.html')
-rw-r--r-- | extlib/videojs-resolution-switcher/examples/flash.html | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/extlib/videojs-resolution-switcher/examples/flash.html b/extlib/videojs-resolution-switcher/examples/flash.html new file mode 100644 index 00000000..60dfb11d --- /dev/null +++ b/extlib/videojs-resolution-switcher/examples/flash.html @@ -0,0 +1,81 @@ +<!doctype html> +<html> +<head> + <meta charset="utf-8"> + <title>Video.js Resolution Switcher</title> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <link href="../node_modules/video.js/dist/video-js.css" rel="stylesheet"> + <link href="../lib/videojs-resolution-switcher.css" rel="stylesheet"> + <style> + body { + font-family: Arial, sans-serif; + background: #777; + } + .info { + background-color: #eee; + border: thin solid #333; + border-radius: 3px; + padding: 0 5px; + text-align: center; + } + .video-js { + margin: 40px auto; + } + </style> +</head> +<body> + <div class="info"> + <p> + Use flash + </p> + </div> + + <video id='video_flash' class="video-js vjs-default-skin"></video> + + <script src="../node_modules/video.js/dist/video.js"></script> + <script> + videojs.options.flash.swf = "../node_modules/video.js/dist/video-js.swf" + </script> + <script src="../lib/videojs-resolution-switcher.js"></script> + <script> + + // Use flash + videojs('video_flash', { + controls: true, + techOrder: ['flash'], + preload: 'auto', + width: 1000, + plugins: { + videoJsResolutionSwitcher: { + default: 'low', // Default resolution [{Number}, 'low', 'high'], + dynamicLabel: true // Display dynamic labels or gear symbol + } + } + }, function(){ + var player = this; + window.player = player + + player.updateSrc([ + { + src: 'https://vjs.zencdn.net/v/oceans.mp4?sd', + type: 'video/mp4', + label: 'SD', + res: 360 + }, + { + src: 'https://vjs.zencdn.net/v/oceans.mp4?hd', + type: 'video/mp4', + label: 'HD', + res: 720 + } + ]) + + player.on('resolutionchange', function(){ + console.info('Source changed to %s', player.src()) + }) + + }) + + </script> +</body> +</html> |