I've been going through the Video app tutorial - this is the app which display the video screen above and a list box below where it displays the names of the videos in the /Video folder (unfortunately I don't have permissions to save the link here) and I want to get this going on iOS, as it matches what I want to create for an internal app for my work.
First question, does the default video player work on iOS? My testing seems to show that it doesn't.
The above tutorial has you store videos in a /Video folder where your runrev file is stored. And you create a function that browses to the folder.
But with iOS would I have to copy the videos I want to display into the app there (ie File/Standalone Application Settings/Copy Files first?
This is the code that finds the /Video Folder and then strips out the full path when the app is finished and saved as a bundle....what I want to know is how would I port this over for the app to read video within iOS instead of MacOS?
Code: Select all
function GetVideoFiles
## Get the path to the "Video" folder on disk
put GetPathToFolder("Videos") into theFolder
## Get list of files in the folder
put GetFilesInFolder(theFolder) into theFiles
## Return list of files
return theFiles
end GetVideoFiles
function GetPathToFolder pFolderName
## Retrieving paths to folders that are relative to the stack can be tricky.
## Determine the location of this stack on disk
put the filename of this stack into theFolder
## Folder paths use "/" to separate each folder in the path
## By setting the itemDelimiter to slash we can refer to
## individual sections of the path by the 'item' token in revTalk.
set the itemDelimiter to slash
## When you build a standalone version of this stack on OS X the stack
## file will be located in side of an application bundle. These next few
## lines strip the application bundle portion of the path off.
if the platform is "MacOS" then
if theFolder contains ".app/Contents/MacOS" then
## Delete the last three items of the path that are specific
## to the application bundle
delete item -3 to -1 of theFolder
end if
end if
Cheers Bruce (from New Zealand)