Video and Audio..

Getting video and audio on web page..

Video and Audio..

Hello , This is Arpan Tiwari presenting another concept of web development in front of you.. I have completed this lecture by Anurag sir from PW skills.. This snippet include how to upload video as well as audio on your web page ?..

Now using the video tag for video and filling the source of video.. You can add source in form of mp4 or from any site like pixels.. just go to video and copy the video address and paste it within source..

<h1>Loading Video</h1>
    <video src="https://player.vimeo.com/progressive_redirect/playback/907134323/rendition/540p/file.mp4?loc=external&oauth2_token_id=1747418641&signature=c5fe96d14ae80bbb1b518d7f705ca042c49fc47562a484d71d5abae885626aa0" controls autoplay muted height="500px" width="600px"></video>
    <!-- Method 2..-->
    <video controls autoplay muted height="500px" width="600px">
        <source src="https://player.vimeo.com/external/625579943.sd.mp4?s=ebfe0f0e0fd8f10a37a969d95d368213efb3e03c&profile_id=164&oauth2_token_id=57447761">
    </video>

If any time the video by this method would not play we have another method to do it use video tag and add the video source inside the source tag.. This way we can add the video to our web page.. Now we give the attributes to video tag like controls, auto play , and muted just to show on output webpage.. You can also control the view dimension of video giving height and width accordingly..

Another thing is to add the audio on your web page is similar to adding video.. You can add any online audio or any file .. You can give the attributes as we have given in video..

 <h1>Audio Loading</h1>
    <!-- There is no sense of height and width  also a inline element-->
    <audio src="better-day-186374.mp3" controls autoplay muted></audio>
    <!-- If mp3 is not supported then another way-->
    <audio controls autoplay muted>
        <source src="better-day-186374.mp3">
    </audio>

So this was all about this snippet I hope this will be helpful for you .. Thank You..