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

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