Commit d2eca2b2 authored by yPhil's avatar yPhil
Browse files

Still testing mediaRSS support in Mozilla (Chrome OK)

parent 2acf2dbc
Pipeline #394230 passed with stage
in 39 seconds
......@@ -396,37 +396,14 @@ PTL.feed = {
imageUrl = item.enclosures[0].url;
}
console.log('JSON.stringify(item.enclosures): %s (%s)', JSON.stringify(item.enclosures));
if (item.enclosures[0].url && item.enclosures[0].url.match(/\.(ogg|mp3)$/)) {
var audioPlayer = document.createElement('audio');
audioPlayer.id = 'audio-player';
audioPlayer.controls = 'controls';
audioPlayer.src = item.enclosures[0].url;
audioPlayer.type = item.enclosures[0].type;
// var $audioPlayer = $('<div>');
// $audioPlayer.html('<audio id="audio-player" controls="controls" src="' + item.enclosures[0].url + '" type="audio/ogg">');
// console.log('audio/mp3: %s (%s)', MediaSource.isTypeSupported('video/mp4'));
// console.log('item.enclosures: %s (%s)', JSON.stringify(item.enclosures[0].type), JSON.stringify(item.enclosures[0].url));
// if (JSON.stringify(item.enclosures[0].type) === 'audio/mpeg') {
// console.log('plop!: %s (%s)');
// }
// if (item.enclosures[0].url.match(/\.(ogg)$/)) {
// console.log('ogg!: %s (%s)');
// soundPlayer.type = 'application/ogg';
// } else {
// console.log('mpeg!: %s (%s)');
// soundPlayer.type = 'audio/mpeg';
// }
audioyPlayer.type = item.enclosures[0].type;
// $itemDiv.append($audioPlayer);
$itemDiv.append(audioPlayer);
$soundLink
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment