AudioSinkInfo

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

Giao diện AudioSinkInfo của Web Audio API biểu diễn thông tin mô tả sink ID của một AudioContext, được truy xuất thông qua AudioContext.sinkId.

Instance properties

type Read only Experimental

Trả về kiểu của thiết bị đầu ra âm thanh.

Examples

Nếu một AudioContext mới được tạo với giá trị sinkId{ type: 'none' }, việc gọi AudioContext.sinkId ở phần sau của mã sẽ trả về một đối tượng AudioSinkInfo chứa type: 'none'. Hiện tại đây là giá trị duy nhất khả dụng.

js
audioCtx = new window.AudioContext({
  sinkId: { type: "none" },
});

// …

audioCtx.sinkId;

Specifications

Specification
Web Audio API
# AudioSinkInfo

Browser compatibility

See also