/** * 视频通话页面 */ import React, { Component } from "react"; import { connect } from "dva"; import { Pagination, Drawer, Tooltip, Modal, Row, Col, Button } from "antd"; import "./video.less"; import CheckRTC from "./checkRTC"; import "./popper"; // import Presetting from './presetting'; import Common from "./common"; // import { imKey } from "../../../utils/config"; import { trtcVideoRoom, getTencentYspSig } from "../../../services/api"; @connect((state) => ({ // imIsLogin: state.im.imIsLogin })) export default class Video extends Component { constructor(props) { super(props); this.common = Common.call(this); this.state = { RTC: null, Room_No: props.Room_No, //房间号 // MemberList: props.MemberList, mobilePhone: props.mobilePhone, imSig: props.imSig, height: null, schedulingName: props.schedulingName, //调度任务名称 rtc: null, isCamOn: true, isMicOn: true, }; } componentDidMount() { CheckRTC(); const height = document.documentElement.clientHeight - 5; this.setState({ height, }); this.common.login(this.state.Room_No, this.state.mobilePhone); } //解散房间 dissolutionRoom() { // window.close(); trtcVideoRoom({ Room_No: this.state.Room_No }).then((res) => { console.log(res); }); } render() { return (
{/* {this.state.schedulingName} */} 房间ID:{this.state.Room_No} { this.common.screenShareClick(); }} />
{/* 聊天室页面 */}
{/*
{ this.common.screenShareClick(); }} />
房间号: 12345
*/} {/* */}
{/* */}
{/* */}
(我)
{/* */} {/*
*/}
{/* */}
this.common.mainVideoClick()} > {/* */}
{ if (this.common.isCamOn) { this.common.isCamOn = false; this.common.muteVideo(); this.setState({ isCamOn: !this.state.isCamOn, }); } else { this.common.isCamOn = true; this.setState({ isCamOn: !this.state.isCamOn, }); this.common.unmuteVideo(); } }} src={ this.state.isCamOn ? require("../../../assets/images/prevention/big-camera-on.png") : require("../../../assets/images/prevention/big-camera-off.png") } alt="" title={ this.state.isCamOn ? "关闭摄像头" : "打开摄像头" } /> { if (this.common.isMicOn) { this.common.isMicOn = false; this.common.muteAudio(); this.setState({ isMicOn: !this.state.isMicOn, }); } else { this.common.isMicOn = true; this.common.unmuteAudio(); this.setState({ isMicOn: !this.state.isMicOn, }); } }} src={ this.state.isMicOn ? require("../../../assets/images/prevention/big-mic-on.png") : require("../../../assets/images/prevention/big-mic-off.png") } alt="" title={ this.state.isMicOn ? "关闭麦克风" : "打开麦克风" } />
{/* */}
摄像头未打开
); } }