From c04b6a85aed6f10ca5e3f1111ab91b2559c8ccae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Velad=20Galv=C3=A1n?= Date: Mon, 11 Nov 2024 17:54:26 +0100 Subject: [PATCH] test: Fix Shaka Player warning (#207) `WARN LOG: 'Player w/ mediaElement has been deprecated and will be removed in v5.0 . We are currently at version v4.11 . Additional information: Please migrate from initializing Player with a mediaElement; use the attach method instead.'` --- tests/tests.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/tests.js b/tests/tests.js index 10db879..3ca54e6 100644 --- a/tests/tests.js +++ b/tests/tests.js @@ -124,12 +124,13 @@ describe('Shaka Streamer', () => { jasmine.DEFAULT_TIMEOUT_INTERVAL = 400 * 1000; }); - beforeEach(() => { + beforeEach(async () => { video = document.createElement('video'); video.muted = true; document.body.appendChild(video); - player = new shaka.Player(video); + player = new shaka.Player(); + await player.attach(video); const retryParameters = { maxAttempts: 5, timeout: 90e3,