You will recieve your password to this address. Address is not made public.

Your preferred username that is used when logging in.

Trying to create a close player button for fixed position transparent player Created Nov 3, 2009

This thread is solved

Views: 2347     Replies: 5     Last reply Jul 28, 2011  
You must login first before you can use this feature

flowmark

Posts: 7

Registered:
Nov 3, 2009

Trying to create a close player button for fixed position transparent player

Posted: Nov 3, 2009

I have successfully created a transparent fixed-position video:
http://www.orangecountycounseling.com/a.html
I would like my user to be able to hit a "close" button and the player will disappear, and they will have access to anything underneath the player. I can hide the player, but the empty container still obscures the HTML elements underneath - preventing users from clicking on any links that may be underneath the video.

I really just want the player, container and everything to go away!

For extra credit, I would really love to use stop button that looks like a "X" instead of the square. Does anyone know the easiest way to do this?

Thanks so much!

Mark

  
<style>

#player {
	/* player dimension */
	width:537px;
	height:436px;
	display:block;
	
	/* fixed position to the bottom right corner */
	position:fixed;
	right:12px;
	bottom:12px;
	font-weight: 700;
}
</style>

<a id="player" href="http://www.orangecountycounseling.com/images/blueblock.flv"> </a>



    $f("player", {src: 'http://www.orangecountycounseling.com/images/flowplayer-3.1.5.swf', wmode: 'transparent' }, {
    
	 	canvas: {backgroundColor:'transparent',backgroundGradient:'none', border:0},
		onLoad: function() { 
		    this.setVolume(100); 
		    this.unmute();
		}, 
		  
	   //  onUnload: function() {    ///NOT SURE WHAT TO PUT HERE
	   // 	    var wrap = $(this.getParent()); 
       //        wrap.diplay = "none";
	   // },  
	 	
	    plugins: { 
	    
		    controls: { 
	            url: 'http://www.orangecountycounseling.com/images/flowplayer.controls-tube-3.1.5.swf',
	            display: 'none',
	            //hideDelay: 3000,
	            fullscreen: false,
	            time: false,
	            buttonOverColor: '#0099FF',
	            stop: true,
	            scrubber: false,
	            volume:false,
	            left: 200,
	            width: 90,
		            
	            tooltips: { 
	                buttons: true, 
	                play: 'Play', 
	                pause: 'Pause', 
	                stop: 'Close video',
	                mute: 'Mute'
	            }, 
	            tooltipColor: '#112233', 
	            tooltipTextColor: '#ccffff'  	            
	        }
        },
	 
        playlist: [ 
     
	        // user is forced to see this entry. pause action is disabled 
	        { 
	            url: 'http://www.orangecountycounseling.com/images/blueblock.flv', 
	            autoPlay: true,
	            duration: 3, 

	             onBeforePause: function() { 
	                return false; 
	            }  
	        }, 
	         
	        // this is the actual video. controlbar is shown 
	        { 
	            url: 'http://www.orangecountycounseling.com/images/blueblock.flv', 
	            autoPlay: false,
	            autoBuffering: true,
	            duration: 8,
	            
	            onStart: function() { 
	                this.getControls().show(); 
	            },
	            
	            
	            onStop: function() {   //THIS IS THE EVENT TO TRIGGER HIDING THE PLAYER
	                this.unload();
	            }
          
	            
	            
	        }     
	  ]     
	    	
	  
	 } );   


flowmark

Posts: 7

Registered:
Nov 3, 2009

» Trying to create a close player button for fixed position transparent player

Posted: Nov 3, 2009

Reply to: Trying to create a close player button for fixed position transparent player, from flowmark
ahhh...let me answer my own question. It was a very easy event listener:


onStop: function() {  /Event to hide player
	            	document.getElementById("player").style.display="none";
	            }


Edge
Vizmu Media ------------------- http://vizmu.com/

Posts: 576

Registered:
Nov 29, 2008

» » Trying to create a close player button for fixed position transparent player

Posted: Nov 3, 2009

Reply to: » Trying to create a close player button for fixed position transparent player, from flowmark
wow that's a cool player setup. Though it doesn't work in IE8, haven't tested 7 yet.

flowmark

Posts: 7

Registered:
Nov 3, 2009

» » » Trying to create a close player button for fixed position transparent player

Posted: Nov 3, 2009

Reply to: » » Trying to create a close player button for fixed position transparent player, from edge
Thanks! I am trying to get all the cross browser stuff working - it is driving me nuts. The video is not important enough that I want any sort of "must install flash" messages or any javascript errors.

I need to figure out how to show it only if their browser is compatible; and have it absolutely invisible otherwise. I'll let you know once I find enough patience to try again!

Mark

gmccomb

Posts: 746

Registered:
Apr 9, 2009

» » » » Trying to create a close player button for fixed position transparent player

Posted: Nov 3, 2009

Reply to: » » » Trying to create a close player button for fixed position transparent player, from flowmark
Rather than setting the display to none have you tried modifying the size of the div (you may need to settle for 1x1 pixels) or removing the container completely (the latter using something like removeChild)?

To get this to work on all browsers you may need to put the div containing Flowplayer into a parent div that has no inherent size.

PS: We're almost neighbors!

flowmark

Posts: 7

Registered:
Nov 3, 2009

» » » » » Trying to create a close player button for fixed position transparent player

Posted: Nov 4, 2009

Reply to: » » » » Trying to create a close player button for fixed position transparent player, from gmccomb
Thanks for your help guys. I think I have most of the bugs out. I am off to bed. If you are interested in how it looks, check out
http://www.orangecountycounseling.com/d.html

The browser incompatibility was actually due to flowplayer looking for a container which I was not putting on the screen when there in no flash. Solved now....

This weekend my green screen and lighting arrive. The fun is just beginning :-).

Mark