Playing videos from the web in an app

Discussion in 'iOS Programming' started by macman7002, Oct 10, 2011.

  1. macman7002 macrumors regular

    Apr 28, 2008
    Here is something I have be struggling with for the past few days now:

    Playing videos from Vimeo in my app

    What I would like to do is have my app set up so that when the user taps on a button an action is called to load specific Vimeo video and play it back full screen with the timeline on the top and the playback controls on the bottom, with support for device rotation.

    I understand that I could load the video into a UIWebView and have the user tap on the Vimeo supplied 'play' button, but I would really like to be able to start video playback on my own buttonPressed action. Is this possible? If so, is it possible to receive some guidance and maybe some samples to go along with it?

    While on the subject of video playback, and out of curiosity, what's the most professional and effective way of using an iOS app as a display/catalogue of multiple videos in a list that when a user taps on it, it begins playback? Would this involve setting up a dedicated server that hosts .movs that I load into my app and use the MediaPlayer framework to display? I can't recall any specific apps out there that do this, but I know they exist. I'm just curious as to how this is achieved and also, how the "lists of videos" are able to be updated/expanded without pushing out an upgrade to the actual app.

    Hope this made sense. And thank you in advance for any and all help, it is greatly appreciated!!
  2. primedime macrumors member

    Mar 21, 2011
    Ft. Lauderdale, FL
    Your best bet for a list of anything is UITableView. Try that.

    Also, yes there is a way to set a buttonPressed: to play a video. What I would do from the info you gave (which is not much) is have a UITableView list your videos, when you push a cell it goes to a new view which has an embedded video that when pushed would open full screen and play. I am sort of doing something like that now. I am embedding YoutTube though, not sure how Vimeo works.

    As far as the controls of the video, when the video opens it will already have all the standard buttons. You won't need to code that.
  3. macman7002 thread starter macrumors regular

    Apr 28, 2008
    A UITableView would make sense. Could you give me any idea of what it would take to have the TableView load data or populate the list from a source via the Internet? Basically, what would it take to "push" new data to the app? The area of developing apps that interact with non-local data sources is a territory rather new to me, so any advice or starting points would be a huge help.

    I was able to wire-up a view with a UIWebView component that loaded a Vimeo video. The web view displayed the screenshot of the video with a "play" button over the image, upon selecting that button, the video entered playback in full screen mode. Is there any way to be abe to play the video by my own buttonPressed action, regardless of if it's a Vimeo video or not? And is there any more info I could provide? I don't mean to withold information, it's just this is a new territory to me and I think that perhaps I lack the know-how to ask the proper questions here.

    Thank you for your help!

Share This Page