O'Reilly logo

PrimeFaces Cookbook - Second Edition by Oleg Varaksin, Mert Çalışkan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required