配置 FireFox 以流式传输 .wmv

Configure FireFox to stream .wmv

问题:FireFox 等到下载完成才打开 windows 媒体播放器。

期望的结果:下载开始时打开Windows媒体播放器和流视频。

目前 Chrome 和 IE 正在按预期运行。只有 FireFox 等待下载完成。不确定这是 FF 配置问题还是正在发送 headers。

服务器:NginxPlus

Headers: // 写入 Headers // 通过重定向流式传输视频

    header('Pragma: no-cache');
    header('Content-Type:video/x-ms-wmv');
    header('Content-Disposition: inline; filename=gt.wmv');
    header('Content-Transfer-Encoding: binary');
    header('Cache-Control: no-cache, no-store, must-revalidate');
    header('Pragma: no-cache');
    header('Expires: 0');
    header('X-Accel-Redirect: ' . $orlPath);

TIA

您的 headers 没问题,这似乎是 Firefox 的默认行为。

Normally Mozilla-based browsers deal with multimedia files (for example, .wmv and .mpg files) by first downloading them, and then launching the media player.

来源:2007 年 mozillaZine - Streaming Media 页。

没有不涉及安装一些 third-party 插件 client-side 的替代方案。这些通过将 URL 转发到 external-player 或启用源文件的嵌入(例如:MediaElement.js + Silverlight)来工作。