Blank rectangle in Player on simulator

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
grovecat
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 99
Joined: Thu Aug 04, 2011 10:32 am

Blank rectangle in Player on simulator

Post by grovecat » Mon Sep 12, 2011 8:15 am

Hi
If I put a player on a stack and supply a path to a video, it works fine in the IDE. However, when I run it as an iOS standalone app in the simulator, the player shows as simply a blank rectangle. I'm using the same profile that works OK with another simple app (that does not have a player).

I suspect this is something to do with trying to access a video file from the Mac -- is that the case? And if so, is there any way to embed a video in the stack?

Advice appreciated ...

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: Blank rectangle in Player on simulator

Post by jmburnod » Mon Sep 12, 2011 10:22 am

Hi grovecat
is there any way to embed a video in the stack?
Yes. Check videoclip in the LC dictonary

Best regards

Jean-Marc
https://alternatic.ch

grovecat
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 99
Joined: Thu Aug 04, 2011 10:32 am

Re: Blank rectangle in Player on simulator

Post by grovecat » Mon Sep 12, 2011 10:31 am

Thanks Jean-Marc

Cheers
Don

Klaus
Posts: 14194
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Blank rectangle in Player on simulator

Post by Klaus » Mon Sep 12, 2011 12:01 pm

Hi guys,

you cannot "play" imported videoclips on iOS, you need to reference an external file!
Once you "imported" a videoclip into your tack, there is no way to write it back to disk!

So you should use a custom property of your stack to store a vvideo file and write it back to disk!:

Code: Select all

...
set the cMySuperbVideo of stack "your stack here" to url("binfile:" & "your/path/to/video.mp4")
...
Write back to disk:

Code: Select all

...
put specialfolderpath("documents)" & "/video.mp4) into tVideo
if there is not a file tVideo then
  put the cMySuperbVideo of stack "your stack here" into url("binfile:" &tVideo)
end if
## NOW you can PLAY this thing :-)
...
Best

Klaus

Post Reply