Joe Forbes
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
2 additions and
2 deletions
-
src/videojs-http-streaming.js
-
test/videojs-http-streaming.test.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; |
|
|
|
} |
|
|
|
|
|
@ -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; |
|
|
|
}); |
|
|
|