1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.1 Hey

Discussion in 'XenForo Questions and Support' started by darkrounge, Dec 28, 2011.

  1. darkrounge

    darkrounge Member

    I've googled and search the forums countless numbers of times..
    How do I enabled autoplay for a youtube video in a thread?

    I want a youtube video to be able to autoplay as they read my thread, I've seen others do this.
    Any suggestions?
  2. adgsteve

    adgsteve Member

    Add this to the end of the YouTube URL &autoplay=1
  3. darkrounge

    darkrounge Member

    I did :/
    This is the video I want:
    I added this to my Media adder:

    But it's not doing anything..

  4. adgsteve

    adgsteve Member

    Try this code.....

  5. darkrounge

    darkrounge Member

    Nope.. Doesn't even work here:

  6. adgsteve

    adgsteve Member

    Hmm, that's odd. It's supposed to. Sorry. :(
  7. darkrounge

    darkrounge Member

    No problem, anyone else know how I can get it?????
  8. steel_curtain

    steel_curtain Well-Known Member

    The bbcode parser is stripping out everything but the video id upon embed. You'd have to either adjust the embed HTML in BB Code Media Sites in the ACP, or install an add-on like parse HTML to do it manually (as far as I know).
  9. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Admin CP -> Home -> BB Code Media Sites -> YouTube -> Embed HTML

    Add the red code:

    <iframe width="500" height="300" src="http://www.youtube.com/embed/{$id}?wmode=opaque&autoplay=1" frameborder="0" allowfullscreen></iframe>
    But this will affect all youtube videos on your forum. More effort is required to make it not affect all videos (as in creating a PHP callback for the media site).
  10. kkm323

    kkm323 Well-Known Member

    imagine 10 videos in one thread playing at the same time :eek:
  11. darkrounge

    darkrounge Member

    Only problem with this, is that when someone posts a video it autoplays :/
  12. Ablac

    Ablac Active Member

    How would one go about making the users define if its Auto play or not?

    Couldnt you change the BBCode to have a Second ID and use youtube.com/watch?v={$id}\{$id2}
    Cause websites dont register \ but you could use that to separate the ID's

    I tried it on my site but i suck with BBCode :( and not even sure if my theory is correct :p
  13. Brogan

    Brogan XenForo Moderator Staff Member

    What do you mean by users?

    You can have two different embed codes, one with autoplay, one without; members can choose which one to use when posting a video.
  14. Ablac

    Ablac Active Member

    Like i dont want every video Autoplay, wondering if theres a way to specify if its autoplay.
  15. Brogan

    Brogan XenForo Moderator Staff Member

  16. darkrounge

    darkrounge Member

    Yes, exactly what I'm trying to do..
    How do we do this?
  17. Ablac

    Ablac Active Member

    I just did what Brogan Suggested, create another Youtube BBCode, cept instead of naming it Youtube name it YoutubeAuto (Or something along those lines) and give it the Auto Play Script.

    So when you past a youtube video it will default to
    But with the second BBCode names YoutubeAuto you can change it to
    Thats what i did on my forums.
    darkrounge likes this.
  18. RoldanLT

    RoldanLT Well-Known Member

    How about Facebook ?
  19. Tize

    Tize Active Member

    Hi, I wonder if this is still functional with the latest version of xF?
    Thank you.
  20. Brogan

    Brogan XenForo Moderator Staff Member

    Tize likes this.

Share This Page