Exemplo n.º 1
0
        void StartVideoLoad(VRCUrl url)
        {
            if (Time.time < _delayStartLoad)
            {
                return;
            }

            if (url != null)
            {
                string urlStr = url.Get();

                // RTSPT sources (and maybe others!?) trigger a spontaneous OnVideoEnd event at video start
                if (currentPlayerMode == PLAYER_MODE_STREAM && urlStr.Contains("rtspt://"))
                {
                    _rtsptSource = true;
                    Debug.Log("[USharpVideo] Detected RTSPT source");
                }
                else
                {
                    _rtsptSource = false;
                }
            }

            Debug.Log("[USharpVideo] Started video load");
            _statusStr = "Loading video...";
            SetStatusText(_statusStr);
            _delayStartLoad     = 0f;
            _loadingVideo       = true;
            _currentLoadingTime = 0f;
            _currentRetryCount  = 0;
            _currentPlayer.Stop();
            _currentPlayer.LoadURL(url);
        }
Exemplo n.º 2
0
 void StartVideoLoad(VRCUrl url)
 {
     Debug.Log("[USharpVideo] Started video load");
     _statusStr = "Loading video...";
     SetStatusText(_statusStr);
     _loadingVideo       = true;
     _currentLoadingTime = 0f;
     _currentRetryCount  = 0;
     _currentPlayer.LoadURL(url);
 }
Exemplo n.º 3
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);
        }
Exemplo n.º 4
0
        void _StartVideoLoad()
        {
            _pendingLoadTime = 0;
            if (_syncUrl == null || _syncUrl.Get() == "")
            {
                return;
            }

            DebugLog("Start video load " + _syncUrl);
            localPlayerState = PLAYER_STATE_LOADING;

#if !UNITY_EDITOR
            _currentPlayer.LoadURL(_syncUrl);
#endif
        }
Exemplo n.º 5
0
 void LoadURL(VRCUrl url, int serial)
 {
     if (!_player)
     {
         return;
     }
     DebugLog($"Load the video with the URL `{url.Get()}` and set the serial to {serial}.");
     _status           = _status & ~_status_stop | _status_fetch;
     _url              = url;
     _serial           = serial;
     _messageText.text = $"Loading";
     _player.Stop();
     _player.LoadURL(url);
     ValidateView();
 }
Exemplo n.º 6
0
 public void LoadAndSeek(float time)
 {
     vPlayer.LoadURL(currUrl);
     queuedTime    = time;
     waitingToSeek = true;
 }