An warware: yadda ake saka bidiyo a cikin html

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:Wannan layin yana ฦ™ayyade wurin fayil ษ—in bidiyo (a cikin wannan yanayin, myVideo.mp4) da nau'in fayil ษ—in bidiyo (a wannan yanayin, mp4).

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 alama. The tag yana ba ku damar shigar da abun ciki na waje kamar bidiyo, hotuna, da fayilolin mai jiwuwa cikin takaddar HTML.

Ainihin syntax don Tag shine kamar haka:

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 yi tag zuwa takaddun HTML ษ—inku, adana shi kuma duba shi a cikin burauzar yanar gizon ku. Bidiyon da aka haษ—a ya kamata ya bayyana a shafinku.

Shafi posts:

Leave a Comment