Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Team3D on April 03, 2017, 05:01:33 AM

Title: Video Player component
Post by: Team3D on April 03, 2017, 05:01:33 AM
Hello, are there any plans for adding PlayMaker actions for the Video Player component added in Unity 5.6?
Title: Re: Video Player component
Post by: jeanfabre on April 03, 2017, 07:51:45 AM
Hi,

 yes, very likely :)

 Bye,

 Jean
Title: Re: Video Player component
Post by: Team3D on April 03, 2017, 09:18:52 AM
Do you know roughly when we will see these actions?
Title: Re: Video Player component
Post by: jeanfabre on April 04, 2017, 02:55:42 AM
Hi,

 hopefully within this month, I want to port AVPro as well, so I'll do both at the same time.

Bye,

 Jean
Title: Re: Video Player component
Post by: Team3D on April 04, 2017, 04:27:47 AM
Cool, thanks  :).
Title: Re: Video Player component
Post by: TristanKang on April 30, 2017, 04:18:17 PM
I'm also waiting this.
Title: Re: Video Player component
Post by: play_edu on April 30, 2017, 11:51:29 PM
me too....... ;D
Title: Re: Video Player component
Post by: Vern_S on May 02, 2017, 11:08:12 AM
Any chance this is available or need a Beta Tester? I have a project that was just dumped on me and this would be very beneficial. Less then two weeks to deliver.

Thanks
Title: Re: Video Player component
Post by: jeanfabre on May 03, 2017, 04:33:49 AM
Hi,
 
I am already on this, will become publicly testable before the end of this week, I'll make an announcement on this forum and twitter.

 Bye,

 Jean
Title: Re: Video Player component
Post by: Tillmania on May 03, 2017, 07:19:14 AM
Awesome! I've been looking for this too. Can I get involved in the beta?
Title: Re: Video Player component
Post by: Vern_S on May 03, 2017, 08:46:46 AM
Excellent!!!!
Title: Re: Video Player component
Post by: jeanfabre on May 04, 2017, 01:45:35 AM
Hi,

 It will be open on a public github rep, so yes you can get access to this as soon as I have put it up and will keep working on it :)

 Bye,

 Jean
Title: Re: Video Player component
Post by: Vern_S on May 04, 2017, 03:51:30 PM
For the time being I am trying to write a basic control script to enable video control from Playmaker. Only item I am having problems with is seek. My code is as follows.

Code: [Select]
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
 
public class VideoPlayerControlMod : MonoBehaviour {
 
    public UnityEngine.Video.VideoPlayer vPlayer;
 
    public long longFrame;
    public int currentFrame;
    public int currentSeek;
    public long longSeek;
   
    void Update () {
 
        longFrame = (vPlayer.frame);
        currentFrame = (int)longFrame;
 
        Debug.Log("frameCount " + vPlayer.frame);
 
    }
 
    void OnPlay()
    {
        vPlayer.Play();
    }
 
    void OnPause()
    {
        vPlayer.Pause();
    }
 
    void OnStop()
    {
        vPlayer.Stop();
    }
 
    void OnSeek()
    {
        longSeek = (long)currentSeek;
        vPlayer.frame += (longSeek);
    }
}

Any help would be greatly appreciated.

:)
Title: Re: Video Player component
Post by: Gustav on May 05, 2017, 12:43:07 PM
I'm also looking forward to the Video Player actions.

Thank you for the hard work jeanfabre. :)
Title: Re: Video Player component
Post by: Ofonna on May 05, 2017, 11:54:06 PM
Jean is the best!
Title: Re: Video Player component
Post by: Team3D on May 08, 2017, 11:15:58 AM
Hi Jean, any update on when the Playmaker actions for the video player will be available?
Title: Re: Video Player component
Post by: jeanfabre on May 10, 2017, 04:51:58 AM
Hi,

 yes, just uploaded the first commit on github:

 https://github.com/jeanfabre/PlayMaker--Unity--VideoPlayer/tree/master/Assets/PlayMaker%20Custom%20Actions/VideoPlayer

