What is the video/x-webm
MIME type? I know that there is the video/webm
MIME type which refers to the WebM format but what about the x-
prefix? What does it mean?
I wonder because I noticed that the current Chrome and Firefox versions unable to handle such type in the type
attrbiute of the source
tag:
<video controls>
<source src="http://ift.tt/2bLJjo9" type="video/x-webm" />
</video>
But if I change video/x-webm
to video/webm
it works as expected:
<video controls>
<source src="http://ift.tt/2bLJjo9" type="video/webm" />
</video>
Seems like I need to use the video/webm
type but my OS returns video/x-webm
when I pass such file to the MimeTypes
from the Python's standard library:
from mimetypes import MimeTypes
import urllib
url = urllib.pathname2url('path/to/file.webm')
mime_type = MimeTypes().guess_type(url)
print(mime_type) # ('video/x-webm', None)
Aucun commentaire:
Enregistrer un commentaire