Video width property
Definition and Usage
width
property sets or returns the width property value.
width
The property specifies the width of the video player in pixels.
Tip:Always specify the height and width properties of the video. If height and width are set, the space required for the video is reserved when the page is loaded. However, if these properties are not set, the browser will not know the size of the video and cannot reserve appropriate space for it. The page layout will change during loading (when the video is loading).
Note:Do not use height and width properties to resize the video! Shrinking a large video with height and width properties will force the user to download the original video (even if it looks very small on the page). The correct way to resize the video is to use it first in the program, and then use it on the page.
Example
Example 1
Change the width of the video player:
document.getElementById("myVideo").width = "500";
Example 2
Get the width of the video:
var x = document.getElementById("myVideo").width;
Syntax
return width property:
videoObject.width
width প্রতিভাত সংযোজন:
videoObject.width = pixels
প্রতিভাত মূল্য
মূল্য | বর্ণনা |
---|---|
pixels | ভিডিও প্লেয়ারের প্রস্থবর্তী পিক্সেলের ইউনিট নির্ধারণ |
প্রযুক্তিগত বিবরণ
ফলাফল: | সংখ্যা, ভিডিওর প্রস্থবর্তী পিক্সেলের ইউনিট |
---|
ব্রাউজার সমর্থন
চ্রোম | এডজ | ফায়ারফক্স | স্যাফারি | অপেরা |
---|---|---|---|---|
চ্রোম | এডজ | ফায়ারফক্স | স্যাফারি | অপেরা |
সমর্থন | 9.0 | সমর্থন | সমর্থন | সমর্থন |
সংশ্লিষ্ট পাতা
HTML পরামর্শপত্রঃHTML <video> width প্রতিভাত