AVPlayerViewController questions about multiple buttons

Discussion in 'iOS Programming' started by MrWoofus, Dec 23, 2016.

  1. MrWoofus macrumors member

    MrWoofus

    Joined:
    Jun 20, 2016
    Location:
    Grubville, MO
    #1
    Ok, so here's the scenario in a nutshell

    Have been playing with Xcode for about a week now. (Seasoned veteran) ;) Here's what I'm trying to accomplish.

    I went through am online tutorial that makes simple button (more of a text link, really) that when clicked, opens a video stream (an m3u8 file) and plays it in the iPad video app. Simple enough... I'm pretty proud of it actually working! ;)

    So here's the dilemma:

    I need to make another 100 or so links (To do the same thing)

    Is there an easy way to just copy the button and change the url is points at?

    I came up with a brilliant idea today of just creating an local HTML page with the links, then having that be the "App" but have had no luck with that. (Haven't given up on that idea yet)

    Any ideas, suggestions?
     
  2. Dookieman macrumors 6502

    Joined:
    Oct 12, 2009
    #2
    How are you building this? In a tableView? I would have an array of URLs and just pass the AVPlayer the new URL based on which button is pressed.
     
  3. MrWoofus thread starter macrumors member

    MrWoofus

    Joined:
    Jun 20, 2016
    Location:
    Grubville, MO
    #3
    I found some example code on how to build a button and make it play a stream and just went through and customized it. Not really sure how to go about doing tableview and passing the new URL stuff but, I can put that on my "List of stuff I need to Google" for today! ;)
     
  4. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #4
    Look at the Master Detail Template app that you can build in Xcode under New Project. If your master table is your list of videos and the detail view controller plays the video that may be close to what you want.
     
  5. MrWoofus thread starter macrumors member

    MrWoofus

    Joined:
    Jun 20, 2016
    Location:
    Grubville, MO
    #5
    I'll take a look and see what I can figure out. :)
    --- Post Merged, Dec 23, 2016 ---
    Ok, so I'm pretty sure I'm closing in on a solution... (famous last words)

    Does anyone know an html code to open an m3u8 stream in the native video player on an iPad?

    (so I can stop it and return to the list)
     

Share This Page