From 0c1f0aabb0833b5c5385b892810135de23df6591 Mon Sep 17 00:00:00 2001 From: Mark Boas Date: Tue, 28 Nov 2023 12:35:44 +0100 Subject: [PATCH 1/2] insert id --- js/hyperaudio-lite.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/js/hyperaudio-lite.js b/js/hyperaudio-lite.js index 1edbf9e..987220f 100644 --- a/js/hyperaudio-lite.js +++ b/js/hyperaudio-lite.js @@ -1,5 +1,5 @@ /*! (C) The Hyperaudio Project. MIT @license: en.wikipedia.org/wiki/MIT_License. */ -/*! Version 2.1.6 */ +/*! Version 2.1.7 */ 'use strict'; @@ -183,7 +183,7 @@ function spotifyPlayer(instance) { window.onSpotifyIframeApiReady = IFrameAPI => { - const element = document.getElementById('hyperplayer'); + const element = document.getElementById(instance.player.id); const extractEpisodeID = (url) => { const match = url.match(/episode\/(.+)$/); @@ -335,6 +335,9 @@ class HyperaudioLite { this.parentElements = this.transcript.getElementsByTagName(this.parentTag); this.player = document.getElementById(mediaElementId); + console.log(mediaElementId); + console.log(this.player); + // Grab the media source and type from the first section if it exists // and add it to the media element. From e4559fca2a8f260022f4fc0298b4633dd110f122 Mon Sep 17 00:00:00 2001 From: Mark Boas Date: Tue, 28 Nov 2023 12:38:28 +0100 Subject: [PATCH 2/2] remove console logs --- js/hyperaudio-lite.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/js/hyperaudio-lite.js b/js/hyperaudio-lite.js index 987220f..ac771f0 100644 --- a/js/hyperaudio-lite.js +++ b/js/hyperaudio-lite.js @@ -335,9 +335,6 @@ class HyperaudioLite { this.parentElements = this.transcript.getElementsByTagName(this.parentTag); this.player = document.getElementById(mediaElementId); - console.log(mediaElementId); - console.log(this.player); - // Grab the media source and type from the first section if it exists // and add it to the media element.