JITSI视频会议-主持人/主持人离开会议时,是否有任何配置或API可以踢出所有参与者?

时间:2020-08-06 05:58:11

标签: jitsi jitsi-meet

我安装了JITSI,并创建了一个视频会议平台。我创建了一个会议并与我的朋友分享。 我是会议的主持人/主持人。我参加会议的朋友都是参与者。现在,当我离开/断开会议连接时,对于与会者来说并没有断开连接,在没有我(主持人(或主持人))的情况下,他们仍然可以进入会议室。

现在,我正在寻找主持人离开会议时删除参与者的解决方案。

谢谢。

2 个答案:

答案 0 :(得分:1)

我使用了 Laravel php 框架。 您可以将特定用户指定为主持人。您可以使用 readyToClose api 方法来传递重定向 url。

在我的示例中,我通过控制器传递会议结束网址。当主持人结束会议时,我使用套接字将信号发送给所有其他参与者。

public class HomeViewController:UIViewController{

    let stackView:UIStackView = {
       let st = UIStackView()
        st.axis = .horizontal
        st.alignment = .center
        st.distribution = .fill
//        st.backgroundColor = .cyan
        st.layer.shadowColor = UIColor.gray.cgColor
        st.layer.shadowOffset = .zero
        st.layer.shadowRadius = 5
        st.layer.shadowOpacity = 1
        st.spacing = 10
        st.translatesAutoresizingMaskIntoConstraints = false
        
       return st
    }()
    let generateButton:UIButton = {
       let btn = UIButton()
        btn.setTitle("Generate Array", for: .normal)
        btn.backgroundColor = UIColor(red: 0.92, green: 0.30, blue: 0.29, alpha: 1.00)
        btn.setTitleColor(.white, for: .normal)
        btn.titleLabel?.font = UIFont.boldSystemFont(ofSize: 20)
        btn.layer.cornerRadius = 10
        btn.layer.masksToBounds = true
        btn.heightAnchor.constraint(equalToConstant: 38).isActive = true
        btn.translatesAutoresizingMaskIntoConstraints = false
        return btn
    }()
    let BubbleSort:UIButton = {
       let btn = UIButton()
        btn.setTitle("BubbleSort", for: .normal)
        btn.backgroundColor = UIColor(red: 0.41, green: 0.43, blue: 0.88, alpha: 1.00)
        btn.setTitleColor(.white, for: .normal)
        btn.titleLabel?.font = UIFont.italicSystemFont(ofSize: 20)
        btn.layer.cornerRadius = 10
        btn.layer.masksToBounds = true
        btn.heightAnchor.constraint(equalToConstant: 38).isActive = true
        btn.translatesAutoresizingMaskIntoConstraints = false
        return btn
    }()
    let MergeSort:UIButton = {
       let btn = UIButton()
        btn.setTitle("MergeSort", for: .normal)
        btn.backgroundColor = UIColor(red: 0.10, green: 0.16, blue: 0.34, alpha: 1.00)
        btn.setTitleColor(.white, for: .normal)
        btn.titleLabel?.font = UIFont.italicSystemFont(ofSize: 20)
        btn.layer.cornerRadius = 10
        btn.layer.masksToBounds = true
        btn.heightAnchor.constraint(equalToConstant: 38).isActive = true
        btn.translatesAutoresizingMaskIntoConstraints = false
        return btn
    }()
    let InsertionSort:UIButton = {
       let btn = UIButton()
        btn.setTitle("InsertionSort", for: .normal)
        btn.backgroundColor = UIColor(red: 0.19, green: 0.22, blue: 0.32, alpha: 1.00)
        btn.setTitleColor(.white, for: .normal)
        btn.titleLabel?.font = UIFont.italicSystemFont(ofSize: 20)
        btn.layer.cornerRadius = 10
        btn.layer.masksToBounds = true
        btn.heightAnchor.constraint(equalToConstant: 38).isActive = true
        btn.translatesAutoresizingMaskIntoConstraints = false
        return btn
    }()
    let SelectionSort:UIButton = {
       let btn = UIButton()
        btn.setTitle("SelectionSort", for: .normal)
        btn.backgroundColor = UIColor(red: 0.51, green: 0.20, blue: 0.44, alpha: 1.00)
        btn.setTitleColor(.white, for: .normal)
        btn.titleLabel?.font = UIFont.italicSystemFont(ofSize: 20)
        btn.layer.cornerRadius = 10
        btn.layer.masksToBounds = true
        btn.heightAnchor.constraint(equalToConstant: 38).isActive = true
        btn.translatesAutoresizingMaskIntoConstraints = false
        return btn
    }()
    let mainStackView:UIStackView = {
        let st = UIStackView()
        st.backgroundColor = .gray
        st.axis = .horizontal
        st.distribution = .fillEqually
        st.alignment = .firstBaseline
        st.spacing = 1
        st.translatesAutoresizingMaskIntoConstraints = false
        return st
    }()
    let baseView:UIView = {
        let vw = UIView()
        vw.backgroundColor = UIColor(red: 0.07, green: 0.54, blue: 0.65, alpha: 1.00)
        vw.translatesAutoresizingMaskIntoConstraints = false
        vw.layer.cornerRadius = 3
        vw.layer.masksToBounds = true
        vw.heightAnchor.constraint(equalToConstant: 15).isActive = true
        return vw
    }()
    public override   func viewDidLoad() {
          view.addSubview(mainStackView)
          view.addSubview(stackView)
          view.addSubview(baseView)
        edgesForExtendedLayout = []
        stackView.addArrangedSubview(generateButton)
        stackView.addArrangedSubview(BubbleSort)
        stackView.addArrangedSubview(MergeSort)
        stackView.addArrangedSubview(InsertionSort)
        stackView.addArrangedSubview(SelectionSort)
        
        stackView.topAnchor.constraint(equalTo: view.topAnchor).isActive = true
        stackView.leftAnchor.constraint(equalTo: view.leftAnchor).isActive = true
        stackView.rightAnchor.constraint(equalTo: view.rightAnchor).isActive = true
        stackView.heightAnchor.constraint(equalToConstant: 50).isActive = true
        
        baseView.bottomAnchor.constraint(equalTo: view.bottomAnchor,constant: -2).isActive = true
        baseView.leftAnchor.constraint(equalTo: view.leftAnchor,constant: 5).isActive = true
        baseView.rightAnchor.constraint(equalTo: view.rightAnchor,constant: -5).isActive = true

         mainStackView.topAnchor.constraint(equalTo: stackView.bottomAnchor, constant: 5).isActive = true
        mainStackView.leftAnchor.constraint(equalTo: view.leftAnchor, constant: 5).isActive = true
        mainStackView.rightAnchor.constraint(equalTo: view.rightAnchor, constant: -5).isActive = true
        mainStackView.bottomAnchor.constraint(equalTo: baseView.topAnchor, constant: -5).isActive = true
        setButtons()
        builStartingArray()

    }

   func setButtons(){
        generateButton.addTarget(self, action: #selector(generatePressed), for: .touchUpInside)
        BubbleSort.addTarget(self, action: #selector(bubbleSort), for: .touchUpInside)
        MergeSort.addTarget(self, action: #selector(mergeSort), for: .touchUpInside)
        InsertionSort.addTarget(self, action: #selector(insertionSort), for: .touchUpInside)
        SelectionSort.addTarget(self, action: #selector(selectionSort), for: .touchUpInside)
    }
    func builStartingArray(){
        let viewStick:UIView = {
           let v = UIView()
            v.backgroundColor = .red
            v.translatesAutoresizingMaskIntoConstraints = false
            v.frame.size = CGSize(width: 50, height: 150)
            return v
        }()
        let viewStick2:UIView = {
           let v = UIView()
            v.backgroundColor = .red
            v.translatesAutoresizingMaskIntoConstraints = false
            v.frame.size = CGSize(width: 50, height: 150)
            return v
        }()
        mainStackView.addArrangedSubview(viewStick)
        mainStackView.addArrangedSubview(viewStick2)
    }
}

答案 1 :(得分:0)

主持人离开会议后无法踢出参与者。一旦实际主持人离开会议,第一个加入会议的参与者将成为主持人。