I have been all over the internet trying to figure out how to plan an embedded youtube video in full screen automatically and have failed at every turn.

Any ideas here?

<iframe src="//www.youtube.com/embed/9ptECXgpIwk?rel=0&autoplay=1" frameborder="0" allowfullscreen></iframe>

several links on the web say that the rel=0 is what makes it happen, but my understanding of that part is that it prevents related videos from being displayed when the video ends.

I don't want to use specific width and height because I want it to work on any device to the full extent of the screen size of that device.

Any help here would be greatly appreciated
Douglas

OK, your tag is PHP but you didn't specify that this was in a browser. As you know you may not take over the screen like that. You could if you had the user run some app. There are plenty of prior discussions about this but for now, you can't violate what the user wants to see in their browser view.

commented: ops, I missed that _automatically_ thanks :D +14

Just in case anyone is interested... I never did find a way to display full screen automatically no matter what the device.

Instead I opted to set the i frame to a size that will fit on any device and notate the bottom right corner of the video to click for full screen.

Not as effective nor as elegant as I would have liked, but I guess it will server the purpose.

Thanks for the responses.

commented: thanks for sharing +14
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.