使用 Brightcove 的 HTML5 视频

发布于 2024-12-17 08:52:28 字数 683 浏览 3 评论 0原文

我目前有一个可用的 Brightcove 智能播放器实现,默认使用 Flash,并在不支持 Flash 的情况下使用 HTML5 后备(请参阅:iOS)。我想扭转这一局面:更喜欢 HTML5 视频,并使用 Flash 作为后备。 这可能吗?如果可能的话,如何实现? Brightcove 似乎完全错过了提供 HTML5 选项的重点,将其用作后备而不是首选格式。

此外,尽管 Brightcove 宣布18个月前计划支持WebM以及H.264,看来HTML5 播放器仍然仅支持 H.264 。 Firefox 不能(并且可能永远不会)支持 H.264 专利(并且,IMO,意识形态)原因。 Firefox 的使用太过广泛,不容忽视。 有没有办法通过 Brightcove 向 Firefox 提供 WebM HT​​ML5 视频?

I currently have a working Brightcove Smart Player implementation, with Flash as the default and an HTML5 fallback where Flash is not supported (read: iOS). I would like to reverse this: prefer HTML5 video, and use Flash as the fallback.
Is this possible, and if so, how? Brightcove seems to have entirely missed the point of providing an HTML5 option by using it as the fallback instead of the preferred format.

Additionally, although Brightcove announced plans to support WebM as well as H.264 18 months ago, it seems that the HTML5 player still only supports H.264. Firefox can't (and likely will never) support H.264 for patent (and, IMO, ideological) reasons. Firefox is used far too widely to leave out in the cold. Is there a way to serve WebM HTML5 videos to Firefox with Brightcove?

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

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

发布评论

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

评论(5

匿名。 2024-12-24 08:52:28

您可以使用用于在页面中嵌入播放器的对象标记中的以下参数来强制 SmartPlayer 以 HTML5 方式显示:

<param name="forceHTML" value="true" />

以下 Brightcove 白皮书解释了他们默认使用 Flash 并回退到 HTML5 的原因:

http://blog.brightcove.com/en/2011/01/html5-video-facts-fiction-new-whitepaper

总而言之,他们的论点是 HTML5 视频的局限性(如2011 年 1 月)意味着,为了向其发布商提供某些关键功能,Brightcove 需要默认使用 Flash,并针对某些移动设备回退到 HTML5(尽管这对某些人来说可能听起来违反直觉)。他们引用的 HTML5 视频的局限性在于以下几个方面:

  • 分析
  • 广告
  • 内容保护
  • 实时流媒体
  • 字幕

You can force a SmartPlayer to display in HTML5 using the following parameter in the object tag used to embed the player in the page:

<param name="forceHTML" value="true" />

The following Brightcove whitepaper explains their reasoning for defaulting to Flash and falling back to HTML5:

http://blog.brightcove.com/en/2011/01/html5-video-facts-fiction-new-whitepaper

To summarise, their argument is that limitations in HTML5 video (as of January 2011) mean that, in order to deliver certain key features to their publishers, Brightcove need to default to Flash and fallback to HTML5 for certain mobile devices (as counter intuitive as that may sound to some). The limitations of HTML5 video they cite are in the following areas:

  • analytics
  • advertising
  • content protection
  • live streaming
  • captions
别理我 2024-12-24 08:52:28

伙计们,确认一下,它是:

<param name="forceHTML" value="true" />

而不是 forceHTML5

Chaps, to confirm, it's:

<param name="forceHTML" value="true" />

And not forceHTML5.

情未る 2024-12-24 08:52:28

简而言之,不,我不这么认为。

据我了解,Brightcove 为任何支持 Flash 的浏览器(所有桌面浏览器)提供了 Flash 播放器。 Flash 支持 H.264,但不支持 WebM。此外,大多数移动浏览器都是WebKit,因此它们支持H.264。因此,显然从商业角度来看,无论他们过去怎么说,他们都没有动力支持 WebM 编码。

更多信息:http://support.brightcove.com/en/docs/使用智能播放器 API

In short, no I don't think so.

From what I understand, Brightcove delivers a Flash player to any browser that supports it (all desktop browsers). Flash supports H.264, not WebM. Furthermore, most mobile browsers are WebKit, so they support H.264. So obviously from a business standpoint they have little incentive to support encoding in WebM, regardless of what they said in the past.

More info: http://support.brightcove.com/en/docs/using-smart-player-api

酸甜透明夹心 2024-12-24 08:52:28

自 2012 年 7 月 24 日起,如果安装了 Flash,forceHtml5 将不会强制使用 HTML5。

但是,我发现了一个 hack:如果您覆盖 Brightcove.checkFlashSupport 函数以及使用@net.uk.sweet提到的“forceHTML5”参数,您可以强制它。例如:

if(brightcove.checkHtmlSupport()){
     brightcove.checkFlashSupport = function(){ return null; };
}

显然,如果 Brightcove 更改其代码,此黑客攻击可能会失败,因此使用它需要您自担风险。

As of 7/24/2012, forceHtml5 won't force HTML5 if Flash installed.

However, I found a hack: If you overwrite the brightcove.checkFlashSupport function as well as use the "forceHTML5" parameter mentioned by @net.uk.sweet, you can force it. For instance:

if(brightcove.checkHtmlSupport()){
     brightcove.checkFlashSupport = function(){ return null; };
}

Clearly, this hack could fail if Brightcove changes their code, so use it at your own risk.

半步萧音过轻尘 2024-12-24 08:52:28

尽管如此,向对象添加参数不起作用,您仍然可以按照 Brightcove 支持的建议轻松做到这一点 http://support.brightcove.com/en/video-cloud/solutions/testing-html-players-desktop


只需修改您的网址,看起来像

http://<视频的 URL>/?forceHTML=true

Nevertheless adding param to object doesn't work, you can still easily do that as suggested by brightcove support http://support.brightcove.com/en/video-cloud/solutions/testing-html-players-desktop


Just modify your url too look like

http://<URL to the video>/?forceHTML=true

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