AirVideoEnabler now on Cydia?

Discussion in 'Jailbreaks and iOS Hacks' started by fabian9, Nov 26, 2010.

  1. fabian9 macrumors 65816


    Nov 28, 2007
    Bristol, UK
    Just saw this on youtube:

    It lets you stream video content from any video application (including Safari) to AppleTV… looks like this might be the fix for one of the biggest complaints people have had about 4.2.1 so far!

    The video description claims that the package is available in Cydia… I'm not currently jailbroken, so can't check.

    Maybe somebody else could have a look for me?
  2. Evgenyy macrumors regular

    Jun 23, 2010
    I can't find it in Cydia yet :( Anyone else had any luck?
  3. MattZani macrumors 68030


    Apr 20, 2008
  4. Evgenyy macrumors regular

    Jun 23, 2010
    I guess it might take time for BigBoss to approve it for their repo and set it up as paid app.
  5. Evgenyy macrumors regular

    Jun 23, 2010
    Add and it should show up. I am jailbreaking my iPad later tonight to test it out. If it works with Plex and Klexi, I won't need my ATV jailbroken anymore :D
  6. CharlesV macrumors newbie

    Jan 10, 2005
    Plex iOS app gives me an "unable to read content error", Air Video just gives me a spinner then hits me back to the menu. Any luck with any other apps?
  7. CharlesV, Nov 26, 2010
    Last edited: Nov 26, 2010

    CharlesV macrumors newbie

    Jan 10, 2005
    Current status with 4.2.1 redsn0wed ipad and stock 4.2 Apple TV:

    Current status:

    Plex - "An error occurred" message on Apple TV
    Klexi - "An error occurred" message on Apple TV
    Air Video - spinner on Apple TV, times out back to menu after a bit
    Hulu Plus - no option due to custom video player
    ABC Player - no option due to custom video player
    SkyFire Browser (tested on the Daily Show website) - "An error occurred" message on Apple TV
    Streamtome - Only audio, appears to use custom video player

    So as of now, you can stream some videos from Safari but that's about all it provides.
  8. Zone-MR macrumors newbie

    Jul 10, 2008
    Hey all...

    AirVideoEnabler is a pretty quick hack which enables the intrinsic AirVideo capability. Unfortunately, there seems to be a reason why this was not officially enabled by Apple - it's pretty unpolished, and your results may vary.

    I've found many streams play OK, at least in Safari and a few other apps I've tested, however there are severe glitches in others. I'll keep updating AirVideoEnabler as and when I find ways to patch these, but at present YMMV.
  9. CharlesV macrumors newbie

    Jan 10, 2005
    Thanks, Zone-MR - not poopooing your work at all, just figured some people would want to know - I jailbreaked my iPad specifically for this (hoping to get rid of my mini and use a pad as a plex in-between). Not yet, it seems!
  10. Evgenyy macrumors regular

    Jun 23, 2010
    Zone-MR, thanks a lot for getting it out there!

    I can confirm the above post - all apps mentioned do not work. Air Video only works if you convert the file first. I think it uses a different instance of the video player for converted files. I noticed that where you have a bespoke menu (I.e. 30 second rewind button) the videos do not work with airvideo. All videos that have default player controls work. Also videos that show QuickTime logo before playing work fine.

    To add to the list:
    IMDB trailers work
    Flixter trailers work
    Yahoo entertainment app works
    Dailymotion doesn't work due to custom player
  11. LagaV macrumors newbie

    Oct 16, 2008
    +GoodReader (which I ofter use for MP4 content that is not fully compliant with Apple specs --> not accepted by iTunes) works also fine.
  12. fabian9 thread starter macrumors 65816


    Nov 28, 2007
    Bristol, UK
    Wirelessly posted (Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_2_1 like Mac OS X; en-gb) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8C148 Safari/6533.18.5)

    Safari doesn't work for me, only tried it with BBC iplayer though...

    Keep up the good work zone-MR, and thanks for your work!
  13. Zone-MR macrumors newbie

    Jul 10, 2008
    The issue with iPlayer (and many other sites) is that the actual video stream is accessed through a url like http://blah/blah/blah/?token=2a4f4b9e3c...

    The token seems to be generated once time a video is requested, and is only usable once.

    So what actually happens is the iPhone tries to load the video (which succeeds), and then passes the URL to the Apple TV (which fails as each URL is only usable once). The Apple TV actually gets passed the stream URL for direct download + playback. I'll see if a patch can be implemented for the iPhone do do the downloading and proxy the data.
  14. Phat^Trance macrumors regular


    Aug 9, 2009
  15. dhy8386 macrumors 6502a

    Aug 13, 2008
    I think it might be time to start a new thread of working apps / sites. I am happy to do it and maintain it unless Zone-MR you prefer to...

    Ill start and we can always delete it or start a new one if you prefer...
  16. econoar macrumors regular

    Apr 10, 2007
    Great idea, please do.

    Thanks for all your help Zone-MR
  17. goobot macrumors 603


    Jun 26, 2009
    long island NY
  18. Zone-MR macrumors newbie

    Jul 10, 2008
    Here are some more technical details covering AllPlay vs AirVideoEnabler, and future AirVideoEnabler developments for those who are interested... :D

    I've now downloaded AllPlay and had a look at it, to see how its approach varies from mine. Just in case you're interested in some technical details, AllPlay hooks the following:

    • [UIMoviePlayerController setAllowsWirelessPlayback:]
    • [UIMoviePlayerController initWithPlayerSize:]
    • [MPMoviePlayerControllerNew allowsWirelessPlayback]
    • [MPMoviePlayerControllerNew setAllowsWirelessPlayback]
    • [MPMoviePlayerControllerNew init]
    • [MPMoviePlayerController allowsWirelessPlayback]
    • [MPMoviePlayerController setAllowsWirelessPlayback:]
    • [MPMoviePlayerController initWithContentURL:]
    • [MPMoviePlayerController init]
    This is actually very similar to my original approach. However, after a little reverse engineering I realised that the above classes (UIMoviePlayerController , MPMoviePlayerController, MPMoviePlayerControllerNew) all form part of a class cluster alongside a few others AllPlay missed (MPPortraitVideoViewController, MPVideoOverlay, MPWildcatFullScreenVideoOverlay, MPTransportControls, and MPVideoViewController).

    After a little digging, I realised that the core functionality is implemented in the class "MPVideoViewController", and all the classes mentioned above simply invoke this functionality. Therefore I narrowed down the function that needs to be hooked to exactly *one* :)

    • [MPVideoViewController allowsWirelessPlayback]
    While I understand that at first glance, the AirPlay implementation may see more thorough, it is in general far more elegant to implement a hook at the core point where it matters, rather than trying to find and hook every airplay-related hook in the class cluster. More hooks aren't a good thing, and each hook increases the risk of stability problems as things change. For example, AllPlay currently causes all third-party apps linked against earlier frameworks to crash as soon as they try and play some video. Here's what happens when I try and fire up Crash Kart with AllPlay installed:

    The class cluster internally instantiates a MPMoviePlayerControllerOld object instead of MPMoviePlayerController, which lacks the setAllowsWirelessPlayback method, and the whole app crashes. This affects a lot of applications, and the average user may not realise why many of their apps are suddenly crashing.

    One of the issues I've noticed with AirPlay is that it will send the media URL to the Apple TV, and not the stream itsself. This is a sensible implementation as it removes the need for the iOS to be powered on and reliably networked during playback of videos on the TV, however it introduces problems for some online services like BBC iPlayer as these generate a URL containing a one-time token - so the stream stops working when switching between the iPhone and the Apple TV as the URL is only valid once. In a future AirVideoEnabler update, I plan to add detection of this scenario, and proxying of the video stream via the device.
  19. fabian9 thread starter macrumors 65816


    Nov 28, 2007
    Bristol, UK
    Wirelessly posted (Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_2_1 like Mac OS X; en-gb) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8C148 Safari/6533.18.5)

    So in other words, pretty much any compatible content would play if there were a way to simply send a URL to the apple tv?
  20. csiplon macrumors newbie

    Sep 6, 2008
    Can we use this to airplay videos from ip4's camera roll? Zone MR can you confirm? Thanks!
  21. pirateRACE macrumors 6502

    Feb 1, 2010
    This needs to happen! :D
  22. Arnoo macrumors newbie

    Nov 28, 2010
  23. Evgenyy macrumors regular

    Jun 23, 2010
    Seems that you nailed it with the URL tokens and the need for proxying the video stream. This could probably solve the issue that we are having with Plex App too. Currently switching Plex video to Apple TV generates the following error:
    "[0xb0396000] ERROR - Client fe80::5a55:caff:fe1b:8ddb%en0 didn't have required security headers."

    Apple TV cannot send security headers to Plex Media Server and the connection gets refused. If there was a way to have video stream proxied via device then I think it would be playing fine on ATV.
  24. JohnDoe98 macrumors 68020

    May 1, 2009
    Confirmed working on iPad: in Safari

    Wonderful app, thanks for it!
  25. GFLPraxis macrumors 604


    Mar 17, 2004
    Has anyone tested if this works with Air Video (the application)?

Share This Page