Page 2 of 2

Re: Play Video

Posted: Wed Nov 21, 2018 7:17 pm
by Klaus
FourthWorld wrote:
Wed Nov 21, 2018 6:45 pm
Klaus wrote:
Wed Nov 21, 2018 12:16 pm
Just repeated the test, but put the video into a folder named "VideoFolder", changed the buttons script to:

Code: Select all

on mouseUp 
   set the filename of player 1 to (specialfolderpath("resources") & "/VideoFolder/testvideo.mp4")
end mouseUp 
And it also worked as advertized.
Now try that on Linux. ;)
Why should I? I don't run or need Linux.

Re: Play Video

Posted: Wed Nov 21, 2018 9:12 pm
by FourthWorld
Klaus wrote:
Wed Nov 21, 2018 7:17 pm
FourthWorld wrote:
Wed Nov 21, 2018 6:45 pm
Klaus wrote:
Wed Nov 21, 2018 12:16 pm
Just repeated the test, but put the video into a folder named "VideoFolder", changed the buttons script to:

Code: Select all

on mouseUp 
   set the filename of player 1 to (specialfolderpath("resources") & "/VideoFolder/testvideo.mp4")
end mouseUp 
And it also worked as advertized.
Now try that on Linux. ;)
Why should I? I don't run or need Linux.
The smiley face indicates that the post is not too be taken too seriously.

It's just my ongoing envy with LiveCoders to can be content with only two of the three desktop platforms LiveCode supports, as video stopped working in LiveCode on Linux about the time it became robustly reliable in all the other apps I use there.

Carry on....

Re: Play Video

Posted: Wed Nov 21, 2018 10:46 pm
by bogs
FourthWorld wrote:
Wed Nov 21, 2018 9:12 pm
...as video stopped working in LiveCode on Linux about the time it became robustly reliable in all the other apps I use there.
I think for 'nix (provided your using a distro the latest Lc works on) you just need mplayer, but I could be off on that since the last fully working edition here was 8.0.1.

Having re-read that, it might come off as sounding bitter, but take it for what it says instead, as I don't actively use any editions past 6.6x for coding, and won't be switching up anytime soon.

Re: Play Video

Posted: Fri Nov 23, 2018 6:49 pm
by chelling
I think I have the codec issue working. I was staying in development mode and issuing the play command from the message box. Once I change to run mode, it was fine.

I did have "specialfolderpath("resources") & "/VideoFolder/<video name>")" originally, but ran into problems. I will check it again. It works perfectly in Mac. I am porting this to iOS and not have any issues at all.

I also copied the VideoFolder to the Copy Files pane of the standalone settings. Just to clarify, when I do this, is the resource folder automatically created? On the Mac side, I can see the resource folder with the VideoFolder folder containing all the videos. Does this somehow happen on Windows builds? If so, does that mean that the app is no longer dependent on having VideoFolder in the same folder as the .exe?

Also, two additional issues in Windows...Transitions are not always working, and there are intermittent screen flashes. The videos are full screen. Could that the problem? The screen flashes could have implications for persons with seizure disorders. Does anyone have any input?

Thanks again for everyone's input and help. @FourthWorld if I could move this to any platform other than Windows I would in an instant :)

Re: Play Video

Posted: Sat Nov 24, 2018 1:46 am
by chelling
I don't think there is anything I will be able to do about the screen flashes; apparently visual effects don't have any effect on player objects and buffering no longer is a work-around to prevent screen flickers. The last thing.... under Windows 10, the videos stop within a second or two of starting. There is no play stop message being sent. Any ideas? Ironically, it only happens with mouse input. If I select the scanning option (used for persons who are not able to use their hands) the videos play through as expected.

Re: Play Video

Posted: Sat Nov 24, 2018 11:02 am
by Klaus
Hi chelling,

1. on Windows, there is no folder "resources" being created by the standalone builder.
You will end with everything in the folder that contains the EXE file, which of course a bit confusing.
See my screenshot in an earlier post. Or look at your hd after creating the standalone. 8)

2. If you add your "VideoFolder" then you will find it in the folder with the EXE file after creating the standalone.
To make this work:
...
put specialfolderpath("resources") & "/VideoFolder/video.mp4" into tVideoFile
set the filename of player XYZ to tVideoFile
...
You need of course the folder "VideoFolder"!

3. specialfolderpath("resources") will point to that folder with the EXE file on Windows although there is in fact no folder named "resources". This is just a parameter to the specialfolderpath codes!.
On the Mac this is another story.

4. How did you script your visual effects for the player objects?
Usually they do not work with players, as you have experienced.


Best

Klaus