rename getHls to getVhs
adds deprecation warning and allows for backwards compatibility
This commit is contained in:
parent
d6aa72ed94
commit
db2e1aafb1
1 changed files with 14 additions and 4 deletions
|
@ -50,8 +50,8 @@ class HlsQualitySelectorPlugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
updatePlugin() {
|
updatePlugin() {
|
||||||
// If there is the HLS tech
|
// If there is the VHS tech
|
||||||
if (this.getHls()) {
|
if (this.getVhs()) {
|
||||||
// Show quality selector
|
// Show quality selector
|
||||||
this._qualityButton.show();
|
this._qualityButton.show();
|
||||||
} else {
|
} else {
|
||||||
|
@ -61,11 +61,21 @@ class HlsQualitySelectorPlugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns HLS Plugin
|
* Deprecated, returns VHS plugin
|
||||||
*
|
*
|
||||||
* @return {*} - videojs-hls-contrib plugin.
|
* @return {*} - videojs-http-streaming plugin.
|
||||||
*/
|
*/
|
||||||
getHls() {
|
getHls() {
|
||||||
|
console.warn('hls-quality-selector: WARN: Using getHls options is deprecated. Use getVhs instead.')
|
||||||
|
return this.getVhs();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns VHS Plugin
|
||||||
|
*
|
||||||
|
* @return {*} - videojs-http-streaming plugin.
|
||||||
|
*/
|
||||||
|
getVhs() {
|
||||||
return this.player.tech({ IWillNotUseThisInPlugins: true }).vhs;
|
return this.player.tech({ IWillNotUseThisInPlugins: true }).vhs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue