Thumbnail

Full Screen Video Player

by Synthiam

Play videos in a fullscreen window that sits on top of everything else. Great for facial animations or user messages.

Requires ARC v9 (Updated 12/10/2023)

How to add the Full Screen Video Player robot skill

  1. Load the most recent release of ARC (Get ARC).
  2. Press the Project tab from the top menu bar in ARC.
  3. Press Add Robot Skill from the button ribbon bar in ARC.
  4. Choose the Display category tab.
  5. Press the Full Screen Video Player icon to add the robot skill to your project.

Don't have a robot yet?

Follow the Getting Started Guide to build a robot and use the Full Screen Video Player robot skill.

How to use the Full Screen Video Player robot skill

Play videos in a fullscreen window that sits on top of everything else. Excellent for facial animations or user messages.

Use ControlCommands to specify videos to play fullscreen. The ESC key can be pressed while a video is playing to cancel the video. Once the ESC key is pressed, this robot skill will not play another video until the Pause New Playback checkbox has been unchecked.

Robot Skill Main Window

User-inserted image

  1. This checkbox will be checked when the ESC key is pressed during video playback. This feature is to prevent emergency loops that continually play videos. When ESC is pressed, this checkbox is checked. No further video playback can be done until this is unchecked by either ControlCommand or manually.

  2. The logging information for errors and activity

Javascript Example

This example will play a video and demonstrate the ControlCommand syntax.



// Begin playing a full video screen
ControlCommand("Full Screen Video Player", "Play Video", "C:\\Users\\dj\\Videos\\Screen Recorder\\637427907140785293.wmv");

// wait for 3 seconds while the video is playing
sleep(3000);

// Start playing another video
ControlCommand("Full Screen Video Player", "Play Video", "C:\\Users\\dj\\Videos\\Screen Recorder\\637430717372916488.wmv");

// wait for 2 seconds while the video is playing
sleep(2000);

// Pause the video
ControlCommand("Full Screen Video Player", "Pause Video");

// Wait for 2 seconds while the video is paused
sleep(2000);

// Resume playing the video
ControlCommand("Full Screen Video Player", "Resume Video");

// wait for 3 seconds while the video has been resumed
sleep(3000);

// Stop the video and close the video player window
ControlCommand("Full Screen Video Player", "Stop Video And Close");

Resolution Scaling

There is a known issue with the 3rd party video library where the video will only display on a portion of the screen. This issue is raised when the Window's scaling resolution is set to a value other than 100%. The workaround for this issue is to set the Window's scaling resolution to 100%.


ARC Pro

Upgrade to ARC Pro

Unlock the true power of automation and robotics by becoming a proud subscriber of Synthiam ARC Pro.

PRO
USA
#1  

What videos formats are acceptable?

PRO
Synthiam
#2   — Edited

What did you try that didn't work? It should play everything you can throw at it.

PRO
USA
#3  

Ok sounds good! Thanks!

PRO
Synthiam
#4  

There seems to be a problem with the upload - it's working on my dev machine but not my laptop. I'll need a bit to sort it out

PRO
Synthiam
#5  

Okay - it's updated and fixed.

PRO
USA
#6  

When you get an opportunity can you check the Pause code on your non-dev machine...I can't seem to get it to work.

// Pause the video
ControlCommand("Full Screen Video Player", "Pause Video");
PRO
Synthiam
#7   — Edited

Works fine - here's the code i tested with...


// Begin playing a video full screen
ControlCommand("Full Screen Video Player", "Play Video", "C:\\Users\\dj\\Videos\\Screen Recorder\\637427907140785293.wmv");

// wait for 2 seconds while the video is playing
sleep(2000);

// Pause the video
ControlCommand("Full Screen Video Player", "Pause Video");

// Wait for 2 seconds while the video is paused
sleep(2000);

// Resume playing the video
ControlCommand("Full Screen Video Player", "Resume Video");

PRO
USA
#8  

