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
Solved

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

Posted on 2014-03-13
2
374 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
XSL Grouping 7 42
Format results with PHP 3 79
video playback resume on webpages 2 79
How to analyze web traffic logs 10 111
Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
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 how to look for a specific file type in a local or remote server directory using PHP.

856 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