Controller.js 2.59 KB
Newer Older
Kim, Chaerin's avatar
Kim, Chaerin committed
1
2
3
4
5
6
7
8
import ScreenSelect from "./ScreenSelect";
import video_btn from "../../images/videobtn.png";
import speaker_btn from "../../images/speakerbtn.png";
import mic_btn from "../../images/micbtn.png";
import videooff_btn from "../../images/videooffbtn.png";
import speakeroff_btn from "../../images/speakeroffbtn.png";
import micoff_btn from "../../images/micoffbtn.png";
import React, { useState } from "react";
우지원's avatar
우지원 committed
9

Kim, Chaerin's avatar
Kim, Chaerin committed
10
11
const Controller = (props) => {
  const { mic, video, speaker, setMic, setSpeaker, setVideo } = props;
Kim, Chaerin's avatar
Kim, Chaerin committed
12
  return (
Kim, Chaerin's avatar
Kim, Chaerin committed
13
    <div className="container">
우지원's avatar
우지원 committed
14
15
16
      <div className="row">
        <div
          className="col d-flex justify-content-center"
Kim, Chaerin's avatar
Kim, Chaerin committed
17
18
19
20
21
22
          style={{
            backgroundColor: "#C4C4C4",
            position: "absolute",
            bottom: 0,
            width: "414px",
          }}
우지원's avatar
우지원 committed
23
        >
Kim, Chaerin's avatar
Kim, Chaerin committed
24
25
26
27
28
29
30
31
32
          {mic ? (
            <div className="col d-flex justify-content-center">
              <button type="button" className="btn" onClick={setMic}>
                <img src={micoff_btn} width="45" height="40" />
              </button>
            </div>
          ) : (
            <div className="col d-flex justify-content-center">
              <button type="button" className="btn" onClick={setMic}>
우지원's avatar
우지원 committed
33
                <img src={mic_btn} width="45" height="40" />
seoyeon's avatar
0705    
seoyeon committed
34
35
              </button>
            </div>
Kim, Chaerin's avatar
Kim, Chaerin committed
36
37
38
39
40
41
42
43
          )}
          {speaker ? (
            <div className="col d-flex justify-content-center">
              <button type="button" className="btn" onClick={setSpeaker}>
                <img src={speakeroff_btn} width="45" />
              </button>
            </div>
          ) : (
seoyeon's avatar
0705    
seoyeon committed
44
            <div className="col d-flex justify-content-center">
Kim, Chaerin's avatar
Kim, Chaerin committed
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
              <button type="button" className="btn" onClick={setSpeaker}>
                <img src={speaker_btn} width="45" />
              </button>
            </div>
          )}
          {video ? (
            <div className="col d-flex justify-content-center">
              <button
                type="button"
                className="btn"
                data-bs-toggle="modal"
                data-bs-target="#shareModal"
                onClick={setVideo}
              >
                <img src={videooff_btn} width="45" />
              </button>
            </div>
          ) : (
            <div className="col d-flex justify-content-center">
              <button type="button" className="btn" onClick={setVideo}>
우지원's avatar
우지원 committed
65
                <img src={video_btn} width="45" />
seoyeon's avatar
0705    
seoyeon committed
66
              </button>
Kim, Chaerin's avatar
Kim, Chaerin committed
67
68
            </div>
          )}
Kim, Chaerin's avatar
Kim, Chaerin committed
69
        </div>
Kim, Chaerin's avatar
Kim, Chaerin committed
70
        {/* <ScreenSelect videoOff={setVideo} /> */}
Kim, Chaerin's avatar
Kim, Chaerin committed
71
      </div>
우지원's avatar
우지원 committed
72
    </div>
Kim, Chaerin's avatar
Kim, Chaerin committed
73
74
  );
};
Kim, Chaerin's avatar
Kim, Chaerin committed
75

Kim, Chaerin's avatar
Kim, Chaerin committed
76
export default Controller;