首页 文章

在mp3文件中查找栏无法正常工作

提问于
浏览
0

我一直在尝试使用默认的html5播放器在浏览器中播放mp3文件 .

http://ujyaaloonline.com/audios/programAudios/1a8fdf5d0433ed581bbcee74836b3305.mp3

音频正在播放,但搜索栏在这里不起作用 . 可能是什么问题 . 请帮忙 .

1 回答

  • 1

    您需要在机器上support byte range requests 're serving the audio. See SoundManager2' Technical Notes on the subject .

    Byte Serving在客户端和服务器之间自动协商,与传统下载相比具有许多优势 . 最值得注意的是,Byte Serving更接近“流媒体”技术,并且一旦持续时间已知,客户端就能够在文件中的任意位置搜索,缓冲和恢复播放 .

    示例请求:

    GET 1a8fdf5d0433ed581bbcee74836b3305.mp3 HTTP/1.1
    Range: bytes=5210604-5275910
    

    预期回应:

    HTTP/1.1 206 Partial Content
    Accept-Ranges: bytes
    Content-length: 65307
    Content-Range: bytes 5210604-5275910/5275911
    Content-Type: audio/mpeg
    
    • 您似乎没有发送206 Partial Content状态 .

    • 您没有发送正确的 Content-Range 响应标头 .

    • 最后,如果客户端发出超出范围的范围请求 - 即,没有任何范围值与资源范围重叠 - 服务器应以416 Requested Range Not Satisfiable状态响应 .

相关问题