Huh..thats the same..let me try again..I like the idea of being able to pause a screen and then resume...very useful

PRO
USA
#9   — Edited

Tested Full Screen Video Player:

first in the java script you presented, then in ez scrip - all went well, works, thanks

PRO
USA
#10  

It was syntax forgot the double ""

PRO
Synthiam
#11   — Edited

Even without the double , you didn't get an error stating the file was not found? Should have hmmmm

User-inserted image

PRO
USA
#12  

Yeah I got that message, but I couldn’t figure out why. I kept moving it around thinking it had to be in a certain place.. not that I needed a double \ for proper location. I’m used to messing in EZ Script, don’t have any experience in JavaScript. It will take some time getting used to it!

#13  

My employer gives me access to a bunch of online training, so it looks like I need to do the Javascript course.  As an old time VB (VB 5 and 6) devoper, I was pretty comfortable with EZ Script, but if Javasript is going to be the future of ARC I need to get up to speed.

@DJ I know you also support Python, do us old folks a favor and stick with one language for your samples.  My brain can only squeeze in so much more before I start losing older critical skills:)

PRO
Synthiam
#14  

I only post Javascript. I'll never post python because i don't like python. Let me know where you saw a mix-up and I'll fix it. But I'm 100% certain I've never posted python as an example.

PRO
Australia
#15  

When I try to use the Full Screen Video Player, it displays only a quarter of the video - the rest is white - see image. The second image is what it should display. What might be the problem here?

User-inserted image

User-inserted image

PRO
Canada
#16  

Hmmm, I just tested it with a .mp4 file in Windows 10, 1920x1040 resolution, 30fps, and it displayed in full screen as expected. I also have 2 external monitors connected.

Have you tried different resolutions and/or file types?

PRO
Australia
#17  

Just tested it with SD and HD and same result - quarter screen only. Tested with MPG, MP4, WMV and same result. Very puzzling. Might try it on a different device.

PRO
Synthiam
#18  

Hmmm. It almost looks like windows wasn’t able to render the whole video - as if it stopped part way while drawing the video box. Let me see if there’s something I can do on our end.

PRO
Australia
#19  

I tried playing a jpeg image and got a quarter screen also. Interesting.

PRO
Australia
#20  

I tried playing a jpeg image and got a quarter screen also. Interesting. Also tried reinstalling the plugin.

PRO
Synthiam
#21  

I’ll be looking at it this weekend. There’s no staff during the weekend so I’ll get it running for ya:)

PRO
Synthiam
#22  

See if this new update v6 resolves the issue

PRO
Australia
#23  

I noticed the plugin had been updated. But the problem remains. In the meantime, I am utilising the DisplayPopup plugin as I can display Emoji using the GoogleEmoji font.

PRO
Synthiam
#24  

Oh, can you tell me what the value is for your display scaling? It’s where the video resolution can be set. It’s a number as a percentage.

we will get to the bottom of this - although it’s a real puzzle!

PRO
Australia
#25  

Do you mean as shown in settings - see below...

User-inserted image

PRO
Synthiam
#26  

Yeah, that's what I'm looking for. Thanks - I'm wondering if the scale has something to do with it. Let me run a few more tests and see if I can reproduce it. I'm not sure what to fix if I can't reproduce it. But as usual, we'll figure it out.:)

PRO
Synthiam
#27  

I am able to reproduce it. Turns out my guess was correct about the scaling value. The video library that this skill uses does not scale correctly. I’m not certain how to fix that, however.

But, the workaround at this time is to set the scale value to 100%

PRO
Australia
#28  

Yes, the scaling is the problem The Full Screen Video Player works properly when set to 100%.  This setting on my 10" Surface Pro tends to make text too small to read. But at least I know the cause. Thanks.

PRO
Synthiam
#29  

Well still look into it. But for the time being that’s a good workaround

PRO
Colombia
#30  

Hi,  I am using this skill since long time ago and it was working well but recently, I started to have this error message every time. The screen turns black.

