نمایش ویدیو در صفحه

تمرین آسان 1055 visibility link download

کدی بنویسید که ویدیویی با آدرس (test) را در صفحه بارگذاری کند. دکمه های کنترل ویدیو نیز وجود داشته باشد

reply 10

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>نمایش ویدئو در صفحه</title>
</head>
<body>
    <video controls>
        <source src="test" type="video/mp4">
        خطا: مرورگر پشتیبانی نمی کند
    </video>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>ZARAS</title>
    <link rel="shortcut icon" href="favicon (14).ico" type="image/x-icon">
</head>
<body>

    <video width="400" height="400" controls>
        <source src="test.mp4">
    </video>

</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>video</title>
    <link rel="stylesheet" href="">

</head>
<body>
    <a href="D:\FILM\انیمیشن\بالا" title="FILM" target="_blank">
        <video src="video/Up.2009.480p.Farsi.Dubbed.mkv" controls ></video>
    </a>

</body>
</html>
<!DOCTYPE html>
<html lang="fa">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>پخش ویدیو</title>
    <style>
        body {
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            background-color: #f0f0f0;
            font-family: Arial, sans-serif;
        }

        video {
            width: 80%;
            max-width: 600px;
            border: 1px solid #ccc;
            border-radius: 8px;
        }

        .controls {
            margin-top: 10px;
            display: flex;
            justify-content: center;
        }

        button {
            padding: 10px 15px;
            margin: 0 5px;
            border: none;
            border-radius: 5px;
            background-color: #007bff;
            color: white;
            cursor: pointer;
            font-size: 16px;
        }

        button:hover {
            background-color: #0056b3;
        }
    </style>
</head>
<body>
    <video id="myVideo" controls>
        <source src="test.mp4" type="video/mp4"> <!-- آدرس ویدیو -->
        مرورگر شما از تگ ویدیو پشتیبانی نمی‌کند.
    </video>

    <div class="controls">
        <button onclick="playVideo()">پخش</button>
        <button onclick="pauseVideo()">توقف</button>
        <button onclick="stopVideo()">متوقف کردن</button>
    </div>

    <script>
        const video = document.getElementById('myVideo');
        function playVideo() {
            video.play();
        }

        function pauseVideo() {
            video.pause();
        }

        function stopVideo() {
            video.pause();
            video.currentTime = 0; // ویدیو را به ابتدا برمی‌گرداند
        }
    </script>

</body>
</html>
<!DOCTYPE html>
<html lang="fa";>
    <head>
        <meta charset="UTF-8">
        <meta name="viewport " content="width=device-width,intial-scale=1.0">
    </head>
    <body>
        <video content="width=device-width,intial-scale=1.0" controls autoplay muted >
            <source src="test.mp4" type="video/mp4">
            <track src="test.vtt" kind="subtitles" srclang='fa' label="farsi"> 
        </video>
    </body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>نمایش ویدیو</title>
</head>
<body>
    <video src="text.mp4" controls></video>
</body>
</html>

reply ارسال جواب

  • قبل از ارسال جواب ویدیو زیر رو ببین تا کار کردن با markdown رو یاد بگیری
  • لطفا جواب های تکراری ارسال نکن
  • در متن جواب اطلاعات شخصی شامل ایمیل و شماره موبایل و آی دی و... ننویس
  • سعی کن داخل کدت از کلمات فارسی یا فینگلیش (فارسی با حروف انگلیسی) استفاده نکنی و کدت تماما انگلیسی باشه
  • لطفا داخل جواب از ایموجی یا کاراکترهای خاص استفاده نکن
  • ارسال جواب حق مادی یا معنوی برای ارسال کننده ایجاد نمیکند و تمام حقوق برای سایت کدبزن محفوظ است

راهنمای ارسال جواب 👇

×
بستن