Solved

How do you make an embedded youtube video play full screen with an onclick event

Posted on 2014-03-13
2
317 Views
Last Modified: 2015-06-10
Hi,

I have a youtube video and would like the video to be played at full screen when the user presses the play button.

Here is my embed code for better clarification.

<object width="420" height="315" style="background-color:#FFFFFF">
<param name="movie" value="http://www.youtube.com/v/p6hqVHb5d90?version=3&amp;hl=en_US&amp;rel=0"></param>
<param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param>
<embed src="http://www.youtube.com/v/p6hqVHb5d90?version=3&amp;hl=en_US&amp;rel=0" type="application/x-shockwave-flash" width="420" height="315" allowscriptaccess="always" allowfullscreen="true"></embed></object>   

Open in new window


Thanks,
0
Comment
Question by:smfmetro10
2 Comments
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 39926753
You can't - it requires user interaction.
There is nothing in the API for it.
0
 

Author Comment

by:smfmetro10
ID: 39927194
What about using an iframe?

I don't want to adjust the user's screen, I just want to play the video full screen (whatever deminision it is in)

<iframe width="420" height="315" src="http://www.youtube.com/embed/p6hqVHb5d90?rel=1" frameborder="0" allowfullscreen></iframe>

Open in new window


When I put the url in a browser it comes up in full screen.

Is there no way to get rid of the width="420" height="315" with an onclick event?

Thanks!
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Preface This article introduces an authentication and authorization system for a website.  It is understood by the author and the project contributors that there is no such thing as a "one size fits all" system.  That being said, there is a certa…
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now