Skip to content

Commit

Permalink
v 1.8.15
Browse files Browse the repository at this point in the history
1.8.14 - added null check for FrameSkilUI
1.8.15 - removed Stop from error checking fixing missing SSL cert bug
1.8.15 - added a resync check for streaming videos - should no longer try to resync on streams
  • Loading branch information
ChildoftheBeast authored Oct 13, 2021
1 parent b8471e7 commit d212e43
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions UdonSyncVideoPlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ public class UdonSyncVideoPlayer : UdonSharpBehaviour
private string DebugString;
private string _debugVars;

private bool isStreaming = false;

#endregion Varibles

private void Start()
Expand Down Expand Up @@ -577,6 +579,7 @@ public void ForceSyncVideo()

public void SyncVideoIfTime()
{
if (isStreaming) return;
if (_ownerPlaying)
{
if (!_ownerPaused)
Expand Down Expand Up @@ -696,6 +699,7 @@ private void SetUpTimeBar()
DebugOut("SetUpTimeBar");
if (TimeSpan.MaxValue.TotalSeconds >= videoPlayer.GetDuration())
{

DebugOut("TimeSpan.MaxValue.TotalSeconds >= videoPlayer.GetDuration() = true");
TimeSpan timeSpan = TimeSpan.FromSeconds(videoPlayer.GetDuration());
if (Networking.IsOwner(gameObject))
Expand All @@ -712,6 +716,7 @@ private void SetUpTimeBar()

//Debug.Log($"[[UdonSyncVideoPlayer] Time Format is (({_timeFormat}))");
_videoDuration = timeSpan.ToString(_timeFormat);
isStreaming = false;
}
else
{
Expand All @@ -723,6 +728,7 @@ private void SetUpTimeBar()
_videoDuration = "Streaming!";
videoTimeBar.value = 1;
//PanelController.SetVideoTimeBarValue(1);
isStreaming = true;
}
}

Expand Down Expand Up @@ -808,7 +814,7 @@ public override void OnVideoEnd()
public override void OnVideoError(VideoError videoError)
{
DebugOut("OnVideoError");
videoPlayer.Stop();
//videoPlayer.Stop();
//Turn off forcePlay since video has error
_forcePlay = false;

Expand All @@ -833,8 +839,8 @@ public override void OnVideoError(VideoError videoError)
{
DebugOut(string.Format("Video Error {0} >> {1}", "[VP05]Quest Unsupport", _syncedURL));
if (ErrorScreens[5] != null) ErrorScreens[5].SetActive(true);
return;
}
return;
}
switch (videoError)
{
Expand Down Expand Up @@ -864,6 +870,7 @@ public override void OnVideoError(VideoError videoError)
break;

default:
DebugOut(string.Format("Video Error {0} >> {1}", "No Error returned", _syncedURL));
break;
}
}
Expand Down

0 comments on commit d212e43

Please sign in to comment.