[RadioMelodieBridge] Fix media content

- Fix the audio source with the absolute URL
- Fix the pictture enclosure URL (those are already absolute URL)
This commit is contained in:
sysadminstory 2025-02-27 19:29:46 +01:00
parent 00a24e2f69
commit 6931e897be

View File

@ -40,7 +40,7 @@ class RadioMelodieBridge extends BridgeAbstract
$picture = [];
// Get the Main picture URL
$picture[] = self::URI . $article->find('figure[class*=photoviewer]', 0)->find('img', 0)->src;
$picture[] = $article->find('figure[class*=photoviewer]', 0)->find('img', 0)->src;
$audioHTML = $article->find('audio');
// Add the audio element to the enclosure
@ -123,7 +123,7 @@ class RadioMelodieBridge extends BridgeAbstract
preg_match('/wavesurfer[0-9]+.load\(\'(.*)\'\)/m', $js->innertext, $urls);
// Create the plain HTML <audio> content to play this audio file
$content = '<audio style="width: 100%" src="' . $urls[1] . '" controls ></audio>';
$content = '<audio style="width: 100%" src="' . self::URI . $urls[1] . '" controls ></audio>';
// Replace the <script> tag by the <audio> tag
$js->outertext = $content;