Sitecore 媒体库与 iOS 不兼容?

发布于 2024-11-17 21:50:51 字数 1461 浏览 3 评论 0原文

我在 iOS 设备上播放正确编码的视频时遇到问题。以下是一些背景/信息:

  • 我们正在使用 jwPlayer 进行播放
  • 视频通过 flash 和 HTML5 播放效果非常好
  • 视频是通过 zencoder 的默认设置进行编码
  • 我们正在从适用于 iOS 设备的同一服务器提供视频(但该网站不是 Sitecore)
  • 通过 dropbox 同步时,视频在我的 iPad 上播放

通过一些调查和 Zencoder 优秀支持人员的帮助,我们认为问题可能与标题有关(顶部是不起作用的视频,底部工作正常)

$ curl -I http://fraternity.computol.com/~/media/Fraternity/mp4/leadership_zen.mp4
HTTP/1.1 200 OK
Date: Wed, 29 Jun 2011 16:30:29 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Content-Disposition: attachment; filename="leadership_zen.mp4"
Transfer-Encoding: chunked
Set-Cookie: fraternity#sc_wede=1; path=/
Cache-Control: public, max-age=604800
Expires: Wed, 06 Jul 2011 16:30:29 GMT
Last-Modified: Wed, 29 Jun 2011 16:28:26 GMT
ETag: 9cba9593424645bfb372a01bfe522f97
Content-Type: application/octet-stream

$ curl -I http://www.rhythmonthevine.org/videos/SHR_ROTV_Dierks_v02.mp4
HTTP/1.1 200 OK
Content-Length: 16091772
Content-Type: video/mpeg
Last-Modified: Thu, 24 Mar 2011 14:05:49 GMT
Accept-Ranges: bytes
ETag: "8374ff932ceacb1:335c"
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Date: Wed, 29 Jun 2011 16:30:32 GMT

:任何人有任何想法这个问题是否真的与标题相关?如果是这样,有没有办法让 sitecore 正确地为媒体提供服务?

编辑:另外,如果有什么区别的话,我们使用的是 IIS6。

编辑:特别麻烦的差异是:

  • 传输编码(不起作用的那个是分块的)
  • 内容长度(顶部视频中缺少)
  • 内容类型(我认为这是一个大问题。我在 sitecore 中有正确的 mime 类型设置- 我不知道 Sitecore 不提供服务)

I am running into an issue playing a properly encoded video on an iOS device. Here is some background/information:

  • We are using jwPlayer for playback
  • The video plays great through flash and HTML5
  • The video was encoded through zencoder's default settings
  • We are serving video from the same server which works on iOS devices (but that site is not Sitecore)
  • The video plays on my iPad when synced through dropbox

Through some investigation and some help from the great support staff at Zencoder, we think the issue may be related to the headers (top is the video that does not work, bottom works fine):

$ curl -I http://fraternity.computol.com/~/media/Fraternity/mp4/leadership_zen.mp4
HTTP/1.1 200 OK
Date: Wed, 29 Jun 2011 16:30:29 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Content-Disposition: attachment; filename="leadership_zen.mp4"
Transfer-Encoding: chunked
Set-Cookie: fraternity#sc_wede=1; path=/
Cache-Control: public, max-age=604800
Expires: Wed, 06 Jul 2011 16:30:29 GMT
Last-Modified: Wed, 29 Jun 2011 16:28:26 GMT
ETag: 9cba9593424645bfb372a01bfe522f97
Content-Type: application/octet-stream

$ curl -I http://www.rhythmonthevine.org/videos/SHR_ROTV_Dierks_v02.mp4
HTTP/1.1 200 OK
Content-Length: 16091772
Content-Type: video/mpeg
Last-Modified: Thu, 24 Mar 2011 14:05:49 GMT
Accept-Ranges: bytes
ETag: "8374ff932ceacb1:335c"
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Date: Wed, 29 Jun 2011 16:30:32 GMT

Does anyone have any idea whether this issue is actually header related? If so, is there a way to get sitecore to serve the media properly?

Edit: Also, if it makes any difference at all, we are on IIS6.

Edit: The particularly troublesome differences are:

  • Transfer-Encoding (the one that is not working is chunked)
  • Content length (missing on the top video)
  • Content type (I think this is the big one. I have the proper mime type setup in sitecore - I don't what Sitecore is not serving it)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

笑红尘 2024-11-24 21:50:51

我在 SDN 上发布了一个类似的问题。这是关于让视频在 iPad 上播放并从媒体库。有用的响应是 Sitecore 媒体请求 HTTP 处理程序 (sitecore_media.ashx) 以块 (HTTP Transport, Transfer-Encoding: chunked) 形式提供媒体响应,这与Apple 协议(响应必须以一大块形式传递给客户端)。您可能想尝试看看是否可以覆盖 MediaRequestHandler。

I had a similar issue which I posted on the SDN. It was about getting videos to play on the iPad and be served from the Media Library. The useful response was that the Sitecore media request HTTP handler (sitecore_media.ashx) delivers the media responses in chunk (HTTP transport, Transfer-Encoding: chunked), which conflicts with the Apple protocol (response must be delivered in one chunk to the client). You may want to try to see if you can override the MediaRequestHandler.

爺獨霸怡葒院 2024-11-24 21:50:51

我遇到了同样的问题,并且能够通过一些事情解决它:

  1. 我将 mime-type 添加到 MimeType.config,如下所示:

    video/mp4
    
  2. 进入媒体库中的项目,并将该项目的 Mime 类型更改为“video/mp4”。< /p>

  3. 进入服务器,删除“C:\inetpub\wwwroot\Sitecore62\Website\App_Data\MediaCache”下的所有文件

我在 Curl 下有不同的标头值,但错误的 mime 类型与您的一致。一旦我完成了上述所有操作,mime 类型就正确返回并且视频播放了 - HTML如下:

<video class="video-js" width="640" height="360"  autoplay controls loop>
  <source src="http://<server>/~/media/client/videos/video.mp4" type="video/mp4" />
</video>

I ran into the same issue, and was able to get past it through a few things:

  1. I added the mime-type to MimeType.config as below:

    <mediaType extensions="mp4"><mimeType>video/mp4</mimeType></mediaType>
    
  2. Went into the item in the Media Library, and changed the Mime Type of the Item to be "video/mp4".

  3. Went into the server, and deleted all files under "C:\inetpub\wwwroot\Sitecore62\Website\App_Data\MediaCache"

I had different header values under Curl, but the wrong mime-type was consistent with yours. Once I did all of the above the mime-type was returned properly and the video played - HTML below:

<video class="video-js" width="640" height="360"  autoplay controls loop>
  <source src="http://<server>/~/media/client/videos/video.mp4" type="video/mp4" />
</video>
北斗星光 2024-11-24 21:50:51

我给了 Mark +1,但我也会提供一个替代方案,您能否通过在 CDN(例如 Akamai)上镜像提供内容来解决这个问题,或者将其完全托管在视频 CDN(例如运行 (http://www.longtailvideo.com/bits-on-the-run/)?

这可能会导致更低的带宽成本和更好的性能,而不是不断地从 Sitecore 提供视频。

I gave Mark a +1 but I'll offer an alternative as well, could you work around the issue by serving the content through mirroring on a CDN (such as Akamai) or host it entirely on a video CDN (such as Bits on the Run (http://www.longtailvideo.com/bits-on-the-run/)?

This would likely result in lower bandwidth cost and better performance as well, rather than constantly serving video from Sitecore.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文