?
Solved

Full screen button for WMP in IE/Firefox

Posted on 2006-05-16
9
Medium Priority
?
361 Views
Last Modified: 2007-08-19
I am making a webpage that has video. I want a button that when you click on it will play the video fullscreen. I have seen it in a bunch of video sites, like music.yahoo.com. could anyone give me the code for it?
0
Comment
Question by:collinwinget
  • 5
  • 2
7 Comments
 
LVL 2

Author Comment

by:collinwinget
ID: 16696340
oh yeah, the plugin i will be using would be windows media player, unless it would be easier in something else, but the computers it will be seen on will all be windows XP so i think windows media player would work best.
0
 
LVL 1

Accepted Solution

by:
fake_name_2 earned 200 total points
ID: 16698980
You can make two files. One named "Opener.html" that would call "player.html". "Opener.html" will call "player.html", and "player.html" will play the movie.

<!----Opener.html --->
<html>
<head>
<!--- Open window without any bar --->


<script type='text/javascript'>
<!--
  if(document.location.search != "")  {
    obj = document.location.search.substr(document.location.search.indexOf('?') + 1)
    address = (obj=="true") ? true : false ;
  } else {
    address=true
  }

  function toggleAddress(isvis,m_num)  {
      
    add = (address) ? "no" : "yes" ;

    if(isvis != "")  {
      add = isvis
    }
    q = (add=="yes") ? false : true ;
    if(q) {
      address=false
    } else {
      address=true
    }
if(m_num==1){
    window.open("v_1.html?" + address,"", "fullscreen=yes, toolbar=" + add + ",location=" + add + ",status=" + add + "menubar=" + add +

"scrollbars=" + add);
}

    self.opener = ""
   // self.close()
  }

//-->
</script>

<body>
<u><a onClick='toggleAddress("no",1)'>Video 1</a><br></u>
</body>
</html>

<!----/Opener.html --->

<!----Player.html ----->
<img dynsrc="My_video.MPG" height="100%" width="100%">
<!----/Player.html ----->


You may also choose to place the code for player.html in a frame, and show the video in the same page.
0
 
LVL 2

Author Comment

by:collinwinget
ID: 16703742
that works fine, but is there a way to make a popup box that says "press escape to exit fullscreen" and then make the popup quit?
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 2

Author Comment

by:collinwinget
ID: 16704406
*quit when you push escape, or have a button that you click to escape.
0
 
LVL 2

Author Comment

by:collinwinget
ID: 16704608
nevermind, i figured it out.
0
 
LVL 2

Author Comment

by:collinwinget
ID: 16704624
Here's what i did:
<head>
<script>
function makeFullScreen()
{
if (mediaPlayer.playState == 3)
  {
    alert("Going into full screen mode, push ESC to exit!")      
    mediaPlayer.fullScreen = 'true';
  }
}

</script>
</head>

<body class="video">
Click the button to go into fullscreen.<IMG SRC = "fullscreen.jpg" onclick="makeFullScreen();" ALT = "Play in Full Screen Mode" Border = "0"><br>

<OBJECT id="mediaPlayer">
..
<embed src="movie.mpg">
</object>
</body>
0
 
LVL 1

Expert Comment

by:fake_name_2
ID: 16706101
Glad to know that  I could help collinwinget.
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses
Course of the Month16 days, 18 hours left to enroll

864 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