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:

How to do it…

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

Get PrimeFaces Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.