1

I have a subject issue. After little investigation I determined that it's because of TimeRangers object which is empty in IE case, and is fullfilled in Chrome/FF/etc.

Firsly, I found that IE does not send Range request, while FF/Chrome does.

Secondly, I found that IE does not accept file without Content-Disposition header.

I fixed both issues (I added content-disposition and always including Accept-Range header is client is IE), but audio is still not working.

Here is 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"
    });

Chrome request/response:

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

Response is the same in both cases, but it works for Chrome/FF and doesn't for IE.

Am I missing something? I configured jPlayer, server, headers, everything... But still unable to play audio in IE.

Tested under Windows 10 IE11, Chrome 54


Tested - working on following MP3:http://jplayer.org/audio/mp3/Miaow-07-Bubble.mp3

But doesn't on following MP3: http://www.filedropper.com/file_259

Alex Zhukovskiy
  • 9,565
  • 11
  • 75
  • 151
  • 1
    Is this only with files from your server? What about seeking (clicks on the play bar) with this file: http://jplayer.org/audio/mp3/Miaow-07-Bubble.mp3 – Martin Dawson Oct 20 '16 at 15:55
  • Good idea. Yes, this file works fine in IE. The only difference - different files. Your file is working while mine doesn't. The rest is the same. – Alex Zhukovskiy Oct 20 '16 at 16:22
  • You must be missing something in the headers for IE then, (I don't know what though). – Martin Dawson Oct 20 '16 at 16:25
  • @MartinMazzaDawson there could be something in MP3 headers themselfs, becuase On server I just did `private IActionResult PrepareStreamResponse(Stream fullContentStream, long size) { var client = new HttpClient(); var result = client.GetByteArrayAsync("http://jplayer.org/audio/mp3/Miaow-07-Bubble.mp3").GetAwaiter().GetResult(); return this.Range(new MemoryStream(result, false), "file.mp3"); }`, so I completly ignore input stream parameter and return your sample MP3 instead... And it works very well. – Alex Zhukovskiy Oct 20 '16 at 16:28
  • Well, I found a problem: it was a WAV file which had invalid extension. FF/Chrome handled this situtation properly (as well as my desktop audio player), but IE doesn't. No magic here, just another invalid header issue. – Alex Zhukovskiy Oct 21 '16 at 08:59

1 Answers1

0

Answer is that file was corrupted. Other browsers was fixing it under cover, but IE is only one who just gives up and do not playing file at all. So if you encounter the same problem check first that file is valid.

Alex Zhukovskiy
  • 9,565
  • 11
  • 75
  • 151