removeTrack
イベントは、トラックが VideoTrackList
から取り除かれたときに発生します。
バブリング | なし |
---|---|
キャンセル | 不可 |
インターフェイス | TrackEvent |
イベントハンドラプロパティ | onremovetrack |
例
AddEventListener()
を使用する場合
const videoElement = document.querySelector('video');
videoElement.videoTracks.addEventListener('removetrack', (event) => {
console.log(`Video track: ${event.track.label} removed`);
});
onremovetrack
イベントハンドラプロパティを使用する場合
const videoElement = document.querySelector('video');
videoElement.videoTracks.onremovetrack = (event) => {
console.log(`Video track: ${event.track.label} removed`);
};
仕様
仕様 | 状態 |
---|---|
HTML Living Standard removetrack の定義 |
現行の標準 |
ブラウザーの互換性
BCD tables only load in the browser
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.
関連情報
- 関連イベント:
addtrack
,change
AudioTrackList
対象でのこのイベント:removetrack
MediaStream
対象でのこのイベント:removetrack
- Media Streams API
- WebRTC API