mirror of
https://github.com/kmoskwiak/videojs-resolution-switcher.git
synced 2025-10-04 02:09:41 +02:00
59rc update
This commit is contained in:
parent
7153217cb5
commit
10735641e1
3 changed files with 14 additions and 11 deletions
|
@ -1,6 +1,6 @@
|
||||||
# Video.js Resolution Switcher
|
# Video.js Resolution Switcher
|
||||||
|
|
||||||
Resolution switcher for [video.js](https://github.com/videojs/video.js) build for [5.0.0-rc.52](https://github.com/videojs/video.js/tree/v5.0.0-rc.52)
|
Resolution switcher for [video.js](https://github.com/videojs/video.js) build for [5.0.0-rc.59](https://github.com/videojs/video.js/tree/v5.0.0-rc.59)
|
||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
|
|
19
example.html
19
example.html
|
@ -39,13 +39,16 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<video id="video_1" class="video-js vjs-default-skin" width="1000" controls data-setup='{}' muted>
|
<video id="video_1" class="video-js vjs-default-skin" width="1000" controls data-setup='{}' muted>
|
||||||
<source src="http://mirrorblender.top-ix.org/movies/sintel-1024-surround.mp4?480" type='video/mp4' label='SD' res='480' />
|
<source src="https://vjs.zencdn.net/v/oceans.mp4?480" type='video/mp4' label='SD' res='480' />
|
||||||
<source src="http://media.xiph.org/mango/tears_of_steel_1080p.webm?1080" type='video/webm' label='HD' res='1080'/>
|
<source src="https://vjs.zencdn.net/v/oceans.mp4?1080" type='video/mp4' label='HD' res='1080'/>
|
||||||
<source src="http://media.xiph.org/mango/tears_of_steel_1080p.webm?144" type='video/webm' label='phone' res='144'/>
|
<source src="https://vjs.zencdn.net/v/oceans.mp4?144" type='video/mp4' label='phone' res='144'/>
|
||||||
<source src="http://media.xiph.org/mango/tears_of_steel_1080p.webm?2160" type='video/webm' label='4k' res='2160'/>
|
<source src="https://vjs.zencdn.net/v/oceans.mp4?2160" type='video/mp4' label='4k' res='2160'/>
|
||||||
</video>
|
</video>
|
||||||
|
|
||||||
<script src="node_modules/video.js/dist/video.js"></script>
|
<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 src="lib/videojs-resolution-switcher.js"></script>
|
||||||
<script>
|
<script>
|
||||||
// fire up the plugin
|
// fire up the plugin
|
||||||
|
@ -55,7 +58,7 @@
|
||||||
width: 1000,
|
width: 1000,
|
||||||
plugins: {
|
plugins: {
|
||||||
videoJsResolutionSwitcher: {
|
videoJsResolutionSwitcher: {
|
||||||
default: 'high', // Default resolution [{Number}, 'low', 'high'],
|
default: '360', // Default resolution [{Number}, 'low', 'high'],
|
||||||
dynamicLabel: true // Display dynamic labels or gear symbol
|
dynamicLabel: true // Display dynamic labels or gear symbol
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -65,13 +68,13 @@
|
||||||
|
|
||||||
player.updateSrc([
|
player.updateSrc([
|
||||||
{
|
{
|
||||||
src: 'http://media.xiph.org/mango/tears_of_steel_1080p.webm',
|
src: 'https://vjs.zencdn.net/v/oceans.mp4?sd',
|
||||||
type: 'video/webm',
|
type: 'video/mp4',
|
||||||
label: 'SD',
|
label: 'SD',
|
||||||
res: 360
|
res: 360
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
src: 'http://mirrorblender.top-ix.org/movies/sintel-1024-surround.mp4',
|
src: 'https://vjs.zencdn.net/v/oceans.mp4?hd',
|
||||||
type: 'video/mp4',
|
type: 'video/mp4',
|
||||||
label: 'HD',
|
label: 'HD',
|
||||||
res: 720
|
res: 720
|
||||||
|
|
|
@ -20,10 +20,10 @@
|
||||||
"grunt-contrib-uglify": "^0.2",
|
"grunt-contrib-uglify": "^0.2",
|
||||||
"grunt-contrib-watch": "^0.4",
|
"grunt-contrib-watch": "^0.4",
|
||||||
|
|
||||||
"video.js": "^5.0.0-rc.52",
|
"video.js": "^5.0.0-rc.59",
|
||||||
"qunitjs": "^1.12"
|
"qunitjs": "^1.12"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"video.js": "^5.0.0-rc.52"
|
"video.js": "^5.0.0-rc.59"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue