HTMLVideoElement: poster プロパティ
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
poster
は HTMLVideoElement
インターフェイスのプロパティで、動画データが利用できない場合に表示させる画像の URL を反映する文字列です。プロパティが有効な URL を表していない場合、ポスターフレームは表示されません。
これは、<video>
要素の poster
属性を反映しています。
値
文字列です。
例
html
<video
id="media"
src="https://example.com/video.mp4"
poster="https://example.com/poster.jpg"></video>
js
const el = document.getElementById("media");
console.log(el.poster); // 出力: "https://example.com/poster.jpg"
仕様書
Specification |
---|
HTML # dom-video-poster |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
poster |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.