Application Exception: System.NullReferenceException: Object reference not set to an instance of an object. at FullScreenVideoPlayer.FormVideoPlayer.ProcessCmdKey(Message& msg, Keys keyData) in C:\My Documents\SVN\Developer - Controls\In Production\Full Screen Video Player\MY_PROJECT_NAME\FormVideoPlayer.cs:line 29 at System.Windows.Forms.Control.PreProcessMessage(Message& msg) at System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg) at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)

Thanks in advance for your support.

PRO
USA
#31   — Edited

Sorry to hear about your problem, I am sure DJ will address that

I Changed Window's scaling resolution to 100%, --- this works

I use 125% all the time, so I just change it to 100% for this

tried asf, mp3, mp4, jpg, gif, all work

no text files, rtf, doc, txt...

Nice app, thanks

PRO
Synthiam
#32  

What’s the code command that you’re sending to it?

PRO
Colombia
#33  

This is the code command:

ControlCommand("Full Screen Video Player", "Play Video", "C:\\Users\\ATOM X\\Documents\\ATOMX\\faces\\3Atom_bravo.mp4")

The estrange thing is that if I open an empty ARC file and I just include the script (python) and the skill, it works, but when I put exactly the same script in my main ARC file with the other skills the problem happens.

Just to complement I am working now in WIN 11.

PRO
Synthiam
#34  

What if you remove the robot skill from your main ARC file. Then re-add it. Does that fix it?

it almost looks like a corrupted configuration file somehow

PRO
Colombia
#35  

Yes it seems a corrupted configuration file, I did it multiple times but without success, is it possible that any other Skill can interfere with this one?

PRO
Synthiam
#36  

Can you try this

  1. remove the skill

  2. save the project

  3. load the project

  4. add the skill

PRO
Colombia
#37  

Ok I will do it and let you know. The results Thanks.

PRO
Colombia
#38  

HI, I made the suggested steps but still unfortunately it is not working.

PRO
USA
#39   — Edited

In Ez script

ControlCommand("Full Screen Video Player", "Play Video", "C:\Users\ATOM X\Documents\ATOMX\faces\3Atom_bravo.mp4")

or your directory is wrong where the 3Atom_bravo.mp4 is located

Mine works fine

PRO
Colombia
#40  

Thanks! . Yes when I try with a fresh ARC file It works, but doing the same with the ARC file with the rest of my Skills it stops working.  I will try to rebuild my full ARC file (merging the skills) by parts to see when it starts to have the problem.

#41   — Edited

V7 updated. We have updated this robot skill to capture and handle this error. We don't know how to replicate the error. However, we are now capturing it.

PRO
Colombia
#42  

Thanks. Here is the error message.

System.ArgumentException: Invalid handle pointer.
Parameter name: handle
   at Mpv.NET.API.Mpv.set_Handle(IntPtr value) in C:\My Documents\SVN\Developer - Controls\In Production\Full Screen Video Player\MY_PROJECT_NAME\Mpv.NET\API\Mpv.cs:line 41
   at Mpv.NET.API.Mpv.InitialiseMpv() in C:\My Documents\SVN\Developer - Controls\In Production\Full Screen Video Player\MY_PROJECT_NAME\Mpv.NET\API\Mpv.cs:line 95
   at Mpv.NET.API.Mpv..ctor(String dllPath) in C:\My Documents\SVN\Developer - Controls\In Production\Full Screen Video Player\MY_PROJECT_NAME\Mpv.NET\API\Mpv.cs:line 59
   at Mpv.NET.Player.MpvPlayer.InitialiseMpv(String libMpvPath) in C:\My Documents\SVN\Developer - Controls\In Production\Full Screen Video Player\MY_PROJECT_NAME\Mpv.NET\Player\MpvPlayer.cs:line 546
   at Mpv.NET.Player.MpvPlayer.Initialise() in C:\My Documents\SVN\Developer - Controls\In Production\Full Screen Video Player\MY_PROJECT_NAME\Mpv.NET\Player\MpvPlayer.cs:line 524
   at Mpv.NET.Player.MpvPlayer..ctor(IntPtr hwnd, String libMpvPath) in C:\My Documents\SVN\Developer - Controls\In Production\Full Screen Video Player\MY_PROJECT_NAME\Mpv.NET\Player\MpvPlayer.cs:line 518
   at FullScreenVideoPlayer.FormVideoPlayer.PlayVideo(String filename, Boolean loop) in C:\My Documents\SVN\Developer - Controls\In Production\Full Screen Video Player\MY_PROJECT_NAME\FormVideoPlayer.cs:line 61

