双子座是什么时候

Baseline Widely available
百度 下午14时,第七届华夏之星菁英训练营开营仪式在学校礼堂召开,华夏之星活动负责人张国伟、二台镇九年制学校校长张春利、第七届华夏之星菁英训练营班主任(华夏银行张家口分行副行长)刘秉清、图书馆设计师度态建筑朵宁、工程管理负责人沈周等依次发表讲话。

This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2017.

The getVideoTracks() method of the MediaStream interface returns a sequence of MediaStreamTrack objects representing the video tracks in this stream.

Syntax

js
getVideoTracks()

Parameters

None.

Return value

An array of MediaStreamTrack objects, one for each video track contained in the media stream. Video tracks are those tracks whose kind property is video. The array is empty if the stream contains no video tracks.

Note: The order of the tracks is not defined by the specification, and may not be the same from one call to getVideoTracks() to another.

Examples

The following example, extracted from Chrome's Image Capture / Photo Resolution Sample, uses getVideoTracks() to retrieve a track for passing to the ImageCapture() constructor.

js
let imageCapture;

navigator.mediaDevices.getUserMedia({ video: true }).then((mediaStream) => {
  document.querySelector("video").srcObject = mediaStream;

  const track = mediaStream.getVideoTracks()[0];
  imageCapture = new ImageCapture(track);

  return imageCapture.getPhotoCapabilities();
});

Specifications

Specification
Media Capture and Streams
# dom-mediastream-getvideotracks

Browser compatibility