MimeType Object---represents a MIME datatype
navigator.mimeTypes[i] navigator.mimeTypes["name"] navigator.mimeTypes.length
A reference to the Plugin object that supports this MIME type, or null, if no installed and enabled plug-in supports it.
A read-only string that specifies a comma-separated list of the common filename extensions associated with this MIME type.
A read-only string that indicates the name of the MIME datatype, such as "text/html" or "video/mpeg".
The MimeType object represents a MIME type (i.e., a data format) supported by the browser. The format may be supported directly by the browser, or may be supported through an external "helper application," or a plug-in for embedded data.
The navigator.mimeTypes array may be indexed numerically, or with the name of the desired MIME type (which is the value of the type property). In order to check which MIME types are supported by the browser, you can loop through each element in the array numerically. Or, if you just want to check whether a specific type is supported, you can write code like the following:
var show_movie =index.html (navigator.mimeTypes["video/mpeg"] != null);
|file: /Techref/language/java/script/definitive/refp_246.htm, 5KB, , updated: 2019/10/14 15:00, local time: 2020/1/29 00:34,
|©2020 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?|
<A HREF="http://www.massmind.org/techref/language/java/script/definitive/refp_246.htm"> [Chapter 21] Reference: MimeType</A>
|Did you find what you needed?|
Welcome to massmind.org!
Welcome to www.massmind.org!