Skip to content

Commit

Permalink
Add support for playback speed
Browse files Browse the repository at this point in the history
  • Loading branch information
JannikLassahn committed Mar 28, 2018
1 parent b18cbde commit 9a3112c
Show file tree
Hide file tree
Showing 15 changed files with 4,294 additions and 1,339 deletions.
5,243 changes: 3,921 additions & 1,322 deletions Assets/Examples/Scenes/YouTube Player.unity

Large diffs are not rendered by default.

Binary file modified Assets/Examples/Sprites/YouTube/Sprites.psd
Binary file not shown.
Binary file added Assets/Examples/Sprites/YouTube/YouTube Arrow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
77 changes: 77 additions & 0 deletions Assets/Examples/Sprites/YouTube/YouTube Arrow.png.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added Assets/Examples/Sprites/YouTube/YouTube Check.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
77 changes: 77 additions & 0 deletions Assets/Examples/Sprites/YouTube/YouTube Check.png.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
77 changes: 77 additions & 0 deletions Assets/Examples/Sprites/YouTube/YouTube Settings HD.png.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ public abstract class AnimationCurveAnimator : MonoBehaviour
private bool smooth = true;

private float time;

private float inDuration;
private float outDuration;

private Coroutine currentCoroutine;

#endregion
Expand All @@ -34,36 +30,36 @@ public abstract class AnimationCurveAnimator : MonoBehaviour
/// <summary>
/// Gets the duration of the <see cref="In"/> animation.
/// </summary>
public float InDuration
{
get { return inDuration; }
}
public float InDuration { get; private set; }

/// <summary>
/// Gets the duration of the <see cref="Out"/> animation.
/// </summary>
public float OutDuration
{
get { return outDuration; }
}
public float OutDuration { get; private set; }

/// <summary>
/// Gets or sets the curve for animating a target in.
/// </summary>
public AnimationCurve In
{
get { return inAnimation; }
set
{
inAnimation = value;
inDuration = inAnimation.keys[inAnimation.keys.Length - 1].time;
InDuration = inAnimation.keys[inAnimation.keys.Length - 1].time;
}
}

/// <summary>
/// Gets or sets the curve for animating a target out.
/// </summary>
public AnimationCurve Out
{
get { return outAnimation; }
set
{
outAnimation = value;
outDuration = outAnimation.keys[outAnimation.keys.Length - 1].time;
OutDuration = outAnimation.keys[outAnimation.keys.Length - 1].time;
}
}

Expand Down
3 changes: 3 additions & 0 deletions Assets/VideoPlayer Helper/Scripts/DisplayController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ public void ToFullscreen(RectTransform rectTransform)

public void ToNormal()
{
if (target == null)
return;

target.SetParent(targetParent);

target.anchorMax = anchorMax;
Expand Down
Loading

0 comments on commit 9a3112c

Please sign in to comment.