What are the advantages and disadvantages of using HTML5 <video> over PHP for streaming video?

When it comes to streaming videos, using HTML5 <video> has several advantages over PHP. HTML5 <video> provides native support for video playback in web browsers without the need for plugins. It also offers better control over video playback, including features like autoplay, loop, and controls. However, PHP can still be used for server-side video processing and handling user authentication for accessing videos.

&lt;?php
// PHP code for streaming video
$video_path = &quot;path_to_video/video.mp4&quot;;

if (file_exists($video_path)) {
    header(&#039;Content-Type: video/mp4&#039;);
    header(&#039;Content-Length: &#039; . filesize($video_path));
    readfile($video_path);
    exit;
} else {
    echo &quot;Video not found.&quot;;
}
?&gt;