mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-10 08:58:50 +00:00
[RadioMelodieBridge] Fix media content (#4458)
- Fix the audio source with the absolute URL - Fix the pictture enclosure URL (those are already absolute URL)
This commit is contained in:
parent
00a24e2f69
commit
cd4cdcfd65
@ -40,7 +40,7 @@ class RadioMelodieBridge extends BridgeAbstract
|
|||||||
$picture = [];
|
$picture = [];
|
||||||
|
|
||||||
// Get the Main picture URL
|
// 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');
|
$audioHTML = $article->find('audio');
|
||||||
|
|
||||||
// Add the audio element to the enclosure
|
// 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);
|
preg_match('/wavesurfer[0-9]+.load\(\'(.*)\'\)/m', $js->innertext, $urls);
|
||||||
|
|
||||||
// Create the plain HTML <audio> content to play this audio file
|
// 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
|
// Replace the <script> tag by the <audio> tag
|
||||||
$js->outertext = $content;
|
$js->outertext = $content;
|
||||||
|
Loading…
Reference in New Issue
Block a user