Embedding the multimedia content in JSF pages
The media
component offers ways for embedding various multimedia content into a JSF page.
How to do it…
A simple definition of media component for displaying a QuickTime movie will be as follows:
<p:media value="/resources/media/sample_iTunes.mov" width="700" height="500" />
The visual output of the player will be as follows:
Tip
Use the width
and height
attributes of the media component in order to declare the viewport of the player.
How it works…
By default, the media
component renders the regarding HTML markup into the page according to the extension of the given file. The players and the matching extensions are listed as follows:
Player |
Supported types |
---|---|
Flash |
FLV, MP3, and SWF |
|
|
QuickTime |
AIF, AIFF, AAC, AU, BMP, GSM, MOV, MID, MIDI, MPG, MPEG, MP4, M4A, PSD, QT, QTIF, QIF, QTI, SND, TIF, TIFF, WAV, 3G2, and 3PG |
Real |
RA, RAM, RM, RPM, RV, SMI, and SMIL |
Windows |
ASX, ASF, AVI, WMA, and WMV |
If the player cannot be resolved from...