示例#1
0
        public void _HandleUrlInput()
        {
            if (!Utilities.IsValid(videoPlayer))
            {
                return;
            }

            pendingFromLoadOverride = loadActive;
            pendingSubmit           = urlInput.GetUrl();

            SendCustomEventDelayedSeconds("_HandleUrlInputDelay", 0.5f);
        }
示例#2
0
 public void OnURLChanged()
 {
     if (string.IsNullOrEmpty(_addressInput.GetUrl().Get()))
     {
         return;
     }
     DebugLog($"The URL has changed to `{_addressInput.GetUrl().Get()}`. Next serial is {_serialSync + 1}.");
     _urlSync = _addressInput.GetUrl();
     _serialSync++;
     SetOffsetTime(GetOffsetTime(_urlSync.Get()));
     LoadURL(_urlSync, _serialSync);
 }
 // Event called locally by any person who enters a new URL
 public void _u_ChannelEntered()
 {
     debug._u_Log("[YoutubeVideoInfo] _u_ChannelEntered");
     // Always sync URL across all players' clients, even if it
     // isn't a valid youtube video.  It would be better if there
     // were deserialization callbacks on the main video player to get
     // its synced url instead.
     requestingOwnership = true;
     Networking.SetOwner(Networking.LocalPlayer, gameObject);
     syncedURL = urlField.GetUrl();
     syncedURLserializations++;
     RequestSerialization();
     _u_Resync();
 }
示例#4
0
    public void OnURLChanged()
    {
        VRCUrl url = inputField.GetUrl();

        if (url != null)
        {
            Debug.Log("OnURLChanged url: " + url.ToString());
        }
        if (!Networking.IsOwner(gameObject))
        {
            Debug.Log("Take ownership");
            Networking.SetOwner(Networking.LocalPlayer, gameObject);
        }
        _syncedURL = url;
        unityVideoPlayer.LoadURL(url);
    }
示例#5
0
        public void HandleURLInput()
        {
            if (!Networking.IsOwner(gameObject))
            {
                return;
            }

            _syncedURL = inputField.GetUrl();
            _videoNumber++;

            _loadedVideoNumber = _videoNumber;

            _currentPlayer.Stop();
            _currentPlayer.LoadURL(_syncedURL);
            _ownerPlaying = false;

            _videoStartNetworkTime = float.MaxValue;

            Debug.Log("Video URL Changed to " + _syncedURL);
        }
示例#6
0
 public void HandleURLInput()
 {
     PlayVideo(inputField.GetUrl(), true);
 }