1
0
mirror of https://github.com/videojs/video.js.git synced 2025-11-29 23:07:51 +02:00

feat: playerresize event in all cases (#4864)

Use ResizeObserver when available for better and more performant resizing information, otherwise, fall back to a throttled resize event on an iframe that's the size of the player.
Allows a video.js user to disable this by setting resizeManager: false as an option since the component will not be initialized.

Add a debounce util.

This reverts #4800 (e0ed0b5) because we end up getting two playerresize events with the dimension methods now.
This commit is contained in:
Gary Katsevman
2018-01-30 13:26:21 -05:00
committed by GitHub
parent 6a0057716b
commit 9ceb4e4fe0
17 changed files with 436 additions and 60 deletions

View File

@@ -33,6 +33,7 @@ QUnit.test('should place title list item into ul', function(assert) {
assert.ok(titleElement.innerHTML === 'TestTitle', 'title element placed in ul');
menuButton.dispose();
player.dispose();
});
@@ -71,5 +72,6 @@ QUnit.test('clicking should display the menu', function(assert) {
assert.equal(menuButton.menu.hasClass('vjs-lock-showing'), true, 'enable() allows clicking to show the menu');
menuButton.dispose();
player.dispose();
});