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 8497577
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T00:09:53+00:00 2026-06-11T00:09:53+00:00

I am using the following code to play a video on my site. at

  • 0

I am using the following code to play a video on my site. at the moment it is set to auto play. What I would like to know is there a way to make the video only auto play if visited from a specific URL. and not auto play if navigated through the site?

code below:

<video width="640" height="360" controls autoplay>
        <source src="__VIDEO__.MP4"  type="video/mp4" />
        <source src="__VIDEO__.OGV"  type="video/ogg" />
        <object width="640" height="360" type="application/x-shockwave-flash" data="__FLASH__.SWF">
            <param name="movie" value="__FLASH__.SWF" />
            <param name="flashvars" value="autostart=true&amp;controlbar=over&amp;image=__POSTER__.JPG&amp;file=__VIDEO__.MP4" />
            <img src="__VIDEO__.JPG" width="640" height="360" alt="__TITLE__"
                 title="No video playback capabilities, please download the video below" />
        </object>
    </video>
  • 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-06-11T00:09:55+00:00Added an answer on June 11, 2026 at 12:09 am

    What you can do is use JavaScript to check the referral, if it’s not from your site then set autoPlay to true.

    ex:

    if(document.referrer.indexOf("mydomain.com") < 0){
        //set auto play
    }
    

    or

    if(document.referrer.indexOf("mydomain.com") > -1){
        //tell the swf to play your video
    }
    

    Ideally you’d want to check this with server side code and just spit out the html accordingly. with JS you’ll have to either create the flash object via JS code (something like swfObject), or set autoPlay as false all the time and invoke a play function (if it exists) after the fact when you check the referrer.

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

Sidebar

Related Questions

I am using the following code to play the video using the MPMoviePlayerController ,
I am using the following code to play a video inside my webpage. The
I'm using the following code to add click-to-play functionality to HTML5 video: $('video').click(function() {
I am using xuggler to play video files from my code and the following
I am trying to play video(.mp4) in my app using following code. NSString *doc
I am using the following code to play video files in MPMoviePlayerController NSString* filePath
I'm using the following code to play a .mp4 video on my android device.
I am using the following code to play the video. Actually it is playing
I am using the following code, in the last line when I play the
Hey everyone. The following is the code that I am using to play random

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.