HTML Executable applications and ebooks can efficiently manage the streaming of audio and video content directly within web pages, utilizing HTML5 `video` and `audio` tags. This offers a seamless multimedia experience for the user, with the support of various formats to ensure broad compatibility.
Let's dive in to explore how you can enrich your HTML Executable applications with multimedia features and also protect your content from unwanted copying.
Consider the following HTML code that plays a video:
<video id="video" loop autoplay controls>
<source src="/assets/sunpeek.webm"></source>
</video>
This code will automatically play a looping video with controls for the user to interact with. Autoplay is supported, providing an uninterrupted multimedia experience.
For media files that are not overly large, typically less than 5 MB, you can have HTML Executable compile them directly into the EXE file. However, for very large video files, we recommend you to store them externally in the same folder as the EXE. HTML Executable will automatically search for them if they aren't compiled into the executable file.
As explained in the topic dedicated to HTML renderers, if you choose CEF as your HTML rendering engine for your ebook, some restrictions apply by default: CEF does not include proprietary media codecs (MP4 videos won't be played unless you use the dedicated CEF build that offers MP4 support but requires specific licensing).
Thus, only open-source or non-proprietary audio and video formats (and codecs) are supported: WEBM, WEBA, OGG, and MP3. Proprietary formats and codecs like MP4 and AAC are not available in Chromium builds by default, due to licensing requirements. To support these formats, you'll need to rely on our special CEF builds with MP4 support (2), or you can switch to the WebView2 engine (1).
We can provide our customers with specific CEF builds that handle MP4 video formats. Please contact us, expressing your intent to respect the MP4 patent licensing, to access these files.
📝 Note: Free converter and encoding software programs are available for re-encoding your media files into open-source formats. |
When dealing with large video files, we recommend keeping them external to the publication .EXE file as Windows only supports EXE file sizes up to 4 GB. These are considered as external files.
Additionally, HTML Executable enables you to encrypt your video files, limiting their access to only your publication or ebook. This security feature aids in preventing unwanted copying of your video resources.
For more information on how to encrypt your files, please refer to the Encrypt External Files topic.
In conclusion, HTML Executable provides a comprehensive solution for integrating and securing multimedia content in your applications. With careful management and the appropriate use of features, you can enhance the user experience and maintain control over your digital resources.