DOM

PictureInPictureWindow.height プロパティ

 編集:2022.11.11 by T.A.

[Edge]。読取専用。→

HTMLPictureInPictureWindow のピクチャー イン ピクチャーのフローティング ビデオ ウインドウの縦幅をピクセル数を表す数値で返します。

mdn: プロパティ height は、フローティング ビデオ ウィンドウの高さをピクセル単位で返します。

構文
PictureInPictureWindow.height
PictureInPictureWindow HTMLVideoElement

long の数値。

mdn: フローティング ビデオ ウィンドウの高さをピクセル単位で示す整数値。このプロパティは読み取り専用で、デフォルト値はありません。

HTML:

<VIDEO id=IdTest height=200 src="../../Sample/Eizou_M.mp4" controls muted></VIDEO>

JavaScript:

P=IdTest.requestPictureInPicture();
D=P.then(Job1, Job2);  //=[object]:[object Promise]
function Job1(P1){  //第1引数:PictureInPictureWindow、第2引数:undefinedでした。
  DA=P1;
}
function Job2(P1){
  DA2=P1;
}

得られた内容:DA

=[object]:[object PictureInPictureWindow]
width=[number]:376
height=[number]:310
onresize=[object]:null
addEventListener=[function]:function addEventListener() { [native code] }
dispatchEvent=[function]:function dispatchEvent() { [native code] }
removeEventListener=[function]:function removeEventListener() { [native code] }

得られた内容:DA2:なし

フローティング ビデオ ウインドウのサイズ変更をした:

得られた内容:DA

=[object]:[object PictureInPictureWindow]
width=[number]:441
height=[number]:364
onresize=[object]:null

フローティング ビデオ ウインドウはこれ以上大きくならなかった。

フローティング ビデオ ウインドウを閉じた:

得られた内容:DA

=[object]:[object PictureInPictureWindow]
width=[number]:0
height=[number]:0
onresize=[object]:null


テスト