mirror of
https://github.com/kmoskwiak/videojs-resolution-switcher.git
synced 2025-10-03 09:49:21 +02:00
updateSrc for HLS
This commit is contained in:
parent
f8218598f6
commit
409007d9d7
2 changed files with 12 additions and 7 deletions
|
@ -44,17 +44,18 @@
|
|||
plugins: {
|
||||
videoJsResolutionSwitcher: {
|
||||
default: 'low', // Default resolution [{Number}, 'low', 'high'],
|
||||
dynamicLabel: true // Display dynamic labels or gear symbol
|
||||
dynamicLabel: true, // Display dynamic labels or gear symbol
|
||||
hls: true
|
||||
}
|
||||
}
|
||||
}, function(){
|
||||
var player = this;
|
||||
window.player = player
|
||||
|
||||
player.src({
|
||||
player.updateSrc({
|
||||
src: '//labs.tvpw.pl/video/hls/tears.m3u8',
|
||||
type: 'application/x-mpegURL'
|
||||
})
|
||||
}, {hls: true})
|
||||
|
||||
player.on('resolutionchange', function(){
|
||||
console.info('Source changed to %s', player.src())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue