Page 1 of 1
Stack VideoClips, importing & listing them programmatica
Posted: Sat Sep 20, 2008 10:50 pm
by kotikoti
Hi All,
Please point me to how-to achieve this setup.
Can I add video resources to the application at run time, and if so, can I script a means to list them in an object.
Code: Select all
repeat with x = 1 to (the number of controls of this stack)
put the long id of control x of this stack after tCtlRef
end repeat
put tCtlRef
Seen above code from the postings here, but does only show cards of the stack (of the main stack an not for substacks), for this code also, please advice on how I can list cards on the substack & the substacks avaiable from the application
...
Regards,
Koti2
Posted: Sun Sep 21, 2008 12:27 am
by bn
hi kotikoti
for the cards of a mainstack and all substacks try this
Code: Select all
on mouseUp pMouseBtnNo
put "" into tMainStackCards
put "" into tSubCards
put the mainstack of this stack into tMainStack
put the substacks of stack tMainStack into tSubStacks
repeat with i = 1 to the number of cards of stack tMainstack
put the long name of card i of stack tMainstack & return after tMainStackCards
end repeat
repeat for each line aSubstack in tSubStacks
repeat with j = 1 to the number of cards of stack aSubstack
put the long name of card j of stack aSubstack & return after tSubCards
end repeat
end repeat
put tMainStackCards & tSubCards
end mouseUp
if you want to get at all the controls it depends on what you want
say you want the audioclips of a stack you could say (audioclips 'live' in a stack)
Code: Select all
on mouseUp
repeat with x = 1 to (the number of audioclips of this stack)
put the long id of audioClip x of this stack & cr after tCtlRef
end repeat
put tCtlRef
end mouseUp
for the substacks you would have to repeat that for each of the substacks
if you want to know all the graphics of a stack you would have to look at each card, since that is where they live.
to play video, why dont you use a player object and set the filename of player x to a valid path to a video file. You can do this at runtime from a script whithout problems. I think you need Quicktime for this on windows, but others know more about players on windows. Please look it up in the dictionary.
cheers
bernd
Posted: Sun Sep 21, 2008 12:33 am
by kotikoti
Thanks
bn for the timely responce, checking out the solution you have provided...
Thanks for pointing me to this... have managed to id the names as below, planning to use them in a list and have the name displayed for selecion and then the video will play in videoobject. Plan is to import video dynamically as they become available (deleting as you go along of course)
Code: Select all
put the long id of videoClip x of this stack & cr after tCtlRef
put the short id of videoClip x of this stack & cr after tCtlRef
put the long name of videoClip x of this stack & cr after tCtlRef
put the short name of videoClip x of this stack & cr after tCtlRef
Posted: Sun Sep 21, 2008 10:39 am
by malte
Hi,
if you plan to import video / audio on the fly, a player control might be the better choice, as it gives you more control over the content. You can create a player control and then change its filename property.
set the filename of player "myPlayer" to "path/to/the/clip"
All the best,
Malte
Posted: Sun Sep 21, 2008 11:13 am
by Mark
Hi,
With regard to getting a list of object,
this link may be useful. Put the scripts in a stack in use, a backscript or the script of your main stack.
Best,
Mark
Posted: Sun Sep 21, 2008 7:34 pm
by kotikoti
Malte,
Still puzzled with the player object and playing the videoclips imported into the stack. Just realized, as a standalone, the import may not work anyway so, will have to rethink the design. If anyone can confirm this please advice: Can you import into the application (standalone) new content as videoclips/audioclips?
Mark. Thanks for the link, new approach as well to be investigated.
Regards,
Koti2
Posted: Mon Sep 22, 2008 4:45 pm
by bn
kotikoti,
I posted a stack on revonline, see under user berndniggemann, maybe it gives you some ideas.
Could you describe a little more in detail how the videoclips/player should work in your application then it is easier to answer. The player in certain situation can be a bit demanding, in others it works right out of the box.
For example, do you want user interaction or not. Do you want to place things in front/on top of the player. For that you would have to set the alwaysbuffer to true- but then the controls dont work anymore and you would have to script buttons/controls for that. Some of that you can try out in the stack I posted which is a good example for no user interface at all... Just a couple of buttons. If you play around with it you might have some questions. I looked for a tutorial stack but did not find any for the player. Although in the Revolution application folder-> resources-> sample projects-> there is a stack Video capture. this is not exactly what you want but you see the player in action.
regards
bernd
Posted: Mon Sep 22, 2008 8:00 pm
by kotikoti
Hi bn,
What I have in mind is to have video resources downloadable from a web link, and have the application import them into the application, read somewhere that for this import on a standalone to work, will need to have a stack available as a .rev file in the distribution since an exe will not import to itself (haven't got to that stage yet to test though).
The media need to be secured in some way hence the thought that an import may be more ideal, but will love to hear folks suggestions to this.
There will not be a need to place objects on the video, but will need to have the video controls available for playback, also, behind the scenes need to keep track of video location as it plays since might need to build a bookmark facility where the user can save that info via a button, that's the jist of the idea...
Will download the sample file and see what can be achieved.
Regards
Kotikoti
Posted: Mon Sep 22, 2008 10:37 pm
by Mark
Hi Kotikoti,
Do you want to import movies and save them, or do you only want to display them during the current session and possibly import them again next time?
You should keep in mind that media can
always be copied without much trouble. It is extremely easy to plug a monitor into a recorder and record whatever is to see and hear. There is also software that can do this. In fact, I made such
software, even though it isn't intended for copying copyrighted media. So, securing your media probably makes little sense. If one really wants to copy it, one will.
You'd better give the user a good reason to pay for the media, if that's why you want to secure it.
That said, there are several ways to do what you want. If the movies are not too large, you can simply create a player object and set the filename to the url to the movie on your server. It might take a little while to load, but usually you can start playing immediately.
Some people reported to encounter problems when setting the filename of a movie to a url. As an alternative, you can create a
SMIL file, which refers to the movie on your server. Create a player object in your stack and set the filename of the player to the file path to the SMIL file.
A more elegant solution would be to use a streaming server. This way, people will at least never have the complete movie on their own hard disk or in memory. Again, there are two ways to achieve this. Once you have set up a streaming server, you can approach the server either by its own url or by directing the player object to a local file that refers to your server. I would recommend using a local file in this case. This seems to be a little more reliable.
Finally, you could also use the revBrowser external. Create a simple web page and set the htmlText of the browser to your html code. You can embed a movie, which can directly refer to the movie file on your server, or to a streaming server, or to a local file that in turn refers to your streaming server.
Now regarding the video location, would that be the url to your server? Just provide the user with a window containing a list of movies. You could create a custom property that combines the movie names, which the user can click on, with the url's.
I guess a lot more could be said on this topic. I'll leave that to Bernd for now ;-)
Best,
Mark
Posted: Mon Sep 22, 2008 11:25 pm
by kotikoti
I can see this is going to be more complicated than I had anticipated.
Thanks Mark for your imput, I think I can persuade the end users to support the cause since as you put it, someone intending to copy the movie can do that in a number of ways, since the video only forms part of the resource for the whole intended appliaction, will find ways to ensure that the movie's relevance will still need to be tied in with the application.
btw, used the built-in routine to interrogate whether QT is installed on a machine, this reported back ok as version 6.5 (believe that was the number) even though on the machine, couldn't find QT player at all, that threw me off abit since the check for QT was assumed to be complete, now what I get in the place of the video object is a blank, which accepts any gabbage from the machine, i.e. dialog boxes remain shown even after clicking them, also shows background application as an image, anyway, think a better check for QT may be required...
sorry not on the offending machine to grab a screen shot, WHY doen't this forum allow upload of files?
Posted: Mon Sep 22, 2008 11:25 pm
by bn
I'll leave that to Bernd for now

too much honour for my humble knowledge...
I did do my main applications with video and the player, but all that locally, no fancy streamingstuff, encryption, not even standalone, just the old Hypercard way with stacks. Though I did some wrestling with the player others know way more than I do...
I even know some people who use the EnhancedQT-externals in a Revolution standalone product. Dont you Mark
cheers
bernd