When installing the player.hls deprecation accessor, use options.tag,
not options.playerId. This fixes the case where the DOM element has been created, the player has been initialized, but has not yet been attached to the document. In this scenario, the string id is passed to the videojs constructor, and it is not able to do a getElementById call correctly. This can happen when the new html(with an embedded <video>) has been created, but the new DOM structure is having a fancy style transition, where the old DOM is attached, the new DOM is not, but the height on the new/old is needed, and a fancy slide up/down is being done between the 2 heights.
Showing
1 changed file
with
2 additions
and
2 deletions
... | @@ -282,8 +282,8 @@ class HlsHandler extends Component { | ... | @@ -282,8 +282,8 @@ class HlsHandler extends Component { |
282 | 282 | ||
283 | // tech.player() is deprecated but setup a reference to HLS for | 283 | // tech.player() is deprecated but setup a reference to HLS for |
284 | // backwards-compatibility | 284 | // backwards-compatibility |
285 | if (tech.options_ && tech.options_.playerId) { | 285 | if (tech.options_ && tech.options_.tag) { |
286 | let _player = videojs(tech.options_.playerId); | 286 | let _player = videojs(tech.options_.tag); |
287 | 287 | ||
288 | if (!_player.hasOwnProperty('hls')) { | 288 | if (!_player.hasOwnProperty('hls')) { |
289 | Object.defineProperty(_player, 'hls', { | 289 | Object.defineProperty(_player, 'hls', { | ... | ... |
-
Please register or sign in to post a comment