UNPKG

@skyway-sdk/core

Version:

The official Next Generation JavaScript SDK for SkyWay

37 lines 1.16 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.RemoteMediaStreamBase = void 0; const base_1 = require("../base"); const base_2 = require("./base"); class RemoteMediaStreamBase extends base_2.RemoteStreamBase { constructor(id, contentType, track) { super(id, contentType); this.id = id; this.contentType = contentType; this.track = track; } /**@internal */ setIsEnabled(b) { this.track.enabled = b; } /** * @description [english] Attach the stream to the element. * @description [japanese] streamをelementに適用する. */ attach(element) { this._element = element; (0, base_1.attachElement)(element, this.track); } /** * @description [english] Detach the stream from the element. * @description [japanese] elementからstreamを取り除く. */ detach() { if (this._element) { (0, base_1.detachElement)(this._element, this.track); this._element = undefined; } } } exports.RemoteMediaStreamBase = RemoteMediaStreamBase; //# sourceMappingURL=media.js.map