The HTML Video element is used to play a video file on a web page. There are three supported audio formats: MP4, WEBM, and OGG. All of the attributes and events for HTML5 Video are available to use.
<div class="card">
<h5>MP4</h5>
<p:video value="https://www.w3schools.com/html/mov_bbb.mp4"
player="mp4"
controls="true"
width="420"
height="250"
onplay="console.log('MP4 Started Playing')"
onpause="console.log('MP4 Stopped Playing')">
Your browser does not support the video element.
See: <h:outputLink value="https://www.w3schools.com/html/html5_video.asp">HTML5 Video</h:outputLink>
</p:video>
</div>
<div class="card">
<h5>WEBM</h5>
<p:video value="/resources/demo/media/sample-webm.webm"
controls="true"
width="420"
height="250"
onplay="console.log('WEBM Started Playing')"
onpause="console.log('WEBM Stopped Playing')">
Your browser does not support the video element.
See: <h:outputLink value="https://www.w3schools.com/html/html5_video.asp">HTML5 Video</h:outputLink>
</p:video>
</div>