在mp3文件寻找酒吧不工作 [英] Seek bar in mp3 file not working

查看:99
本文介绍了在mp3文件寻找酒吧不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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



音频播放,但寻求酒吧不在这里工作。可能是什么问题。请帮助。

解决方案

您需要支持请求音频的机器上的字节范围请求。请参阅SoundManager2的关于此主题的技术说明


字节服务在客户端和服务器之间自动协商,并且提供了许多优于传统下载的优点。最值得注意的是,Byte Serving更接近于流媒体技术,可以让客户端在文件的任意位置搜索,缓存和恢复播放。

示例请求:

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

预期回应:

  HTTP / 1.1 206部分内容
接受范围:字节
内容长度:65307
内容范围:字节5210604-5275910 / 5275911
Content-Type:audio / mpeg




  1. 您看起来不像发送 206部分内容 状态。

  2. 您没有发送正确的 Content-Range 响应标题。

  3. 最后,如果客户端发出超出范围的范围请求,即没有范围值o verlap资源的范围 - 服务器应该用一个 416请求范围不满足 状态。


I have been trying to play the mp3 file in browser using default html5 player.

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

Audio is playing but the seek bar is not working here. What might be the problem. Please help.

解决方案

You need to support byte range requests on the machine from which you're serving the audio. See SoundManager2's Technical Notes on the subject.

Byte Serving is automatically negotiated between client and server, and offers a number of advantages over traditional downloads. Most notably, Byte Serving is closer to a "streaming" technology and enables clients to seek, buffer and resume playback at arbitrary positions within a file once the duration is known.

Example Request:

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

Expected Response:

HTTP/1.1 206 Partial Content
Accept-Ranges: bytes
Content-length: 65307
Content-Range: bytes 5210604-5275910/5275911
Content-Type: audio/mpeg

  1. You don't appear to be sending the 206 Partial Content status.
  2. You're not sending a proper Content-Range response header.
  3. Finally if the client makes a range request that is out of bounds—that is, none of the range values overlap the extent of the resource—the server should respond with a 416 Requested Range Not Satisfiable status.

这篇关于在mp3文件寻找酒吧不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