Browse Source

ignore: update deprecation warning (#117)

pull/114/merge
Joe Forbes 7 years ago
committed by GitHub
parent
commit
6c075f4752
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/videojs-http-streaming.js
  2. 2
      test/videojs-http-streaming.test.js

2
src/videojs-http-streaming.js

@ -271,7 +271,7 @@ class HlsHandler extends Component {
if (!_player.hasOwnProperty('hls')) {
Object.defineProperty(_player, 'hls', {
get: () => {
videojs.log.warn('player.hls is deprecated. Use player.tech_.hls instead.');
videojs.log.warn('player.hls is deprecated. Use player.tech().hls instead.');
tech.trigger({ type: 'usage', name: 'hls-player-access' });
return this;
}

2
test/videojs-http-streaming.test.js

@ -113,7 +113,7 @@ QUnit.test('deprecation warning is show when using player.hls', function(assert)
let hls = this.player.hls;
assert.equal(hlsPlayerAccessEvents, 1, 'an hls-player-access event was fired');
assert.equal(warning, 'player.hls is deprecated. Use player.tech_.hls instead.', 'warning would have been shown');
assert.equal(warning, 'player.hls is deprecated. Use player.tech().hls instead.', 'warning would have been shown');
assert.ok(hls, 'an instance of hls is returned by player.hls');
videojs.log.warn = oldWarn;
});

Loading…
Cancel
Save