| Playing Media Files |
There are several ways to play music or video in publications and ebooks made with HTML Executable. In all cases, players require media files to be either delivered by the built-in HTTP server or made available physically on the hard disk in order to play them, so the runtime module may have to temporarily extract them. Using Flash to play MP3
Any MP3 player written in Flash should work. For instance, we used Dewplayer. Dewplayer is under Creative Commons license. The usage is totally free even for commercial purposes (but not reselling it).
<object id="mp3" classid="clsid:6bf52a52-394a-11d3-b153-00c04f79faa6" height="240" type="application/x-oleobject" width="320"> <param name="url" value="media/swan.mp3" /> <param name="sendplaystatechangeevents" value="false" /> <param name="autostart" value="false" /> <param name="uimode" value="mini" /> </object> Using Silverlight to play Windows Media Video (WMV) and other media typesThe Silverlight plugin is JW WMV Player licensed under a Creative Commons License. It allows you to use, modify and redistribute the script, but only for noncommercial purposes. For corporate use, please apply for a commercial license. Using Windows Media Player
HTML code for this example: <object id="mp3" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" height="240"
HTML code for this example: <object id="mp3" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" height="240" Playing media files in external applications thanks to special targetsYou can have links with HTML Executable special targets in your publication. Just add a hyperlink to a media file you want to play, set the target attribute to _heopenit and that's all. The end user's default media player will be launched to play the file.
<a href="media/swan.mp3" target="_heopenit"> It works with any media type (AVI, OGG...) provided that a player is available on the end user's computer. Otherwise, an error message will be displayed. |
This is the online documentation of HTML Executable.
About HTML Executable
HTML Executable is a versatile HTML compiler and ebook compiler: it lets you create secure ebooks and desktop applications with your websites, HTML or PDF documents.
You can easily create attractive ebooks, full-featured HTML applications (RIA) and software, digital publications from your websites, PDF files and HTML documents for online or offline distribution.