canPlayType之间的差异可能也可能是输出 [英] Difference between canPlayType maybe and probably output

查看:105
本文介绍了canPlayType之间的差异可能也可能是输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个视频嗅探框架,我必须嗅探不同浏览器的HTML5视频播放功能。为此,我使用了 canPlayType()方法我有三个可能的结果:

I am creating a Video Sniffing Framework where I have to sniff different browsers' HTML5 Video playing capability. For that I used the canPlayType() method which is giving me three possible results:


  1. 空字符串(当无法运行视频时)

  2. 也许

  3. 可能

我需要知道可能之间的确切区别和可能。请让我知道是否有人可以解决我的困惑。在此先感谢。

I need to know the exact difference between "maybe" and "probably". Please let me to know if anyone can resolve my confusion. Thanks in advance.

推荐答案

可能表示浏览器可以播放媒体类型描述。 也许表示类型可以播放。通常,这是因为所描述的媒体类型不够具体,无法做出决定。

probably means that the browser can play the media type described. maybe means that the type might be playable. Usually, this is because the media type described is not specific enough to make a decision.

例如,类型 audio / ogg 可能是也可能不可播放,因为Ogg是一种容器类型,可以包含几种不同的编解码器。 Vorbis Opus 是两个可以包含Ogg的编解码器。一般来说,浏览器播放Ogg文件的能力与浏览器播放Vorbis或Opus编解码器的能力无关,因此无法说明它是否可以播放您的Ogg文件。

For example, the type audio/ogg may or may not be playable, because Ogg is a container type that could contain several different codecs. Vorbis and Opus are two Ogg-containable codecs. A browser's ability to play Ogg files in general says nothing about the browser's ability to play Vorbis or Opus codecs, so it can't say whether it can play your Ogg file.

如果您询问具有 audio / ogg的特定编解码器; codecs = vorbis ,然后浏览器可以确定它是否可以播放该类型。

If you ask about a specific codec with audio/ogg; codecs=vorbis, then the browser can say for sure whether it can play that type.

进行类比:假设你问我是否我能开你的船。我擅长驾驶小型快艇,但我无法驾驶一艘大型游轮。我必须回答你能开我的船吗?的问题。与可能,因为你没有告诉我究竟是什么类型的船。

To make an analogy: suppose you ask me if I am able to drive your boat. I am good at driving tiny speedboats, but I cannot drive a massive cruise boat. I must answer the question "Can you drive my boat?" with "Maybe," because you haven't told me exactly what type of boat it is.

这篇关于canPlayType之间的差异可能也可能是输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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