mirror of
https://github.com/videojs/video.js.git
synced 2025-07-13 01:30:17 +02:00
fix: HTML5 tech with audio tag shouldn't use requestVideoFrameCallback (#7778)
This commit is contained in:
@ -114,6 +114,8 @@ class Html5 extends Tech {
|
|||||||
// into a `fullscreenchange` event
|
// into a `fullscreenchange` event
|
||||||
this.proxyWebkitFullscreen_();
|
this.proxyWebkitFullscreen_();
|
||||||
|
|
||||||
|
this.featuresVideoFrameCallback = this.featuresVideoFrameCallback && this.el_.tagName === 'VIDEO';
|
||||||
|
|
||||||
this.triggerReady();
|
this.triggerReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1032,3 +1032,12 @@ QUnit.test('supports getting available media playback quality metrics', function
|
|||||||
window.performance = origPerformance;
|
window.performance = origPerformance;
|
||||||
window.Date = origDate;
|
window.Date = origDate;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
QUnit.test('featuresVideoFrameCallback is false for audio elements', function(assert) {
|
||||||
|
const el = document.createElement('audio');
|
||||||
|
const audioTech = new Html5({el});
|
||||||
|
|
||||||
|
assert.strictEqual(audioTech.featuresVideoFrameCallback, false, 'Html5 with audio element should not support rvf');
|
||||||
|
|
||||||
|
audioTech.dispose();
|
||||||
|
});
|
||||||
|
Reference in New Issue
Block a user