SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Aug 2011
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need to resolve "Uncaught type errors" using $(document).ready?

    Hey everyone,
    The following errors prevent my web app from working:
    Code:
    "Uncaught TypeError: Cannot call method 'removeAttribute' of null" 
    "Uncaught TypeError: Cannot call method 'appendChild' of null"
    Here's an example: http://bit.ly/10QO0mv

    The app should play the video playlist as soon as it's loaded, instead the video just hangs.
    The playlist will play if you click on the second video and then click back on the first video.

    I get the same error regardless if I place
    HTML Code:
    <script type="text/javascript" src="js/playlist_jquery.js"></script>
    between the HEAD tags or right before the closing BODY tag

    Some people have suggested to
    start playing the video once body is loaded
    or put your code inside an onload event.
    Code:
    $(document).ready(function() {
       // start video streaming once all resources are done loading
     });

    All of the code that executes the video and the video playlist is from PHP,
    so what exactly should I put in the document.ready or onload event?

    (I can post the html and php if necessary)

    Thanks in advance -
    DK

  2. #2
    SitePoint Wizard webcosmo's Avatar
    Join Date
    Oct 2007
    Location
    Boston, MA
    Posts
    1,480
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    things video may not be loaded completely or enough to start playing until for a while after the document loads.
    see if there is any way to detect the video load complete event.

  3. #3
    SitePoint Member
    Join Date
    Aug 2011
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In case anyone is interested I was able to resolve my issue.
    I overlooked a setting in the SublimeVideo player. The videos now autoplay.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •