Create an html video tag that accepts multiple video sources

html:video(STRING $width="100%", STRING $height="auto", ARRAY $sources=[ [ "src" => "movie.mp4", "type" => "video/mp4" ] ], STRING $title="", STRING $placeholder_image_url="", STRING $preload="auto", BOOL $autoplay=FALSE, BOOL $controls=TRUE, BOOL $muted=FALSE, BOOL $loop=FALSE, STRING $unsupported_message="Your browser does not support the video tag.", ARRAY $tracks=[ ], ARRAY $attributes=[ ])

# adding subtitles
$track = [["src" => "english_subtitle.vtt", "kind" => "subtitles", "srclang" => "en", "label" => "english"]]
html:video(sources: [[ "src" => "movie.mp4", "type" => "video/mp4" ]], preload: "auto", muted: TRUE, loop: TRUE, tracks: $tracks)

Copyright ©2013-2022 SunSed®. All rights reserved.