Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Youtube videos required DOUBLE CLICK to start

I just noticed this started happening this morning.

When someone adds a youtube video to a post, it embeds correctly... but when you click on the video to play it, the page REFRESHES instead of playing the video.

The 2nd time you click on the video, it plays fine.

I turned all the plugins OFF, and it still happens.

Anyone else seen this behavior?

«1

Comments

  • I don't see this behavior. It almost sounds like a browser behavior...

    Go here:
    http://narwhalsonfire.com/discussion/556/mario-maker-levels#latest

    Tell me if you get the same behavior on that page that you described above.

    This is a 2.2rc1 environment.

  • No, it works fine there.

    The behavior is the same on Chrome AND Safari. Im on an iMac.

  • view the source for the video and post the code

  • FYI - I turned the plugins back on, since there was no effect turning them off.

  • You're missing the autoplay name/value pair in the span of class Video Youtube

  • I took a cursory glance over the code that auto-embeds the content and I don't see anything that doesn't include autoplay=1. Check the file class.format.php in library\core...approximately line 1245 you should see something like...
    // YouTube ... $fullUrl = $videoId.'?autoplay=1';
    From that point onward the video url should have auto play which is why the fact that yours is missing is so confusing.

  • The string 'autoplay' does not even exist in that class.format.php file at all.

    I dont want the video to autoplay anyway. I just want it to play when you hit the big PLAY button in the middle of the embeded youtube player.

    It just refreshes the screen instead... and then you have to hit it AGAIN to get it to play.

  • Initially there is a poster, not the real video embedded on the webpage. When you click it the first time, that actually triggers the video to load into the page. You need autoplay at this point for the video to being since only now does it exist, and you have already clicked once. If your class.format.php doesn't have the autoplay being appended to your youtube links this won't work. I would advise checking out a copy for the version you are using from Github and compare them.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    It also has to do with flash. It no longer loads automatically , it will have a play button then it will load. If the browser does not support html5 video , you will see a play button and when you play it will refresh the page. I think it's a compatibility thing with browsers. And not to do with vanilla.

    http://stackoverflow.com/questions/13297927/html5-video-autoplaying-without-autoplay-attribute

  • I have evidence that its NOT a browser thing, and actually a vanilla thing.

    If go into the admin dashboard, and create an admin MESSAGE that appears on the front page, and use youtube embed code to embed a video, then THAT video WILL PLAY the first time you click play on it.

    But if someone puts a youtube link in a discussion, and vanilla auto-embeds it, then THAT video will NOT play the first time you hit the play button. It refreshes the page instead. Then if you hit play again, it will play.

    Can someone with a 2.1.13 vanilla install try this on their site with a youtube video please?

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    use youtube embed code to embed a video, then THAT video WILL PLAY the first time you click play on it.

    Because you are using the code they gave you to embed it as an object. If you simply paste the you tube link in a message that will not render a player. You need the embed code.

    <iframe width="420" height="315" src="https://www.youtube.com/embed/E4UJg5__-bs" frameborder="0" allowfullscreen></iframe>

    a youtube link in a discussion, and vanilla auto-embeds it, then THAT video will NOT play the first time you hit the play button

    Because the first click is to load the video and the second one is to start it. I explained that already.
    When you only paste the link to the video like this:

    https://www.youtube.com/watch?v=E4UJg5__-bs

    https://www.youtube.com/watch?v=E4UJg5__-bs

    You are not embedding a player you are using the link to call back a player and the first is just an image preview with a link to start serving the video. This also happens with wordpress.
    And it does not refresh the whole page it only refreshed the preview as it calls for the player.

  • whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP

    @jackjitsu

    Maybe think about the fact that people are trying to help you, and not shout and get snarky in your responses?

  • jackjitsujackjitsu ✭✭
    edited November 2015

    @whu606

    What in the world makes you think im being snarky? You can tell that through text?

  • @vrijvlinder said:
    Because the first click is to load the video and the second one is to start it. I explained that already.

    Are you saying this is proper behavior and by design?

    Because the previous version of vanilla did not require TWO clicks to start the video. Thats annoying to users.

  • whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP

    @jackjitsu

    Typically, on the interwebby, caps lock is considered to be shouting, and generally rude.

    Your use of caps for emphasis gives the impression (at least to me, and I am not an over-sensitive soul) that you are loudly emphasising certain points, as though people are stupid for not getting it.

    I'm happy to accept that that isn't your intention, maybe you could accept that it is possible to see your comments that way?

  • @jackjitsu it is renders an image in place in an anchor, in place of a video for fast loading.

    This link triggers some javascript with loads the actual video.

    What vrijvlinder is saying is if this replacement autoloads you will effectively have what you what.

    However if you do this you should submit a pull request on github, if not already changed.

    grep is your friend.

  • x00x00 MVP
    edited November 2015

    @vrijvlinder said:
    Because you are using the code they gave you to embed it as an object. If you simply paste the you tube link in a message that will not render a player. You need the embed code.

    <iframe width="420" height="315" src="https://www.youtube.com/embed/E4UJg5__-bs" frameborder="0" allowfullscreen></iframe>

    it won't take this literally becuase to allow iframe arbitrarily would be a security risk unless only used for trusted sites. If you look at the source of this page, the video placholder image is there. It has just taken your dimensions.

    grep is your friend.

  • @x00 said:
    jackjitsu it is renders an image in place in an anchor, in place of a video for fast loading.

    This link triggers some javascript with loads the actual video.

    What vrijvlinder is saying is if this replacement autoloads you will effectively have what you what.

    However if you do this you should submit a pull request on github, if not already changed.

    Ok, I get that. Im just wondering if this was a design decision in this version of vanilla, (there is a page load advantage this way), or if something broke on my site.

    I guess im looking for verification that this is in fact how its supposed to work for vanilla 2.1.13.

  • @whu606 said:
    jackjitsu

    Typically, on the interwebby, caps lock is considered to be shouting, and generally rude.

    Your use of caps for emphasis gives the impression (at least to me, and I am not an over-sensitive soul) that you are loudly emphasising certain points, as though people are stupid for not getting it.

    I'm happy to accept that that isn't your intention, maybe you could accept that it is possible to see your comments that way?

    I know that typing in all caps is shouting... but I was only typing certain words in caps for emphasis, not shouting. But if some people are going to perceive that as shouting too, then ill cease that habit.

Sign In or Register to comment.