What are some best practices for embedding videos in PHP to ensure cross-browser compatibility?

When embedding videos in PHP, it is important to ensure cross-browser compatibility by using HTML5 video tags with multiple source formats (such as MP4, WebM, and Ogg) to support different browsers. Additionally, providing a fallback option like a link to the video file is recommended for browsers that do not support the HTML5 video tag.

<video width="320" height="240" controls>
  <source src="video.mp4" type="video/mp4">
  <source src="video.webm" type="video/webm">
  <source src="video.ogg" type="video/ogg">
  Your browser does not support the video tag or the file format of this video.
</video>