mirror of
https://github.com/videojs/video.js.git
synced 2025-07-05 00:58:52 +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:
@ -118,6 +118,8 @@ QUnit.test('should be able to access expected component API methods', function(a
|
||||
assert.ok(comp.clearInterval, 'clearInterval exists');
|
||||
assert.ok(comp.setTimeout, 'setTimeout exists');
|
||||
assert.ok(comp.clearTimeout, 'clearTimeout exists');
|
||||
|
||||
comp.dispose();
|
||||
});
|
||||
|
||||
QUnit.test('should be able to access expected MediaTech API methods', function(assert) {
|
||||
@ -289,4 +291,6 @@ QUnit.test('should extend Component', function(assert) {
|
||||
const noMethods = new NoMethods({});
|
||||
|
||||
assert.ok(noMethods.on, 'should extend component with no methods or constructor');
|
||||
|
||||
myComponent.dispose();
|
||||
});
|
||||
|
Reference in New Issue
Block a user