I'll be distributing this on the Ecosystem when I reached a better states with more coverage of features.

Bye,

 Jean
 
Title: Re: Video Player component
Post by: Tillmania on May 10, 2017, 06:07:04 AM
Thanks Jean! You're a legend :)
Title: Re: Video Player component
Post by: Team3D on May 10, 2017, 07:41:45 AM
Thanks  :).
Title: Re: Video Player component
Post by: Team3D on May 11, 2017, 07:10:39 AM
Hello Jean,

Sorry to keep bothering you about the video player actions (the ones you've released work great by the way, thanks a lot  :)) but do you have any rough date for releasing the rest of the actions? I'm not trying to push, I'm just curious is all as the project I'm working on is heavily reliant on the video player component. Also will there be any actions regarding a seekbar? Once again sorry for bothering you so much.
Title: Re: Video Player component
Post by: jeanfabre on May 15, 2017, 04:52:21 AM
Hi,

 yes, I want to cover the whole API exhaustivly, so yes seeking will be covered.

 I wanted to spend some time on this this morning, but it's gone, I thought I would be able to update the Ecosystem to work with 2017, but I am hitting for url encoding issues... but this week will certainly see some new actions and events, I'll try to get seeking covered too sooner then later.

keep bumping, I need this!

 Bye,

 Jean
Title: Re: Video Player component
Post by: Tillmania on May 16, 2017, 05:28:49 AM
Hey Jean,

Thanks for this! Love the actions so far. Will you be adding actions to change the video clip properties of VideoPlayer objects?

Thanks again!
Title: Re: Video Player component
Post by: jeanfabre on May 17, 2017, 04:57:43 AM
Hi,

 all video clip properties are read only, can you explain or reference what you are trying to edit?

 Bye,

 Jean
Title: Re: Video Player component
Post by: Tillmania on May 17, 2017, 07:27:46 AM
Sorry I meant changing the video clip itself. So swapping one video clip out for another.
Title: Re: Video Player component
Post by: Tillmania on May 19, 2017, 11:44:46 AM
I just saw the commit. Thanks a million Jean!
Title: Re: Video Player component
Post by: jeanfabre on May 19, 2017, 02:11:36 PM
:)
Title: Re: Video Player component
Post by: Team3D on May 24, 2017, 10:58:41 AM
Hi Jean

Finding that last batch of actions super useful thank you, any ideas when actions that will link to a seek-bar will be?

big thanks

Title: Re: Video Player component
Post by: jeanfabre on May 26, 2017, 05:06:11 AM
Hi,

 ok, I just committed some more actions including the ability to control time, so use VideoPlayerSetTime to seek and use the event proxy to know when the time is reached.

 I may do a dedicated action so you can seek in one action given a time and it will fire an event when done. will be easier if you want to be sure seek is reached.

 Bye,

 Jean
Title: Re: Video Player component
Post by: Gustav on May 26, 2017, 09:17:45 AM
That's great, Jean. Thank you.  :D
Title: Re: Video Player component
Post by: Team3D on June 20, 2017, 09:16:39 AM
Hello, will there be an action that will allow you to set the url of the video player component and change it?
Title: Re: Video Player component
Post by: play_edu on June 21, 2017, 12:23:03 AM
Thanks jean. :) :)
Title: Re: Video Player component
Post by: jeanfabre on June 23, 2017, 03:43:30 AM
Hello, will there be an action that will allow you to set the url of the video player component and change it?

d'oh! :)

 it's on now, I just pushed it on the Ecosystem.

 Bye,

 Jean
Title: Re: Video Player component
Post by: Team3D on June 26, 2017, 04:34:23 AM
Thanks  :)
Title: Re: Video Player component
Post by: drown on June 28, 2017, 08:59:35 AM
Amazing work, it is so fun working with the video player component and your actions. I have a question though, is there a way to send a finished event once the clip is played ? I am currently doing it via get frame , maybe I am missing something.

