mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 02:54:15 +00:00
remove unused pages
This commit is contained in:
parent
2fc40d163f
commit
38e3012763
@ -1,81 +0,0 @@
|
|||||||
import React from "react"
|
|
||||||
import { LiveChat } from "components"
|
|
||||||
import classnames from "classnames"
|
|
||||||
//import Peer from "peer"
|
|
||||||
|
|
||||||
import "./index.less"
|
|
||||||
|
|
||||||
export default class CallRoom extends React.Component {
|
|
||||||
state = {
|
|
||||||
participants: [],
|
|
||||||
}
|
|
||||||
|
|
||||||
peer = null
|
|
||||||
|
|
||||||
viewsRef = React.createRef()
|
|
||||||
|
|
||||||
selfVideoRef = React.createRef()
|
|
||||||
|
|
||||||
componentDidMount = async () => {
|
|
||||||
this.initialize()
|
|
||||||
}
|
|
||||||
|
|
||||||
initialize = async () => {
|
|
||||||
const stream = await this.createMediaStream()
|
|
||||||
|
|
||||||
this.selfVideoRef.current.srcObject = stream
|
|
||||||
}
|
|
||||||
|
|
||||||
async createMediaStream() {
|
|
||||||
const stream = await navigator.mediaDevices.getUserMedia({
|
|
||||||
audio: true,
|
|
||||||
video: {
|
|
||||||
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
return stream
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
return <div className="room">
|
|
||||||
<div
|
|
||||||
className={classnames(
|
|
||||||
"room_views",
|
|
||||||
{
|
|
||||||
"one": this.state.participants.length === 0
|
|
||||||
}
|
|
||||||
)}
|
|
||||||
ref={this.viewsRef}
|
|
||||||
>
|
|
||||||
<div className="participant_video">
|
|
||||||
<video
|
|
||||||
autoPlay
|
|
||||||
muted
|
|
||||||
playsInline
|
|
||||||
ref={this.selfVideoRef}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{
|
|
||||||
this.state.participants.map((participant) => {
|
|
||||||
return <div className="participant_video">
|
|
||||||
<video
|
|
||||||
autoPlay
|
|
||||||
muted
|
|
||||||
playsInline
|
|
||||||
srcObject={participant.stream}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
})
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="text_room">
|
|
||||||
<LiveChat
|
|
||||||
roomId={this.props.params.id}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,46 +0,0 @@
|
|||||||
.room {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
|
|
||||||
gap: 30px;
|
|
||||||
|
|
||||||
.room_views {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-evenly;
|
|
||||||
|
|
||||||
width: 100%;
|
|
||||||
|
|
||||||
height: 30vh;
|
|
||||||
|
|
||||||
padding: 20px 50px;
|
|
||||||
|
|
||||||
background-color: var(--background-color-accent);
|
|
||||||
|
|
||||||
border-radius: 12px;
|
|
||||||
|
|
||||||
&.one {
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.participant_video {
|
|
||||||
height: 100%;
|
|
||||||
|
|
||||||
video {
|
|
||||||
border-radius: 8px;
|
|
||||||
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.text_room {
|
|
||||||
border-radius: 12px;
|
|
||||||
padding: 0 20px;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,9 +0,0 @@
|
|||||||
import React from "react"
|
|
||||||
|
|
||||||
import "./index.less"
|
|
||||||
|
|
||||||
export default (props) => {
|
|
||||||
return <div className="group">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
}
|
|
@ -1,9 +0,0 @@
|
|||||||
import React from "react"
|
|
||||||
|
|
||||||
import "./index.less"
|
|
||||||
|
|
||||||
export default (props) => {
|
|
||||||
return <div className="groupCreator">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
}
|
|
@ -1,3 +0,0 @@
|
|||||||
.groupCreator {
|
|
||||||
display: flex;
|
|
||||||
}
|
|
@ -1,3 +0,0 @@
|
|||||||
.group {
|
|
||||||
display: flex;
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user