Пример #1
0
#pragma warning restore 0649

        void Awake()
        {
            setUpButton.interactable       = true;
            hangUpButton.interactable      = false;
            connectionIdInput.interactable = true;
            setUpButton.onClick.AddListener(SetUp);
            hangUpButton.onClick.AddListener(HangUp);
            connectionIdInput.onValueChanged.AddListener(input => receiveVideoViewer.ChangeConnectionId(input));
            connectionIdInput.text        = $"{Random.Range(0, 99999):D5}";
            videoStream.OnEnableComplete += () => {
                receiveVideoViewer.enabled = true;
                localVideoImage.texture    = videoStream.SendTexture;
            };
            receiveVideoViewer.OnUpdateReceiveTexture += texture => remoteVideoImage.texture = texture;
        }
Пример #2
0
#pragma warning restore 0649

        void Awake()
        {
            sendOfferButton.onClick.AddListener(SendOffer);
            connectionIdInput.onValueChanged.AddListener(input => receiveVideoViewer.ChangeConnectionId(input));
            receiveVideoViewer.OnUpdateReceiveTexture += texture => remoteVideoImage.texture = texture;
        }