PDA

View Full Version : Tab Content Script (v 2.0)



denny
12-11-2007, 09:42 PM
Hello,

I just recently got the Tab Content Script (v 2.0) which works great. I was thinking about using it to display a snippet of a training video. I have tried it and it displays the video just fine.. The problem I have is when when I move to another tab the video keeps playing.

If I have a short clip at tab 1 and I move to tab 2 both video clips are playing at the same time.

I currently have clips on a web page but they shut off when I move to another page.

Is there a way to shut off the video automatically? I haven't changed the tab script at all.. Just added the following for the content..



<EMBED TYPE="application/x-mplayer2" SRC="http://www.My-Domain.com/video/mod-2.wmv"
NAME="MediaPlayer"
WIDTH="192" HEIGHT="190" ShowControls="1" ShowStatusBar="0" ShowDisplay="0" autostart="1"> </EMBED>



Thanks,

ddadmin
12-11-2007, 11:26 PM
Warning: Please include a link to the DD script in question in your post, in this case: http://www.dynamicdrive.com/dynamicindex17/tabcontent.htm . See this thread (http://www.dynamicdrive.com/forums/showthread.php?t=6) for the proper posting format when asking a question.

The issue is since the script doesn't actually wipe out the hidden tabs' contents, just hide it while showing the selected one. In the case of a movie file, hiding it doesn't cause it to stop playing.

There's most likely some JavaScript method you can use to stop the playing of a movie file added via the EMBED element (try doing a search on Google). A more generic way though is to put the movie in an external HTML page, and use Ajax Tabs Content (http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/) script instead to retrieve and display it. This way, as you switch between tabs, a different page is loaded into the content area altogether, taking care of the issue of lingering movie files playing.