I hope this helps.

PRO
Synthiam
#43   — Edited

I can't quite understand what's going on with this 3rd party library error. Are you sure the same file plays with a new empty project? The error appears that the robot skill is unable to play the video file.

PRO
Colombia
#44  

Hi,  yes and I tried also with mp4 and avi formats. It is very strange.

Not sure if it is something related with WIN 11 as it worked well when i had Win 10.

PRO
Synthiam
#45   — Edited

We use win11 as well so that’s not it. Are there multiple copies of this robot skill in the project?

PRO
Colombia
#46  

No just 1 instance. But te ARC file has a lot of skills. I was also ensuring that any other script was not running during the test.

PRO
Synthiam
#47  

Is there a way that I can see your project to test with?

PRO
Colombia
#48  

Yes , please let me know how do you want I share it. I will be available in a couple of hours to do that.

PRO
Synthiam
#49  

You can share it via the cloud. Save jt to the cloud and tell me what the project is named.

PRO
Colombia
#50   — Edited

Hi D.J. The name is ATOM test. Thanks

PRO
Colombia
#51  

Hi,  did you have the chance to check the file?  Thanks

PRO
Synthiam
#52  

Is there a way you can share the video file as well? Maybe drop box?

PRO
Colombia
#53  

HI DJ, I was testing with different type of videos with the same result so it seems it is not a problem of the file. I found something that could help and is that I started with an empty ARC file and merging the skills and testing each time. When I merged the skill for Speech synthesis and Speech synthesis Settings, I started to have the problem.   Also I noticed that the Smart Variable Watcher generates a problem in the Camera skill when trying to track something.

I hope this helps.

PRO
Colombia
#54  

Hi, I could play some videos but I am now receiving the following message:

System.ArgumentException: Invalid handle pointer.
Parameter name: handle
at Mpv.NET.API.Mpv.set_Handle(IntPtr value) in E:\Documents\SVN\Developer - Controls\In Production\Full Screen Video Player\MY_PROJECT_NAME\Mpv.NET\API\Mpv.cs:line 41
at Mpv.NET.API.Mpv.InitialiseMpv() in E:\Documents\SVN\Developer - Controls\In Production\Full Screen Video Player\MY_PROJECT_NAME\Mpv.NET\API\Mpv.cs:line 95
at Mpv.NET.API.Mpv..ctor(String dllPath) in E:\Documents\SVN\Developer - Controls\In Production\Full Screen Video Player\MY_PROJECT_NAME\Mpv.NET\API\Mpv.cs:line 59
at Mpv.NET.Player.MpvPlayer.InitialiseMpv(String libMpvPath) in E:\Documents\SVN\Developer - Controls\In Production\Full Screen Video Player\MY_PROJECT_NAME\Mpv.NET\Player\MpvPlayer.cs:line 546
at Mpv.NET.Player.MpvPlayer.Initialise() in E:\Documents\SVN\Developer - Controls\In Production\Full Screen Video Player\MY_PROJECT_NAME\Mpv.NET\Player\MpvPlayer.cs:line 524
at Mpv.NET.Player.MpvPlayer..ctor(IntPtr hwnd, String libMpvPath) in E:\Documents\SVN\Developer - Controls\In Production\Full Screen Video Player\MY_PROJECT_NAME\Mpv.NET\Player\MpvPlayer.cs:line 518
at FullScreenVideoPlayer.FormVideoPlayer.PlayVideo(String filename, Boolean loop) in E:\Documents\SVN\Developer - Controls\In Production\Full Screen Video Player\MY_PROJECT_NAME\FormVideoPlayer.cs:line 61

