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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:24:39+00:00 2026-05-20T18:24:39+00:00

Do you have any idea why I’m getting an error Can’t create event listener

  • 0

Do you have any idea why I’m getting an error “Can’t create event listener of null” from this:

    var my;
    my.newVidObj = document.createElement('video');
    my.newVidObj.src = "vid-source.webm";
    my.newVidObj.load();        
    my.newVidObj.addEventListener("play", function() {
        // Do something
    }, false);  

Also, is there any way to use video tag methods on jquery objects (creating the video tag via jquery, for example)?

I edited the below answer to be correct, but it needs to be peer reviewed. Here is the solution:

var vid = $("<video />", {
    id: "my-HTML5-video",
    src: "video.webm"
}).bind("play", function(){
    alert('test');
}).appendTo("body")[0].play();
  • 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-20T18:24:40+00:00Added an answer on May 20, 2026 at 6:24 pm

    Check out these links:

    http://www.chipwreck.de/blog/2010/03/01/html-5-video-dom-attributes-and-events/
    http://www.dev.opera.com/articles/view/introduction-html5-video/
    http://www.chipwreck.de/blog/2010/02/23/html-5-video-test-area/

    I think it should be:

    var vid = $("<video />", {
        id: "my-HTML5-video",
        src: "vid-source.webm",
    });
    
    vid.appendTo("body");
    
    vid[0].play = function(){
        alert("yaaay!");
    };
    

    Correction by OP:

    var vid = $("<video />", {
        id: "my-HTML5-video",
        src: "video.webm"
    }).bind("play", function(){
        alert('test');
    }).appendTo("body")[0].play();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I dont have any idea why am i getting this error :- Subquery returned
Does anyone have any idea what is wrong with this create statement for mysql?
Anyone have any idea what this is or where I can get it? I
(Using the GUI builder) Does anyone have any idea what this thing wants from
Anybody have any idea why this query isn't working? $result = mysql_query(SELECT * FROM
Anyone have any idea what is causing this error when running cucumber features ?
Do you have any idea of how can I make this function more time-efficient?
Anyone have any idea how to go about resolving this error? This is happening
Does anybody have any idea why this doesn't work? $(document).ready(function() { var loading; var
anyone have any idea about how to create java program that can read barcode

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.