Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6074193
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:21:17+00:00 2026-05-23T10:21:17+00:00

Using the code found here: How to popup a jquery window to play youtube

  • 0

Using the code found here:

How to popup a jquery window to play youtube video?

I created the following:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script src="http://cdn.jquerytools.org/1.2.5/full/jquery.tools.min.js"></script>
<script src="js/swfobject.js"></script>
</head>
<body>
<script language="javascript" type="text/javascript">

    $(function () {
        var videoModal = $('#video-modal').overlay({
            expose: {
                color: 'black',
                loadSpeed: 200,
                opacity: 0.85
            },
            closeOnClick: true,
            api: true
        });

        $('.video-link').click(function () {
            videoModal.load();

            var videoUrl = $(this).attr('href');
            var flashvars = {};
            var params = {
                allowFullScreen: "true",
                allowscriptaccess: "always"
            };
            var attributes = {};

            swfobject.embedSWF(videoUrl, 'video-container', '425', '344', '9.0.0', '', flashvars, params, attributes);

            return false;
        });
    });

</script>
    <form id="form1" runat="server">
   <a href="http://www.youtube.com/v/2cxqZiWyW3g&hl=en_US&fs=1&autoplay=1"
    class="video-link">Video 1</a>
<a href="http://www.youtube.com/v/607RMNoJfl4&hl=en_US&fs=1&autoplay=1"
    class="video-link">Video 2</a>

<div class="modal" id="video-modal">
    <div id="video-container" style="width: 425px; height: 344px;"></div>
</div>



    </form>
</body>
</html>

It works as expected in firefox (on clicking anywhere outside of the video container, the popup closes and the video stops playing). In IE – the video continues to play on close. Any ideas on how I could stop the video from playing in IE?

When i use swfobject.removeSWF I can no longer click on any of the links and have my movie ‘open’ again. Here is where I’m at so far:

<script language="javascript" type="text/javascript">
    $(document).ready(function () {
        var videoModal = $('#video-modal').overlay({
            expose: {
                color: 'black',
                loadSpeed: 200,
                opacity: 0.85
            },
            closeOnClick: true,
            api: true,
            onClose: function () {
                swfobject.removeSWF('video-container');
            }
        });

        $('.video-link').click(function () {
            videoModal.load();

            var videoUrl = $(this).attr('href');
            var flashvars = {};
            var params = {
                allowFullScreen: "true",
                allowscriptaccess: "always"
            };
            var attributes = {};
            swfobject.createSWF({ data: this.href, width: "425", height: "344" }, params, 'video-container');


            return false;
        });


    });


</script>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T10:21:18+00:00Added an answer on May 23, 2026 at 10:21 am

    To stop your flash video when you close it, or hide it, you need to call the swfobject.removeSWF('video-container')

    From the document of the overlay that you use http://flowplayer.org/tools/overlay/index.html we see that there is the close() and the onlose, that you can call the above function to stop your video when the dialog close.

    I have to say you, that the video is not stop on any browser, if you not call the removeSWF. Just the mozilla stop by him self, or hide it and you not see it, I do not know, but you need to call this command to stop it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using an HTML sanitizing whitelist code found here: http://refactormycode.com/codes/333-sanitize-html I needed to add
I am a JS novice. Using some code I found here to help me
I'm using code that I found on the CodeProject.com for a low-level keyboard hook
The following code using System.Threading; class Test { volatile int counter = 0; public
I am using pseudo-code here, but this is in JavaScript. With the most efficient
A while back I created a lightbox plugin using jQuery that would load a
I'm trying this code (found in an answer here on SO) in a category
I'm using code similar to below: var image = new Image(); image.src = http://youtube.com/favicon.ico;
My code can be found here c# asp.net FTP Error I am trying to
I'm using some code I found to highlight an id after clicking an anchor

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.