HTMLMediaElement: controls property
MDN Web Docs · نسخهٔ df622a2a1c1e · CC BY-SA 2.5 و مجوز جداگانهٔ ناشر برای نمونهکد
{{APIRef("HTML DOM")}}
The **HTMLMediaElement.controls** property reflects the [controls](/en-US/docs/Web/HTML/Reference/Elements/video#controls) HTML attribute, which controls whether user interface controls for playing the media item will be displayed.
Value
A boolean value. A value of true means controls will be displayed.
Examples
js
const obj = document.createElement("video");
obj.controls = true;Specifications
{{Specifications}}
Browser compatibility
{{Compat}}
See also
- {{domxref("HTMLMediaElement")}}: Interface used to define the
HTMLMediaElement.controlsproperty