Skip to content

Commit

Permalink
fix: clarify hls option deprecation warning (#1257)
Browse files Browse the repository at this point in the history
Fixes #1256
  • Loading branch information
gkatsev authored Mar 2, 2022
1 parent 0964cb4 commit 211cbe8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/videojs-http-streaming.js
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ class VhsHandler extends Component {
super(tech, videojs.mergeOptions(options.hls, options.vhs));

if (options.hls && Object.keys(options.hls).length) {
videojs.log.warn('Using hls options is deprecated. Use vhs instead.');
videojs.log.warn('Using hls options is deprecated. Please rename `hls` to `vhs` in your options object.');
}

// if a tech level `initialBandwidth` option was passed
Expand Down
4 changes: 2 additions & 2 deletions test/videojs-http-streaming.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ QUnit.test('logs deprecation notice when using hls for options', function(assert
assert.equal(this.env.log.warn.calls, 1, 'warning logged');
assert.equal(
this.env.log.warn.args[0][0],
'Using hls options is deprecated. Use vhs instead.'
'Using hls options is deprecated. Please rename `hls` to `vhs` in your options object.'
);
});

Expand All @@ -440,7 +440,7 @@ QUnit.test('logs deprecation notice when using hls for global options', function
assert.equal(this.env.log.warn.calls, 1, 'warning logged');
assert.equal(
this.env.log.warn.args[0][0],
'Using hls options is deprecated. Use vhs instead.'
'Using hls options is deprecated. Please rename `hls` to `vhs` in your options object.'
);

videojs.options.hls = origHlsOptions;
Expand Down

0 comments on commit 211cbe8

Please sign in to comment.