Practical No 14
Practical No 14
14
Embed Video Streaming on Web Page.
Aim: Develop a webpage for embedded video streaming using professional
HTML5 editor.
Objective:
In this practical, we will create a webpage that supports embedded video streaming using HTML5. By
embedding a live video stream or an external video service (like YouTube), we can integrate dynamic video
content into the webpage. This approach is crucial for building media-rich websites that offer real-time
content to users.
Step-by-Step Process Tools:
First, define the basic structure of the webpage. We will embed a video stream using the
<iframe> tag, which allows us to stream videos from platforms like YouTube or other
<!DOCTYPE html>
video
<html hosting services..
lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Video Streaming Page</title>
<style>
body {
font-family: Arial, sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background-color: #e0e0e0;
}
.video-container {
max-width: 900px;
width: 100%;
text-align: center;
}
iframe {
width: 100%;
height: 500px;
border: none;
}
</style>
</head>
<body>
<div class="video-container">
<h1>Live Video Streaming</h1>
<!-- Embedded video stream from YouTube -->
<iframe src="https://www.youtube.com/embed/your-video-id" allowfullscreen></iframe>
</div>
</body>
</html>
2. Embedding a Video Stream
Replace the "your-video-id" in the src attribute with the actual video ID from
YouTube or any other video streaming platform. You can find this ID in the video’s share
URL (e.g., for https://www.youtube.com/watch?v=abc123, the ID is abc123).
If you are embedding a live video stream from another service, you can modify the src
accordingly.
Conclusion:
In this practical, we developed a webpage that allows embedded video streaming using
HTML5. By using the <iframe> tag to embed videos from platforms like YouTube, we
learned how to bring live or recorded streams directly to users. This skill is critical for
developing websites that support live video content, enhancing user engagement and
interaction.