?
Solved

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

Posted on 2014-03-13
2
Medium Priority
?
481 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 58

Accepted Solution

by:
Gary earned 2000 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are two main kinds of selectors in CSS: One is base selector like h1, h2, body, table or any existing HTML tags.  For instance, the following rule sets all paragraphs (<p> elements) to red: (CODE) CSS also allows us to define our own custom …
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
The viewer will learn how to dynamically set the form action using jQuery.
Suggested Courses

765 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