Media component is a cross browser generic player to embed multimedia content like video and audio to JSF pages. Various formats such as flash, quicktime, windows media, realplayer and pdf are supported. Suitable player is discovered using the source extension type and a player can be specified explicitly as well. Media component can also play binary media using the StreamedContent API.
Documentation<h3 style="margin-top:0">Flash</h3> <p:media value="http://www.youtube.com/v/KZnUr8lcqjo" width="420" height="315" player="flash"/> <h3>QuickTime</h3> <p:media value="/resources/demo/media/sample-mov.mov" width="190" height="250"> <f:param name="autoPlay" value="false" /> </p:media> <h3>MP3</h3> <p:media value="http://www.stephaniequinn.com/Music/Mozart%20-%20Presto.mp3" width="200" height="20" player="quicktime"> <f:param name="autoPlay" value="false" /> </p:media> <h3>AVI</h3> <p:media value="http://malsup.github.com/video/clear.avi" width="250" height="300"> <f:param name="autostart" value="false" /> <p:outputPanel layout="block"> Windows Media is required to view this media. <h:outputLink value="http://www.microsoft.com/Windows/MediaPlayer/">Download Here</h:outputLink> </p:outputPanel> </p:media> <h3>Real</h3> <p:media value="http://service.real.com/learnnav/testrams/realvideo10_56.ram"> <f:param name="autostart" value="false" /> <p:outputPanel layout="block"> RealPlayer is required to view this media. <h:outputLink value="http://www.real.com/player/">Download Here</h:outputLink> </p:outputPanel> </p:media> <h3>PDF</h3> <p:media value="/resources/demo/media/guide.pdf" width="100%" height="300px"> Your browser can't display pdf, <h:outputLink value="/resources/demo/media/guide.pdf">click</h:outputLink> to download pdf instead. </p:media>