diff --git a/src/js/tech/html5.js b/src/js/tech/html5.js index 21d8ec80ae..c75e681286 100644 --- a/src/js/tech/html5.js +++ b/src/js/tech/html5.js @@ -37,6 +37,8 @@ class Html5 extends Tech { const source = options.source; let crossoriginTracks = false; + this.featuresVideoFrameCallback = this.featuresVideoFrameCallback && this.el_.tagName === 'VIDEO'; + // Set the source if one is provided // 1) Check if the source is new (if not, we want to keep the original so playback isn't interrupted) // 2) Check to see if the network state of the tag was failed at init, and if so, reset the source @@ -112,8 +114,6 @@ class Html5 extends Tech { // into a `fullscreenchange` event this.proxyWebkitFullscreen_(); - this.featuresVideoFrameCallback = this.featuresVideoFrameCallback && this.el_.tagName === 'VIDEO'; - this.triggerReady(); } diff --git a/test/unit/tech/html5.test.js b/test/unit/tech/html5.test.js index 816d9397a1..6aed0d58b1 100644 --- a/test/unit/tech/html5.test.js +++ b/test/unit/tech/html5.test.js @@ -1019,7 +1019,10 @@ QUnit.test('featuresVideoFrameCallback is false for Safari DRM', function(assert QUnit.test('featuresVideoFrameCallback is false for audio elements', function(assert) { const el = document.createElement('audio'); - const audioTech = new Html5({el}); + const audioTech = new Html5({ + el, + source: [{src: 'https://example.org/stream.m3u8'}] + }); assert.strictEqual(audioTech.featuresVideoFrameCallback, false, 'Html5 with audio element should not support rvf');