Coder Social home page Coder Social logo

Comments (7)

fregante avatar fregante commented on May 16, 2024

Unfortunately not. This needs direct access to the <video> element, but YouTube embeds don't allow that.

from iphone-inline-video.

philhenri avatar philhenri commented on May 16, 2024

ok thanks.

from iphone-inline-video.

oskarrough avatar oskarrough commented on May 16, 2024

@bfred-it do you think it could be hacked to work? Just curious before I'd dive in to the challenge.

from iphone-inline-video.

fregante avatar fregante commented on May 16, 2024

It can't because the document loaded in the iframe has a different origin and you can't do absolutely anything with it, other than using postMessage (which is what the YouTube API uses)

from iphone-inline-video.

fregante avatar fregante commented on May 16, 2024

Well, there is half a solution, but it requires you to link directly to the mp4 on YouTube servers, which means you lose the YouTube player and its API. Also the URL could change at any time and your video would break.

https://github.com/endlesshack/youtube-video

http://stackoverflow.com/questions/8402457/how-to-get-direct-url-for-youtube-videos

from iphone-inline-video.

GordanRatkovic avatar GordanRatkovic commented on May 16, 2024

Maybe if the videos were streamed using a proxy like this:
https://github.com/licson0729/node-YouTubeStreamer

That way, you'd access the videos by specifying a youtubeID.

On a side note: the youtube iframe API on iOS10 devices already plays inline, but not sure about autoplay

from iphone-inline-video.

fregante avatar fregante commented on May 16, 2024

The proxy output is not different from what I described just before your comment and suffers of the same breaks-if-API-changes issue, unfortunately.

from iphone-inline-video.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.