在mediaelement.js音頻播放器上,我在進度條和'持續時間'指示器上獲得了NaN
,但只有在IE 11,Firefox 26中查看時,一切都可以。這似乎意味着它不是一個服務器問題,但我見過的其他報告說這是事實。Mediaelement.js - 使用IE 11獲得NaN
任何人有任何想法,如果它可能是一個服務器問題,我需要看什麼(Apache服務器)?
從@BiscuitBaker下面的代碼將重現此問題:
$('document').ready(function() {
$('video,audio').mediaelementplayer({
audioWidth: 440,
audioHeight: 30,
// The file contains an audio watermark, so I've set the volume to 0 as I don't want this to be seen as self promotion.
startVolume: 0
});
});
.container {
margin-top: 50px;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<!-- Standard mediaelement.js files, unmodified -->
<link rel='stylesheet' href='http://beta.musicvine.net/wp-content/themes/theMusicVine/library/js/mediaelement/mediaelementplayer.css' type='text/css' media='all' />
<script src="http://beta.musicvine.net/wp-includes/js/mediaelement/mediaelement-and-player.min.js"></script>
<div class="container">
<audio controls src="http://beta.musicvine.net/wp-content/uploads/edd/2015/02/joyful-moments-adi-goldstein-preview.mp3"></audio>
</div>
我也遇到過這個問題 - 在我的情況下,進度條對於非常小的MP3可以正常工作,但似乎會失敗並在大於幾MB的任何內容上生成NaN。 – BiscuitBaker
OP或@BiscuitBaker可以提供[MCVE](https://stackoverflow.com/help/mcve)嗎? –
@ AlexanderO'Mara如果需要,我會給OP一點時間回覆併發佈一個自己。雖然沒有太多可以進入MCVE,但我正在使用mediaelement.js網站上的bog標準實現。 – BiscuitBaker