[Release] [New 3DS browser only] Twitch Client for New 3DS (browser-based)

Discussion in '3DS - Homebrew Development and Emulators' started by jsa, Dec 14, 2015.

  1. jsa
    OP

    jsa GBAtemp Regular

    Member
    213
    196
    Oct 21, 2015
    United Kingdom
    Devon, UK
    Hey GBAtemp,
    I made a web app that lets you watch live Twitch streams with the New 3DS browser!

    Not all streams work as some of them are only available in resolutions higher than the N3DS browser can handle (over 854x480) but most do, like TwitchPlaysPokemon.

    There might still be a couple of bugs and the UI needs redoing but it works pretty well.

    You don't even need a homebrew-compatible New 3DS to use it, as it runs entirely in the browser!

    Please note that this ONLY WORKS ON THE NEW 3DS, and not the standard 3DS, because it uses the advanced capabilities of the New 3DS browser to function.
    If I ever find a way to make this work on an Old 3DS then I'll get to it, but as is there isn't. (The YouTube app won't play videos not encoded by YouTube for some reason, even though it can load other websites)

    It will also work with the Wii U browser, as it has the same feature set as the New 3DS.

    Here's the link: http://jsa.x10host.com/twitch/
     
  2. DarkRioru

    DarkRioru Dream Beeeeeaaaammmm!!!

    Member
    1,993
    423
    Aug 29, 2015
    United States
    looking up at the stars
    can you make a facebook or twitter client?? this is awesome!!! thank you!!!!

    — Posts automatically merged - Please don't double post! —

    nevermind.. I thought this was an app... DX
     
  3. GalladeGuy

    GalladeGuy Freeze Kirby :3

    Member
    2,588
    2,652
    Oct 28, 2015
    United States
    Cool! I'd rather use my computer though tbh.
     
  4. RosaliinaDaHacker64

    RosaliinaDaHacker64 3DS font intermediate/expert

    Member
    617
    305
    Oct 7, 2015
    Ireland
    F:\gm9\out
    This is amazing!
     
  5. peteruk

    peteruk GBAtemp Advanced Maniac

    Member
    1,514
    714
    Jun 26, 2015
    Great stuff this, thank you
     
  6. MRJPGames

    MRJPGames Pretty great guy

    Member
    1,111
    717
    Aug 17, 2013
    Netherlands
    The Netherlands
    This is nice, but you should probably check if the user actually exists, if they do not you currently get errors telling you the file_get_content failed, aka the page didn't exist on twitch's end. This is the full error report thingy:
    Code:
    Warning: file_get_contents(https://api.twitch.tv/kraken/channels/afjnssafdfdsfascadc): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in/home/jsax10ho/public_html/twitch/view.php on line 9
    
    Warning: file_get_contents(https://api.twitch.tv/kraken/streams/afjnssafdfdsfascadc): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in/home/jsax10ho/public_html/twitch/view.php on line 13
    
    When using spaces in the name it gives more errors:
    Code:
    Warning: file_get_contents(): SSL: Connection reset by peer in /home/jsax10ho/public_html/twitch/view.php on line 9
    
    Warning: file_get_contents(https://api.twitch.tv/kraken/channels/afjns dsf sdf sd dsf): failed to open stream: HTTP request failed! in /home/jsax10ho/public_html/twitch/view.php on line 9
    
    Warning: file_get_contents(): SSL: Connection reset by peer in /home/jsax10ho/public_html/twitch/view.php on line 13
    
    Warning: file_get_contents(https://api.twitch.tv/kraken/streams/afjns dsf sdf sd dsf): failed to open stream: HTTP request failed! in /home/jsax10ho/public_html/twitch/view.php on line 13
    
    Now because as far as I know twitch doesn't allow spaces in their usernames any ways you should probably do some sanity checks on the user input.


    Are they really that advanced?
     
    Last edited by MRJPGames, Dec 14, 2015
  7. jsa
    OP

    jsa GBAtemp Regular

    Member
    213
    196
    Oct 21, 2015
    United Kingdom
    Devon, UK
    I'll implement that when I get the chance, I just knocked this together while half asleep so I didn't do everything I probably should have. o.O

    HTML5 video. And believe me it is a godsend.
     
    MRJPGames likes this.
  8. Minnow

    Minnow GBAtemp Fan

    Member
    462
    710
    Oct 5, 2015
    Canada
    OH SHIT! This is amazing. I'll try it ASAP
     
  9. GalladeGuy

    GalladeGuy Freeze Kirby :3

    Member
    2,588
    2,652
    Oct 28, 2015
    United States
    @jsa Could this be used to watch twitch, even if twitch is blocked? Or does it load the website itself?

    EDIT: It works on my iPad in school! I will test on my 3DS when I get home.
     
    Last edited by GalladeGuy, Dec 14, 2015
  10. jsa
    OP

    jsa GBAtemp Regular

    Member
    213
    196
    Oct 21, 2015
    United Kingdom
    Devon, UK
    Yes, it would, it grabs the HLS stream from Twitch and HLS was originally an Apple protocol invented for iOS. So yeah it would!
     
  11. Scoreless Pine

    Scoreless Pine Advanced Member

    Newcomer
    77
    6
    Nov 14, 2015
    United States
    I don't know why exactly, but when I tried this, it worked for something like twitchplayspokemon, but for another streamer, PeachyHime, it only plays audio for me. Besides that, really nice job!
     
  12. Robfozz

    Robfozz GBAtemp Smartass

    Member
    623
    408
    Apr 19, 2014
    United States
    Onett
    Try turning on the "Request mobile sites" option, I get that same thing on youtube videos and that fixes it
     
  13. Apache Thunder

    Apache Thunder I have cameras in your head!

    Member
    4,112
    4,063
    Oct 7, 2007
    United States
    Levelland, Texas
    Only partnered Twitch streamers can provide streams that have alternate quality settings. (So that you can stream it at a resolution/quality level the n3DS can handle). Many smaller Twitch streamers aren't partnered, so you can only watch the stream in the resolution they decided to stream at. So keep that in mind when trying streams on the n3DS.
     
    N7Kopper likes this.
  14. jsa
    OP

    jsa GBAtemp Regular

    Member
    213
    196
    Oct 21, 2015
    United Kingdom
    Devon, UK
    Yeah, it is an issue, basically any Twitch stream which streams at over 854x480 (without a lower quality setting available) will just not work. Nothing doin'
     
  15. UrbanMcYeti

    UrbanMcYeti Newbie

    Newcomer
    1
    0
    Oct 24, 2016
    United States
    It doesn't matter what channel I put in, even twitch does pokemon, it doesn't come up
    I keep seeing
    "WarningL file_get_contents(https://api.twitch.tv/kraken/streams/vinsauce): failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request in /home/jsax10ho/public_html/twitch/view.php on line 13"
    Vinesauce is the streamer I wanted to watch and who I know for a fact is a partner with twitch since he has custom emotes and quality settings, even down to mobile.
    Also, when I was trying, I know he was streaming at the time because I checked.
    And I am using a New 3Ds
     
  16. kprovost7314

    kprovost7314 GBAtemp's Official Bara Master

    Member
    1,714
    926
    Dec 24, 2014
    United States
    In that bara manga ( ͡° ͜ʖ ͡°)
    I have the same issue with twitchplayspokemon D:
     
  17. Bedel

    Bedel The key of the blade

    Member
    988
    342
    Oct 28, 2015
    Would it be possible to do something like this, but with a file on the SD? Well It should not but I had to ask. It would be great to read a .mp4 file from it...
     
  18. Mikemk

    Mikemk GBAtemp Advanced Maniac

    Member
    1,572
    565
    Mar 26, 2015
    United States
    Am I the only person who saw the title and thought, "Oh yay! Now I can record with NTR blocked!"
     
  19. jsa
    OP

    jsa GBAtemp Regular

    Member
    213
    196
    Oct 21, 2015
    United Kingdom
    Devon, UK
    Haha, no, sorry.

    — Posts automatically merged - Please don't double post! —

    I figured out the issue; Twitch have added API keys and authentication and stuff so I can't grab the streams any more without their custom Client ID. I'll see what I can do there, but for now it's definitely broken. :3
     
  20. Lotoonlink

    Lotoonlink Probably doesn't know what he's talking about

    Member
    195
    61
    Aug 15, 2016
    United States
    Wow, this is so cool! It's a shame it's currently not working but being able to do this, even without homebrew, is really great. Hope this works agian soon!
     
    jsa likes this.