NOTICE: FORUMS MOVING

Thank you for visiting and participating in the Video.js forums. We are currently moving the forums to Stack Overflow and GitHub Issues. If you have a question or need help with Video.js, please post your question on Stack Overflow and add the tag 'video.js'. If you've found a specific bug in Video.js, please submit it in the issues tracker.

You can read more about this move on the blog.

Issues with Chrome/Safari & pending requests loading mp4s

square_mike's Avatar

square_mike

15 Nov, 2012 01:59 AM

Hi all,

Working with video.js and we're quite happy with it, except for one (sudden) issue. We've created a gallery of thumbnails, each of which triggers a video.js player to load a different video- currently, we're only serving mp4 files for Chrome/Safari/ie9, with an flv fallback for firefox.

Everything works well in ie9 and FF, but it refuses to work in Chrome or Safari. The player just sits there and spins, and a glance at the network shows that the status of the request is stuck on "pending". What's weird is that if you look at the inline element the src of the video is updating, and if you right click on the video and select "open video in new window", it opens a window and plays just fine. (I can also confirm that the videos will play through video.js, on Chrome, if they're sitting on the stage in their own html page.

The "preload" option is already set to "none"

For the record, this is the code which is changing the video onclick of the thumbnails:

showfeaturedVideo: function() {
                
                var vidName=$(this).data("video");
                
                
                    _V_("featuredVideoPlayer").ready(function(){  
                    console.log("setting video to " + vidName);   
                    //should be MP4
                    this.src({type: "video/mp4", src: vidName });
                });
                _V_("featuredVideoPlayer").ready(function(){  
                    console.log("playing video");
                    //should be MP4
                    this.play();
                });
                $("#featuredVideoHolder").css({"zIndex": 2000}).fadeIn();
            }

has anyone experience anything like this? Any advice would be greatly appreciated!

  1. 2 Posted by Steven on 26 Nov, 2012 12:57 PM

    Steven's Avatar

    Yes, I have encountered this exact issue also.

  2. 3 Posted by square_mike on 26 Nov, 2012 07:48 PM

    square_mike's Avatar

    Oddly, we found two ways to fix it- one by changing preload to "auto" (even though internet consensus seems to be that 'none' is the correct setting) and also by invoking the load call on the player before play.

  3. 4 Posted by Gordie on 14 Mar, 2013 11:31 AM

    Gordie's Avatar

    I had the same issue and searched a solution for a long time !

    I confirm; invoking THEPLAYER.load() after having switched the sources fixes the problem.
    I think this is better than changing the preload attribute which seems very sensitive.

    Here's my switch_video() function.
    http://pastie.org/6489256

  4. 5 Posted by a dev on 12 Jun, 2013 08:24 PM

    a dev's Avatar

    god bless you :)

  5. 6 Posted by xrlpiedsz on 14 Jun, 2013 12:35 PM

    xrlpiedsz's Avatar

    or ? identify ? offering ? should ? blades

  6. 7 Posted by uemepzwsx on 19 Jun, 2013 11:18 AM

    uemepzwsx's Avatar

    releases ? segment ? order ? The ? deal

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac