Getting the Video App tutorial to work on iOS

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
bruceBUSXpd
Posts: 6
Joined: Tue Jan 08, 2013 12:36 am

Getting the Video App tutorial to work on iOS

Post by bruceBUSXpd » Sat Feb 02, 2013 2:05 am

I'm a beginner....so forgive me if this has already been covered in the forums (I did do a search and found nothing).

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
Any suggestions or ideas pointing in the right direction would be greatly appreciated.

Cheers Bruce (from New Zealand)

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1564
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: Getting the Video App tutorial to work on iOS

Post by monte » Sat Feb 02, 2013 4:54 am

Hi Bruce

Take a look in the dictionary for mobileControlCreate, mobileControlSet and mobileControlDo. The player control doesn't work on iOS yet.

Cheers

Monte
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

Post Reply