androidiosmobileyoutubeyoutube-api

What is the official and legal way of embedding YouTube videos into mobile apps?


We are building a mobile app targeting iOS/Android. The app needs to show certain YouTube videos. Ideally, I would love to get a mobile app native video player for the best user experience.

While looking into this, I found that the Android player API is deprecated in favor of IFrame integration. When I visit the IFrame documentation there's a link to a Google conference video that's 12 years old. I feel there must have been some advancements during a decade.

I have also come across many open-source projects that fetch the videos from the YouTube API and use the video URL to play them inside a native video player. This might not be legal, but I couldn't find any reference to prove or deny this assumption.

So, as of 2023, is the IFrame still the official way of embedding YouTube videos into mobile apps? Is there a better option than the IFrame?


Solution

    1. If you check "Permissions and Restrictions" on YouTube terms of service, they clearly say:

    [...] You are not allowed to:
    access, reproduce, download, distribute, transmit, broadcast, display, sell, license, alter, modify or otherwise use any part of the Service or any Content except: (a) as specifically permitted by the Service [...] circumvent, disable, fraudulently engage, or otherwise interfere with the Service (or attempt to do any of these things), including security-related features or features that: (a) prevent or restrict the copying or other use of Content [...]

    Many (if not all) non-official methods circumvent / disable many of these bans, so I don't think they are legal.

    1. As far as I know, the Iframe API documentation is up to date, with no special improvements over the years, and it's the only way to embed YouTube's content (maybe Google is not particularly interested in improving third-party services?)