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

  • Home
  • SEARCH
  • 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 6687829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:20:03+00:00 2026-05-26T05:20:03+00:00

I have been using the JavaScript script VideoJS: http://videojs.com/ to build some video players

  • 0

I have been using the JavaScript script VideoJS: http://videojs.com/ to build some video players that can be shown to the user in a popup. I have built the popup as follows:

        <script type="text/javascript"> 

            VideoJS.setupAllWhenReady();

            jQuery(document).ready(function ()
            {
                // videos have video js applied to them
                //$("video").VideoJS()

                $(".show-video").click(function ()
                {
                    $(".video-background").show();
                    $(".video-container").fadeIn("fast");
                });
                $(".close-video").click(function ()
                {
                    $('.video-background').fadeOut();
                    $('.video-container').fadeOut();

                });
            });
        </script>

<a class="show-video">Show Video</a>

        <div class="video-background">
            <div class="video-container">

                <div class="video-js-box vim-css">
                    <video id="video1" class="video-js" poster="wallpaper.png" controls="controls" width="1024" height="768">
                        <source src="video.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' /> 
                        <object id="flash_fallback_1" class="vjs-flash-fallback" width="1024" height="768" type="application/x-shockwave-flash"
                            data="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf"> 
                            <param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf" /> 
                            <param name="allowfullscreen" value="true" /> 
                            <param name="flashvars" value='config={"playlist":["poster.png", {"url": "video.mp4","autoPlay":false,"autoBuffering":true}]}' /> 
                          </object>
                    </video>
                </div>

                <a class="close-video">Close Video</a>

            </div>
        </div>

I have two problems:

1) If the video is playing and the user closes the video popup, the video will still be playing in the background… how do I stop this?

2) I’ve noticed on sites like: http://www.apple.com/imac/features.html that the videos popup in the same way by using a hashtag and id to show content but unlike in my example the video isn’t in the page… any ideas on how they do this? As they arn’t loading an external webpage. Would love to see some examples of how to do this with jQuery as I will be having multiple videos so would be great to just pull them in based on the hashtag on the link!

Thanks

  • 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-26T05:20:04+00:00Added an answer on May 26, 2026 at 5:20 am

    There are 2 ways you can do this.

    1. Remove the whole video when the popup is closed. Use $(video).remove()
    2. Use the videojs javascript method

      VideoJS.DOMReady(function(){
        var myPlayer = VideoJS.setup("example_video_1");
        myPlayer.pause();  
      });
      
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can anyone help? I have been designing a site using Javascript but the rest
I have some JavaScript that can appear on many different pages. Sometimes those pages
I have been using PHP and JavaScript for building my dad's website. He wants
I've been using javascript for a while, but have never learned the language past
I have been programming using PHP, Javascript and have been a designer for a
I've been using various javascript frameworks including mootools, jquery, prototype and scriptaculous and have
I have been doing some customization to this jQuery paging script I found here
I am very new to javascript and have been using the JQuery library quite
I have been using the DataTables plugin for jQuery (http://www.datatables.net) to search, sort and
Ok, I haven't been using JavaScript without JQuery for quite some time now... But,

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.