Page 1 of 1

Blank rectangle in Player on simulator

Posted: Mon Sep 12, 2011 8:15 am
by grovecat
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 ...

Re: Blank rectangle in Player on simulator

Posted: Mon Sep 12, 2011 10:22 am
by jmburnod
Hi grovecat
is there any way to embed a video in the stack?
Yes. Check videoclip in the LC dictonary

Best regards

Jean-Marc

Re: Blank rectangle in Player on simulator

Posted: Mon Sep 12, 2011 10:31 am
by grovecat
Thanks Jean-Marc

Cheers
Don

Re: Blank rectangle in Player on simulator

Posted: Mon Sep 12, 2011 12:01 pm
by Klaus
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