UNPKG

agora-edu-core

Version:

Core APIs for building an online classroom

45 lines (44 loc) 1.3 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.EduStream = void 0; var _ = require("../../../.."); /** * 流对象 */ /** @en * Stream object */ class EduStream { constructor(stream) { this.streamUuid = void 0; this.streamName = void 0; this.fromUser = void 0; this.videoSourceType = void 0; this.audioSourceType = void 0; this.videoState = void 0; this.audioState = void 0; this.videoSourceState = void 0; this.audioSourceState = void 0; this.streamRtmpUrl = void 0; this.streamFlvUrl = void 0; this.streamHlsUrl = void 0; this.streamUuid = stream.streamUuid; this.streamName = stream.streamName; this.fromUser = stream.fromUser; this.videoSourceType = stream.videoSourceType; this.audioSourceType = stream.audioSourceType; this.videoState = stream.videoState; this.audioState = stream.audioState; this.videoSourceState = stream.videoSourceState; this.audioSourceState = stream.audioSourceState; this.streamHlsUrl = stream.playUrl; this.streamFlvUrl = stream.flvPlayUrl; this.streamRtmpUrl = stream.rtmpPlayUrl; } get isLocal() { return this.fromUser.userUuid === _.EduClassroomConfig.shared.sessionInfo.userUuid; } } exports.EduStream = EduStream;