Closed eatradish closed 4 years ago
Do you mean no sound output by 'cannot be played'? I tried the url you provided in Firefox and it plays fine.
CC, this video to reproduce the problem 2020-06-19 15-31-39.zip
Thanks. Could you share a bit more about the Firefox version and Shikwasa config? Any error in console?
Firefox version: 77.0.1 (64bit, Windows 10 2004)
shikwasa config:
<head>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/shikwasa@2.0.0/dist/shikwasa.min.css">
</head>
<body>
<script src="https://cdn.jsdelivr.net/npm/shikwasa@2.0.0/dist/shikwasa.min.js"></script>
<div class="element-of-your-choice">
<!-- this is where the player will be injected -->
</div>
<script>
const player = new Shikwasa({
container: () => document.querySelector('.element-of-your-choice'),
audio: {
title: 'Hello World!',
artist: 'Shikwasa FM',
cover: '/favicon.png',
src: '/mp3/1.mp3',
},
});
</script>
</body>
I seem to see some errors:
媒体资源 http://localhost:4000/mp3/1.mp3 无法被解码。 Podcast-test
媒体资源 http://localhost:4000/mp3/1.mp3 未能解码,错误:Error Code: NS_ERROR_DOM_MEDIA_MEDIASINK_ERR (0x806e000b)
Details: OnMediaSinkAudioError
Can be reproduced at https://buzaichang.xyz/episodes/four-women :
媒体资源 https://r.typlog.com/eyJzIjo4NjgsImUiOjI0OTAsInAiOjIsInUiOiI…yMY0MbhUaXQs5My6DBbZiHAHro/buzaichang/8407868990_1283045.mp3 无法被解码。 four-women
媒体资源 https://r.typlog.com/eyJzIjo4NjgsImUiOjI0OTAsInAiOjIsInUiOiI…yMY0MbhUaXQs5My6DBbZiHAHro/buzaichang/8407868990_1283045.mp3 未能解码,错误:Error Code: NS_ERROR_DOM_MEDIA_MEDIASINK_ERR (0x806e000b)
Details: OnMediaSinkAudioError
I tried Firefox 77.0.1 with Windows 10 with no problem, but there must be something wrong. It seems the audio file cannot be properly decoded. Can you remove Shikwasa completely from the code and add an HTML5 audio element with the same audio source?
Something like this:
const audio = new Audio()
document.body.append(audio)
audio.src = '...'
It seems that setting "严格" to "标准" will solve the problem. Thanks!
The blockage is likely caused by the media source. Have fun playing with Shikwasa!
I tried using shikwasa on my blog and found that the podcast cannot be played under Firefox, but it works well on Edge (chromium), I tried on another website that uses shikwasa (https://buzaichang.xyz/episodes/four-women) tried it and found that the problem was also reproduced.