开发者

Embed type=application in html means?

Can someone please explain what does the following line of code exactly do? If I were to build my own Unity3D that exports a similar kind of applications for the browser, what should I do? E.g. should I register somewhere the type of these applications?

<embed type="application/vnd.unity" src="webplayer.unity3d">

This line belongs to this website http://unity3d.com/gallery/live-demos/index.html#bootcamp and is usually encountered for browser applications that have to use native computer resources. These apps are not Flash nor Javascr开发者_如何学Cipt.

If I wanted to do that for my own software what process should I follow?

If someone could shed some light on that, it would be much appreciated!


The <embed> tag is used for adding applets to a page and is specific to Mozilla browsers.

The attributes of the tag depend on what exactly is being embedded (and because of this it's not included in HTML standards). In a Java applet for example, the version of the JRE that supports the MIME type defined in type will be used to run your applet.

The src attribute indicates the location of a file located somewhere other than the webserver (for example, downloaded by the user as a plugin) that is needed to run your applet.

Essentially, the tag indicates that the embedded file is a Unity app and once the user installs the plugin, will require the Unity 3D web player to launch. The link in the first part of this post has some examples for embedding Java apps (including how to do so and support other browsers), and the process is not dissimilar for other types of apps.


This is a MIME type indeed and for someone to use it for his or her own program a new MIME type should be registered which seems from the outside a long bureaucratic procedure. The way to do that can be found here: http://www.rfc-editor.org/rfc/rfc2048.txt

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