I am using the same script that worked before.  The only change is that I included in the project the Speech Synthesis and bing speech recognition skill.  Thanks in advance.

PRO
Synthiam
#55  

Have you tried deleting the plugin folder and trying again? You'll have to close ARC first. I can't imagine the issue because it can't be replicated.

Look in C:\ProgramData\ARC\Plugins

And remove the folder labeled ca1d424d-485d-4639-9eda-5e15be335115

PRO
Colombia
#56  

Ok thanks, I will do it.

#57  

Nice I have been waiting on a "face animation" tool for synthiam, I am glad it is available to tinker with now.

PRO
Australia
#58  

I reinstalled latest ARC and the Full Screen Video Player plugin. Tried your video file and no joy, Still the same error message. Just gives me a black screen for the sleep time.  I will keep fiddling. This is my code...

controlCommand("Full Screen Video Player", "Play Video", "c:\temp\testvid.wmv") sleep(8000) controlCommand("Full Screen Video Player", "Stop Video And Close")

PRO
Synthiam
#59  

Are you using two \ (Backslashes) in the filename? I can't tell by what you pasted because it's not in a CODE tag so it will have escaped any multiple slashes..

I tried this and it worked for both JavaScript and EZScript. I'm not sure what you're using because you didn't specify. But the syntax is the same for both in this case...

controlCommand("Full Screen Video Player", "Play Video", "c:\\temp\\testvid.wmv") 
sleep(8000) 
controlCommand("Full Screen Video Player", "Stop Video And Close")
PRO
Australia
#60   — Edited

It finds the video file OK. Just won't play it. Must be something on my laptop. I have tried double \.

PRO
Australia
#61   — Edited

I got the Full Screen Video Player to work but only with a new test project with no other controls. If I then open the project in which I want to use the Full Screen Video Player, the same script does not work. If I then open the test project again, it doesn't work either. I have to close ARC, re-open the test project, then the Full Screen Video Player works again.

I opened JD Bare and then the test project and the Full Screen Video Player worked. I then opened a larger project, closed it, re-opened the test project, and Full Screen Video Player did not work. That seems like some sort of memory problem to me.

PRO
Australia
#62   — Edited

More testing today. I started with a blank project and gradually merged my main project one control at a time, testing the Full Screen Video Player each time. It worked perfectly, even after I had merged every control. I then closed ARC and opened that new project. Suddenly the Full Screen Video Player did not work again and that same error message is displayed.

I have found the problem, at least on my laptop. It is the Speech Settings skill. As soon as this skill is added to my video test project, the Full Screen Video Player will not work after closing ARC and re-opening this project.. Also, I cannot uninstall or re-install the Speech Settings Skill or find it in the Plugins folder.

PRO
Synthiam
#64  

Updated with the latest library and recompiled against latest ARC framework.

PRO
Australia
#65  

The Full Screen Video Player in your sample project does not work for me, unless I remove the Speech Settings Skill, save and close ARC, and re-open the project without the Speech Settings Skill. It's a weird problem that's for sure. Should I try re-installing ARC?

PRO
Synthiam
#66  

Did you update to the latest plugin version 9 as I noted before your most recent comment?

PRO
Australia
#67  

ARC did ask me to update the The Full Screen Video Player skill, so yes, version 9 is installed.

PRO
USA
#68   — Edited

Tried it again, works good

afcorson, make sure you add a second back slash \ to your file

Ex. ControlCommand("Full Screen Video Player", "Play Video", "C:\Users\Videos\anything.mp4");

make sure you have the right path to your video or mp3

set the Window's scaling resolution to 100%. for videos

PRO
USA
#69  

Tried it again today, still works well. mp4, mp3 whatever