Ask questions and get good answers on mb.jQuery.components

Hi, first of all thanks for these great code examples!! I have a Video in the Top Extruder like this: <video id="vid1" width="640" height="360" controls="" stop=""> <source src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4" type="video/mp4"/> <source src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.webm" type="video/webm"/> <source src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.ogv" type="video/ogg"/>

<!-- fallback to Flash: --> 
<object width="640" height="360" type="application/x-shockwave-flash" data="player.swf"> 
  <!-- Firefox uses the `data` attribute above, IE/Safari uses the param below --> 
  <param name="movie" value="player.swf" /> 
  <param name="flashvars" value="autostart=true&amp;controlbar=over&amp;image=poster.jpg&amp;file=http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4" /> 
  <!-- fallback image --> 
  <img src="poster.jpg" width="640" height="360" alt="Big Buck Bunny"
         title="No video playback capabilities, please download the video below" /> 
</object>

</video>

<input type="button" onclick="document.getElementById('vid1').play();" value="Play"/> <input type="button" onclick="document.getElementById('vid1').pause();" value="Pause"/><input type="button" onclick="document.getElementById('vid1').stop();" value="Stop"/>

How can I stop the video when the Top Extruder is closing??

Thank you for any hint/help

asked Nov 07 '10 at 07:16

Flashmike's gravatar image

Flashmike
111

closed Feb 11 '11 at 15:59

Matteo%20Bicocchi's gravatar image

Matteo Bicocchi ♦♦
1776129

The question has been closed for the following reason "The question is answered, right answer was accepted" by Matteo Bicocchi Feb 11 '11 at 15:59


Hi, just add: document.getElementById('vid1').pause() as callback of the onExtClose extruder's method; it should work:

  $("#extruderTop").buildMbExtruder({
    positionFixed:false,
    position:"top",
    onExtClose:function(){document.getElementById('vid1').pause()}
  });

Bye, Matteo

answered Nov 07 '10 at 13:10

Matteo%20Bicocchi's gravatar image

Matteo Bicocchi ♦♦
1776129

Thx a lot Mateo

answered Nov 08 '10 at 01:40

Flashmike's gravatar image

Flashmike
111

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Tags:

×4
×3
×2
×1

Asked: Nov 07 '10 at 07:16

Seen: 818 times

Last updated: Feb 11 '11 at 15:59

jQuery main site - Matteo Bicocchi