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:
@@ -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();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user