Locale

Change the locale of the datepicker, schedule and client side validation messages.

Language
English
English
English
French
German
German
German
Italian
Korean
Spanish
Catalan
Dutch
Portuguese
Portuguese
Arabic
Arabic
Bulgarian
Bangla
Bosnian
Czech
Greek
Estonian
Persian
Finnish
Danish
Hindi
Indonesian
Icelandic
Croatian
Japanese
Hungarian
Hebrew
Georgian
Central Kurdish
Khmer
Kyrgyz
Kazakh
Lithuanian
Latvian
Malay
Norwegian
Polish
Romanian
Russian
Slovak
Slovenian
Serbian
Serbian
Swedish
Thai
Turkish
Ukrainian
Uzbek
Vietnamese
Chinese
Chinese

Input Style

Themes

PrimeUIX
Aura Light Emerald Aura Light Emerald
Aura Dark Emerald Aura Dark Emerald
PrimeOne
Saga Blue Saga Blue
Vela Blue Vela Blue
Arya Blue Arya Blue
Bootstrap
Bootstrap Blue Light Bootstrap Blue Light
Bootstrap Purple Light Bootstrap Purple Light
Bootstrap Blue Dark Bootstrap Blue Dark
Bootstrap Purple Dark Bootstrap Purple Dark
Material Design
Material Indigo Light Material Indigo Light
Material Deep Purple Light Material Deep Purple Light
Material Indigo Dark Material Indigo Dark
Material Deep Purple Dark Material Deep Purple Dark
Material Design Compact
Material Compact Indigo Light Material Compact Indigo Light
Material Compact Deep Purple Light Material Compact Deep Purple Light
Material Compact Indigo Dark Material Compact Indigo Dark
Material Compact Deep Purple Dark Material Compact Deep Purple Dark
Legacy
Nova Light Nova Light
Nova Dark Nova Dark
Nova Colored Nova Colored
Luna Amber Luna Amber
Luna Blue Luna Blue
Luna Green Luna Green
Luna Pink Luna Pink

Media

Media component is a cross browser generic player to embed multimedia content in Faces views. 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.

Media Tag Documentation

Media is a component that displays multimedia content such as PDF, videos and music.

NameTypeRequiredDefaultDescription
id String false generated Unique identifier of the component in a namingContainer.
rendered boolean false true Boolean value to specify the rendering of the component, when set to false component will not be rendered.
binding UIComponent false generated An EL expression referring to a server side UIComponent instance in a backing bean.
autoplay boolean false false Specifies that the media will start playing as soon as it is ready.
cache boolean false true Whether to cache the media content
controls boolean false false Specifies that media controls should be displayed (such as a play/pause button etc).
controlslist String false When specified, helps the browser select what controls to show. Values are nodownload, nofullscreen and noremoteplayback.
crossorigin String false Indicates whether to use CORS to fetch the related media file. Values are anonymous and user-credentials.
currentTime String false Sets or returns the current playback position in seconds.
defaultMuted boolean false false Specifies that the audio output should be muted by default.
defaultPlaybackRate String false Sets or returns the default speed of the media playback.
disablepictureinpicture boolean false false Prevents the browser from suggesting a Picture-in-Picture context menu or to request Picture-in-Picture automatically.
disableremoteplayback boolean false false Used to disable the capability of remote playback in devices that are attached using wired and wireless technologies.
height String false Height of the media component.
loop boolean false false Specifies that the media will start over again, every time it is finished.
muted boolean false false Specifies that the audio output of the media should be muted.
onabort String false Client-side callback to execute when the media loading is aborted.
oncanplay String false Client-side callback to execute when the browser can start playing the media.
oncanplaythrough String false Client-side callback to execute when the browser can play through the media without stopping for buffering.
ondurationchange String false Client-side callback to execute when the duration of the media is changed.
onemptied String false Client-side callback to execute when the media resource element suddenly becomes empty.
onended String false Client-side callback to execute when the media has reached the end.
onerror String false Client-side callback to execute when an error occurs while loading the media.
onloadeddata String false Client-side callback to execute when media data is loaded.
onloadedmetadata String false Client-side callback to execute when meta data (like dimensions and duration) are loaded.
onloadstart String false Client-side callback to execute when the browser starts looking for the media.
onpause String false Client-side callback to execute when the media is paused.
onplay String false Client-side callback to execute when the media is started or is no longer paused.
onplaying String false Client-side callback to execute when the media is playing after having been paused or stopped for buffering.
onprogress String false Client-side callback to execute when the browser is downloading the media.
onratechange String false Client-side callback to execute when the playing speed of the media is changed.
onseeked String false Client-side callback to execute when the user is finished moving/skipping to a new position in the media.
onseeking String false Client-side callback to execute when the user starts moving/skipping to a new position in the media.
onstalled String false Client-side callback to execute when the browser is trying to get media data, but data is not available.
onsuspend String false Client-side callback to execute when the browser is intentionally not getting media data.
ontimeupdate String false Client-side callback to execute when the playing position has changed.
onvolumechange String false Client-side callback to execute when the volume has been changed.
onwaiting String false Client-side callback to execute when the media has paused but is expected to resume.
playbackRate String false Sets or returns the speed of the media playback.
player String false Media player type.
playsinline boolean false false A Boolean attribute indicating that the video is to be played 'inline', that is within the element's playback area.
poster String false Specifies an image to be shown while the video is downloading, or until the user hits the play button.
preload String false Specifies if and how the author thinks the media should be loaded when the page loads. Values are auto, metadata, and none.
style String false Inline style of the component.
styleClass String false Style class of the component.
value Object false Media source value.
view String false View mode for PDF viewer.
volume String false Sets or returns the audio volume of the media. Must be a number between 0.0 and 1.0.
width String false Width of the media component.
zoom String false Zoom level for PDF viewer.
Loading...
Tag DocumentationNew DocumentationNew Documentation
PDF
Your browser can't display pdf, click to download pdf instead.
PDF via StreamedContent
Your browser can't display pdf, click to download pdf instead.

Usage


<div class="card">
    <h5>PDF</h5>
    <p:media value="/resources/demo/media/guide.pdf" width="100%" height="300px">
        Your browser can't display pdf, <h:outputLink
            value="#{request.contextPath}/resources/demo/media/guide.pdf">click</h:outputLink> to download pdf instead.
    </p:media>
</div>

<div class="card">
    <h5>PDF via StreamedContent</h5>
    <p:media value="#{mediaView.pdf}" width="100%" height="300px" player="pdf">
        Your browser can't display pdf, <h:outputLink
            value="#{request.contextPath}/resources/demo/media/guide.pdf">click</h:outputLink> to download pdf instead.
    </p:media>
</div>