Playing Media Files (from compiled publications)

imgApplies to HTML Viewer, IE Browser publications

There are several ways to play music or video from compiled publications. 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.

Playing media files in external applications thanks to special targets

You 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.

Play a MP3 file

Play a WMV file

imgHTML syntax for this example:

<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.

Using Flash to play MP3

The Flash Player requires MP3 files to be delivered from the built-in HTTP server. If you want to play MP3 files with Flash in your compiled publication, be sure to enable it.

Any MP3 player written in Flash should work. For instance, we used Dewplayer. Dewplayer is under Creative Commons licence. The usage is totally free even for commercial purposes (but not reselling it).

Using Silverlight to play Windows Media Video (WMV) and other media types

The 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

IE publications can work with Windows Media Player to play music or video: players embedded in HTML pages are supported.

The Windows Media Player requires the built-in HTTP server to be enabled. Moreover, media files should be specified in the the Dependencies of the HTML page that embeds the players.

imgPlay MP3 audio files:

HTML syntax for this example:

<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>

imgPlay WMV video files:

HTML syntax for this example:

<object id="mp3" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" height="240"
type="application/x-oleobject" width="320">
<PARAM NAME="URL" VALUE="sunpeek2.wmv">
<PARAM NAME="SendPlayStateChangeEvents" VALUE="False" />
<PARAM NAME="AutoStart" VALUE="False" />
<PARAM name="uiMode" value="mini" />
</object>

imgImportant:

  • this feature remains experimental in HTML Executable. It was successfully tested with Windows Media Player 10 and 11 on Windows XP, Vista and Windows 7.

  • Very large media files may not be supported.