Babban matsalar da ke da alaฦa da shigar da bidiyo a cikin HTML shine cewa masu bincike da na'urori daban-daban suna tallafawa tsarin bidiyo daban-daban. Misali, wasu masu bincike suna iya tallafawa fayilolin MP4 kawai, yayin da wasu na iya tallafawa fayilolin WebM ko Ogg kawai. Wannan yana nufin cewa idan kuna son tabbatar da cewa bidiyon ku yana iya gani akan duk na'urori da masu bincike, kuna buฦatar samar da nau'ikan nau'ikan bidiyo iri ษaya a cikin tsari daban-daban. Bugu da ฦari, wasu tsofaffin mashahuran ฦila ba za su iya kunna bidiyo na HTML5 kwata-kwata ba, don haka kuna buฦatar samar da mafita ta koma baya kamar hanyar haษi zuwa fayil ษin bidiyo ko wata hanyar kallon bidiyon.
To embed a video in HTML, you can use the <video> element. The <video> element requires two attributes: src and controls. The src attribute specifies the location of the video file, and the controls attribute adds playback controls to the video. Example: <video width="320" height="240" controls> <source src="myVideo.mp4" type="video/mp4"> </video>
Layin 1:
Layin 2:
Layin 3:
Wannan layin yana rufe sashin bidiyo.
Abin da ke kunshe da bidiyo
Bidiyon da aka saka a cikin HTML bidiyo ne da aka cusa cikin shafin yanar gizon ta amfani da lambar HTML. Wannan yana bawa mai amfani damar kallon bidiyon ba tare da barin shafin da suke a halin yanzu ba. Ana iya amfani da bidiyon da aka haษa don haษaka abubuwan gidan yanar gizon, samar da nishaษi, ko ma a matsayin talla. Ana iya ษaukar su a shahararrun shafukan yanar gizon bidiyo kamar YouTube ko Vimeo, ko kuma ana iya loda su kai tsaye zuwa shafin yanar gizon kanta.
Yadda ake saka bidiyo ta amfani da lambar HTML
Don shigar da bidiyo ta amfani da lambar HTML, kuna buฦatar amfani da
Ainihin syntax don
Misali, idan kuna son shigar da bidiyon YouTube mai fadin pixels 640 da tsayin pixels 360, lambar ku zata yi kama da haka:
Da zarar kun kara da