updateSrc for HLS

This commit is contained in:
Kasper Moskwiak 2016-04-13 23:17:17 +02:00
parent f8218598f6
commit 409007d9d7
2 changed files with 12 additions and 7 deletions

View file

@ -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())