vimeo-unity-sdk icon indicating copy to clipboard operation
vimeo-unity-sdk copied to clipboard

Vimeo live stream, ArgumentOutOfRangeException

Open HVossi92 opened this issue 4 years ago • 12 comments

Describe the issue

Hello, I'm trying to access my vimeo live stream inside Unity, but all I get from the Vimeo Player is:

ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) (at <599589bf4ce248909b8a14cbe4a2034e>:0) System.ThrowHelper.ThrowArgumentOutOfRangeException () (at <599589bf4ce248909b8a14cbe4a2034e>:0) System.Collections.Generic.List`1[T].get_Item (System.Int32 index) (at <599589bf4ce248909b8a14cbe4a2034e>:0) Vimeo.VimeoVideo.GetVideoFileByResolution (Vimeo.Player.StreamingResolution resolution) (at Assets/Vimeo/Scripts/Config/VimeoVideo.cs:217) Vimeo.VimeoVideo.GetVideoFileUrlByResolution (Vimeo.Player.StreamingResolution resolution) (at Assets/Vimeo/Scripts/Config/VimeoVideo.cs:193) Vimeo.Player.VideoController.PlayVideo (Vimeo.VimeoVideo _vimeoVideo, Vimeo.Player.StreamingResolution resolution) (at Assets/Vimeo/Scripts/Player/VideoController.cs:110) Vimeo.Player.VimeoPlayer+<VideoControllerPlayVideo>d__50.MoveNext () (at Assets/Vimeo/Scripts/Player/VimeoPlayer.cs:207) UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at C:/buildslave/unity/build/Runtime/Export/Scripting/Coroutines.cs:17) UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator) Vimeo.Player.VimeoPlayer:Play() (at Assets/Vimeo/Scripts/Player/VimeoPlayer.cs:196) Vimeo.Player.VimeoPlayer:VideoMetadataLoad(String) (at Assets/Vimeo/Scripts/Player/VimeoPlayer.cs:377) Vimeo.VimeoApi:ResponseHandler(UnityWebRequest) (at Assets/Vimeo/Scripts/Services/VimeoApi.cs:217) Vimeo.<Request>d__37:MoveNext() (at Assets/Vimeo/Scripts/Services/VimeoApi.cs:236) UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr) (at C:/buildslave/unity/build/Runtime/Export/Scripting/Coroutines.cs:17)

I've also tried using the AVPro Mediaplayer (free trial), which just tells me:

[AVProVideo] Error: Loading failed. File not found, codec not supported, video resolution too high or insufficient system resources. UnityEngine.Debug:LogError(Object) RenderHeads.Media.AVProVideo.MediaPlayer:UpdateErrors() (at Assets/AVProVideo/Scripts/Components/MediaPlayer.cs:1791) RenderHeads.Media.AVProVideo.MediaPlayer:Update() (at Assets/AVProVideo/Scripts/Components/MediaPlayer.cs:1109)

If I mistype the link on purpose, the Vimeo Player tells me, that it couldn't find the video. So that I am getting theArgumentOutOfRangeException feels like it at least found the stream? If I am missing something obvious, I apologize. Thank you in advance for any help.

Steps to reproduce the problem

Create Vimeo Player Get video by ID or URL Start vimeo live stream Copy link and paste into Vimeo Video Url

Unity version

2019.2.8f1

Operating system

Win10

HVossi92 avatar Apr 06 '20 14:04 HVossi92

Same here... So Bad :-(

WeAppU avatar Apr 24 '20 15:04 WeAppU

Same here

jonasfehr avatar May 01 '20 12:05 jonasfehr

Same here...

OscarGutierrezT avatar May 26 '20 05:05 OscarGutierrezT

Same here.

DiegoAyalaE avatar Aug 13 '20 06:08 DiegoAyalaE

Same here

mikeskydev avatar Aug 19 '20 15:08 mikeskydev

Hi there, any plan on working on live streams for this sdk? Thanks

WaltzBinaire avatar Aug 31 '20 15:08 WaltzBinaire

Is there a plan to fix this or should we look into other alternatives?

thomasvanta avatar Sep 01 '20 16:09 thomasvanta

Do the devs even look at this?

BenjaminKeating1986 avatar Sep 12 '20 09:09 BenjaminKeating1986

Whenever we select a fixed resolution eg X360p, and not the "adaptive" choice, we get the aforementioned ArgumentOutOfRangeException.

Looking into it, it seems like the JSON response doesn't include the "progressive" attribute and thus the progressiveFiles array has 0 length.

DragontaleStudio avatar Nov 17 '20 16:11 DragontaleStudio

Hello I am also getting the same issue. Please let me know if there is a way to run live streams for this sdk?

chalise94 avatar Dec 18 '20 08:12 chalise94

I fixed it using avpro and adaptive resolution.

Just replace the isHlsPlatform() function in VimeoVideo.cs with following ,

public bool isHlsPlatform() { return Application.platform == RuntimePlatform.OSXPlayer || Application.platform == RuntimePlatform.OSXEditor || Application.platform == RuntimePlatform.IPhonePlayer || Application.platform == RuntimePlatform.tvOS|| Application.platform == RuntimePlatform.WindowsEditor|| Application.platform == RuntimePlatform.Android; }

muthuselva avatar Feb 03 '21 12:02 muthuselva

Gefting same error 2023?? I got the premium Tier. Contacted Support and they don't know what Unity3D is. So had to give up. Its a shame. I wonder if I need to install another 3rd party tool called "avpro"?? Viewing normal videos work fine. ie from your own Business account. Won't work with "Basic Account".

milkywaystars avatar Oct 05 '23 13:10 milkywaystars