EDIT : Just saw that there are alot more actions on github, I just browsed the Eco System. Sorry , amazing work! The "Loop point reached event" does exactly what I need :P :-X
Title: Re: Video Player component
Post by: jeanfabre on June 29, 2017, 01:57:34 AM
Hi,

 yes, always check the ecosystem browser and if in doubt, simply open the action with the preview button it will take you to the actualy file online, where you can then browse all the actions available without searching for them.

 Bye,

 Jean
Title: Re: Video Player component
Post by: Roboboy1 on July 01, 2017, 05:27:54 PM
Thanks Jean. These new actions are working great. I have run into one issue. When I use the "set video clip" action it works fine. When I use the "player pause" or "player play" action they only work for the original clip. Is there a way to affect the video player object so that any clips it plays are affected?
Title: Re: Video Player component
Post by: jeanfabre on July 03, 2017, 02:51:02 AM
Hi,

Did you renter the state where you have Player Pause and Player Play, the action cache the clip, so it may missed the set clip video action.

else, I'll have a closer look.

 Bye,

 Jean
Title: Re: Video Player component
Post by: Roboboy1 on July 04, 2017, 02:18:12 PM
Yes, you are right. I needed to use separate state machines so that play/pause and toggle work independently of each other. I've got this working now.

The Stop action doesn't seem to be working. I'm targeting a mesh with a video player component and a material using the generated render texture. Is that the wrong way to approach this?

Thanks- Bill
Title: Re: Video Player component
Post by: jeanfabre on July 21, 2017, 09:57:56 AM
Hi,

 odd, if you have a report package, I'll have a look.

 Bye,

 Jean
Title: Re: Video Player component
Post by: Roboboy1 on August 09, 2017, 04:21:39 PM
I tried submitting a bug report from the tools menu but it couldn't connect to host. I've pasted it here in the meantime. This would probably be quicker to build than to get a zip file.

Playmaker: 1.8.4.f5 Unity: 2017.1.0f3 Build target: iOS

1) What happened

The video player stop action doesn't seem to work. I've attached it to a state that receives an event from a button and from a trigger volume. Play and pause work correctly but stop does not.

2) How can we reproduce it

Create a UI button that sends an event to a an FSM attached to a null object. Attach the play, pause, and stop video player actions to a state that is activated by the event. Play and pause work, but stop does not.
Title: Re: Video Player component
Post by: jeanfabre on August 10, 2017, 02:44:04 AM
Hi,

 Indeed, the action was wrong, I fixed it, you can now update it from the Ecosystem.

 Thanks for spotting this :)

 Bye,

 Jean
Title: Re: Video Player component
Post by: Roboboy1 on August 10, 2017, 10:03:49 AM
Thank you for the quick fix Jean. This will help a lot!
Title: Re: Video Player component
Post by: Amin on June 08, 2018, 04:51:32 AM
Hello
this Feature supports Android devices ?!
Title: Re: Video Player component
Post by: Amin on June 08, 2018, 05:54:33 AM
Hello
this Feature supports Android devices ?!
I tested it and worked BUT ...
1- no video sound !
2- has about half a second delay ! ( that mean after splash screen , will be shown camera view and then video turn out! 
please see this video I captured : http://s8.picofile.com/d/8328635200/273dfdc2-9f66-427a-9d01-cb21160ded86/video_player_problem_after_Build.m4v


anyone has experience in this Conditions ?!   ???
Title: Re: Video Player component
Post by: jeanfabre on June 15, 2018, 04:00:03 AM
Hi,

 This is likely because your video codecs are not optimal for Android. You'll need to research what's best for android and experiment. I know no other ways...

Bye,

 Jean
Title: Re: Video Player component
Post by: cloobot on August 27, 2018, 10:58:28 PM
Does this work with AVPro? (ed: tweaked the script; works fine)