Playmaker Forum

Playmaker Help & Tips => Playmaker Help => Topic started by: Lunahalo on March 07, 2018, 10:05:39 AM

Title: Video player get a url video's length[SOLVED]
Post by: Lunahalo on March 07, 2018, 10:05:39 AM
I've worked on the video player element and created a track bar using a set up in the attached image.  this gave me an easy way to give the user standard controls of the video.

it works when it reference a video clip contained within the application but when i tried to switch it over to reference a url it no longer works.  the action that stops functioning is "video clip get length" and i haven't been able to fine an action that gets me this number for a url video.  i could just hard code the length of each video but who the hell wants to do that?

ps i've also tried using "video player get frame count" and that act really weird, i've attached images of what it looks like before and after i hit play.
Title: Re: Video player get a url video's length
Post by: jeanfabre on March 08, 2018, 05:33:59 AM
Hi,

 d'oh!, I fixed the action, please update the from the ecosystem.

VideoPlayerGetAudioTrackCount
VideoPlayerGetControlledAudioTrackMaxCount
VideoPlayerGetCurrentFrameIndex
VideoPlayerGetFrameRate

 Bye,

 Jean
Title: Re: Video player get a url video's length[SOLVED]
Post by: Gaz on October 10, 2018, 03:24:46 AM
Hi Jean,

I'm having the same problem, I've updated the "video clip get length" action from the eco system, and it's still not getting a length.

It was working fine when using "Video Clip" but using a URL is returning 0 on the clip (the clip has loaded and is playing fine).

Edit:
Turns out that "Get video clip length" won't work for URL, and Jean updated the script "Video Player Get Frame Count"

For a URL video clip, to work out the length I did the following:
Title: Re: Video player get a url video's length[SOLVED]
Post by: jeanfabre on October 11, 2018, 02:04:17 AM
Hi,

 cool, thanks for the tip! maybe you should report that to Unity, seems odd that length is missing when coming from a url

 Bye,

 Jean