ভিডিও উইডথ প্রোপার্টি
HTML DOM Video width প্রোপার্টি মিডিয়ার প্রস্থ (পিক্সেলে) নির্দেশকারী একটি নম্বর ফেরত দেয় বা সেট করে।
সিনট্যাক্স
width নম্বর হিসেবে ফেরত দেওয়া (px)
mediaObject.width
width কে নম্বর হিসেবে সেট করা (px)
mediaObject.width = number
উদাহরণ
Video width প্রোপার্টির একটি উদাহরণ -
<!DOCTYPE html> <html> <head> <title>HTML DOM Video width</title> <style> * { padding: 2px; margin:5px; } form { width:70%; margin: 0 auto; text-align: center; } input[type="button"] { border-radius: 10px; } </style> </head> <body> <form> <fieldset> <legend>HTML-DOM-Video-width</legend> <video id="demo" height="200" width="170" controls><source src="https://www.tutorialspoint.com/html5/foo.mp4" type="video/mp4"></video><br> <input type="button" onclick="getTrackDetails()" value="Video Not Visible"> <div id="divDisplay"></div> </fieldset> </form> <script> var divDisplay = document.getElementById("divDisplay"); var demo = document.getElementById("demo"); function getTrackDetails() { demo.width += 50; divDisplay.textContent = 'Video width: '+demo.width; } </script> </body> </html>
আউটপুট
'Video Not Visible' বাটনে ক্লিক করার আগে -

'Video Not Visible' বাটনে ৩ বার ক্লিক করার পর -
