我有一個主題問題。經過一番調查後,我確定這是因爲在IE情況下爲空的TimeRangers
對象,並且在Chrome/FF/etc
中填滿了對象。jPlayer可搜索不能在IE中工作
Firsly,我發現IE不發送Range
請求,而FF/Chrome做。
其次,我發現IE不接受沒有Content-Disposition
頭文件。
我解決了這兩個問題(我添加了內容處置,並且總是包含Accept-Range
頭是客戶端是IE),但是音頻仍然不起作用。
這裏是JS:
$('#jquery_jplayer')
.jPlayer({
cssSelectorAncestor: "#jp_container",
supplied: 'mp3',
solution: 'html',
useStateClassSkin: true,
autoBlur: false,
smoothPlayBar: true,
keyEnabled: true,
remainingDuration: true,
toggleDuration: true,
wmode: "window"
});
鉻請求/響應:
Host: localhost:8080
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache
Accept-Encoding: identity;q=1, *;q=0
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.59 Safari/537.36
Accept: */*
Referer: http://localhost:8080/Object?objectId=299a1dee-8d2a-4225-8c19-0d8ff73920e2
Accept-Language: ru,en-US;q=0.8,en;q=0.6
Range: bytes=0-
HTTP/1.1 206 Partial Content
Date: Thu, 20 Oct 2016 15:09:02 GMT
Content-Length: 322450
Content-Type: application/octet-stream
Content-Range: bytes 0-322449/322450
Server: Kestrel
Content-Disposition: attachment; filename=file.mp3; filename*=UTF-8''file.mp3
IE:
Accept: */*
Accept-Encoding: gzip, deflate
Accept-Language: en-US, en; q=0.7, ru; q=0.3
Cache-Control: no-cache
Connection: Keep-Alive
GetContentFeatures.DLNA.ORG: 1
Host: localhost:8080
Referer: http://localhost:8080/Object?objectId=299a1dee-8d2a-4225-8c19-0d8ff73920e2
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko
Content-Disposition: attachment; filename="file.mp3"; filename*=UTF-8''file.mp3
Content-Length: 322450
Content-Range: bytes 0-322449/322450
Content-Type: application/octet-stream
Date: Thu, 20 Oct 2016 14:56:08 GMT
Server: Kestrel
響應是在兩種情況下是相同的,但是它適用於鍍鉻/ FF並不適用於IE。
我錯過了什麼嗎?我配置了jPlayer,服務器,標題,一切......但仍無法在IE中播放音頻。
的Windows 10 IE11下測試時,Chrome 54
測試 - 在以下MP3工作:http://jplayer.org/audio/mp3/Miaow-07-Bubble.mp3
但不在以下MP3:http://www.filedropper.com/file_259
這是僅與從您的服務器的文件?怎麼樣尋找(點擊播放欄)與此文件:http://jplayer.org/audio/mp3/Miaow-07-Bubble.mp3 –
好主意。是的,這個文件在IE中工作正常。唯一的區別 - 不同的文件。你的文件正在工作,而我的文件沒有。其餘的都是一樣的。 –
你必須在IE頭文件中丟失一些東西,然後,(我不知道是什麼)。 –