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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:38:38+00:00 2026-06-03T03:38:38+00:00

I have an html 5 video which i remove the control buttons and added

  • 0

I have an html 5 video which i remove the control buttons and added a js code in order for the user to play the video when the video is clicked. What I need to do is to bind an additional script that will redirect the page after the video plays without a page reload. Below is my js code.

function play(){
var video = document.getElementById('video');
video.addEventListener('click',function(){
video.play();
},false);
}

And Here is my HTML5 Video Code

<video id="video" width="770" height="882" onclick="play();">
<source src="video/Motion.mp4" type="video/mp4" />
</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-03T03:38:39+00:00Added an answer on June 3, 2026 at 3:38 am
    <script type="text/javascript">
    // Do not name the function "play()"
    function playVideo(){
        var video = document.getElementById('video');
        video.play();
        video.addEventListener('ended',function(){
            window.location = 'http://www.google.com';
        });
    }
    </script>
    <video controls id="video" width="770" height="882" onclick="playVideo()">
        <source src="video/Motion.mp4" type="video/mp4" />
    </video>
    

    Here is a list of media events to which you can bind: http://dev.w3.org/html5/spec/Overview.html#mediaevents

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

Sidebar

Related Questions

I have this page: http://www.yasyf.com/services.html , in which a video autoplays. I would like
I have some large files (images and video) which I need to store in
I have this pseudo code to display different content based on user selection, which
I have the following line in my Html file, which displays a video feed,
I have a frame control in a WPF app which has an HTML page
I have a html/css based menu and I'm trying to put a flash video
I'm experimenting playing video in a UIWebView. If I have some html like this:
So I have simple video tag on HTML 5 page playing OGG video. I
I have read the post http://iosdevelopertips.com/video/display-youtube-videos-without-exiting-your-application.html And YouTube player runs successfully. But every time
I have html code that looks roughly like this: <div id=id1> <div id=id2> <p>some

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.