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

How To Force SSL in YouTube Vids?

Discussion in 'Server Configuration and Hosting' started by DRE, Sep 14, 2013.

  1. DRE

    DRE Well-Known Member

    Tried this, didn't work.

     
  2. RoldanLT

    RoldanLT Well-Known Member

    • /admin.php?bb-code-media-sites/youtube/edit
    • Embed HTML
    Change this entire code from:
    Code:
    <iframe width="500" height="300" src="http://www.youtube.com/embed/{$id}?wmode=opaque&autoplay=1" frameborder="0" allowfullscreen></iframe>
    to
    Code:
    <iframe width="500" height="300" src="https://www.youtube.com/embed/{$id}?wmode=opaque&autoplay=1" frameborder="0" allowfullscreen></iframe>
    or
    Code:
    <iframe width="500" height="300" src="//www.youtube.com/embed/{$id}?wmode=opaque&autoplay=1" frameborder="0" allowfullscreen></iframe>
     
  3. RoldanLT

    RoldanLT Well-Known Member

    I didn't tested it, as I don't have https site.
    Just give a try.
     
  4. digitalpoint

    digitalpoint Well-Known Member

    What do you have in your "Embed HTML" field for YouTube in the BB Code Media Sites area of the XF admin?

    Definitely works fine for me under SSL.
     
  5. DRE

    DRE Well-Known Member

    Did that earlier before making this thread, didn't work.
     
  6. DRE

    DRE Well-Known Member

    HTML
    Code:
    <iframe width="500" height="300" src="https://www.youtube.com/embed/{$id}?wmode=opaque" frameborder="0" allowfullscreen></iframe>
    Match URLS
    Code:
    youtube.com/watch?v={$id}
    youtube.com/v/{$id}
    youtu.be/{$id}
    youtube.com/watch?feature=player_embedded&v={$id}
     
  7. digitalpoint

    digitalpoint Well-Known Member

    This is what I use... try it just to test it...

    Code:
    <iframe src="//www.youtube.com/embed/{$id}?html5=1" width="500" height="300" frameborder="0" allowfullscreen=""></iframe>
    Not specifying the protocol will just use whatever protocol the site is using automatically. Also, I have mine display as HTML5 when possible because Flash sucks.
     
    Shyuan, p4guru and DRE like this.
  8. DRE

    DRE Well-Known Member

    This worked! Thank you!
     
  9. DRE

    DRE Well-Known Member

    So that src="// can be applied to the other bb codes? what about html5=1 is that something that is also applied to other video bb codes?
     
  10. digitalpoint

    digitalpoint Well-Known Member

    Not specifying the protocol will work for any embed that works on both http and https... the html5=1 thing is a YouTube-specific thing though.
     
  11. DRE

    DRE Well-Known Member

  12. SamL

    SamL Active Member

    The info from the first post works perfectly fine on my SSL site. I'm not running the XenMedio addon that you linked though. I wonder if that's why the edit suggestions from the first couple of posts didn't work for you.
     
    Last edited: Sep 15, 2013
  13. Brogan

    Brogan XenForo Moderator Staff Member

    Any particular reason why you don't use the wmode=opaque param?

    I know there were some issues with earlier versions of XF without that included.

    Oh and for anyone else interested, here's the Google page listing all the options, etc: https://developers.google.com/youtube/player_parameters
     
  14. digitalpoint

    digitalpoint Well-Known Member

    Honestly, because I never heard of it, and don't even know what it does. :) Do I need it? lol
     
  15. Brogan

    Brogan XenForo Moderator Staff Member

  16. digitalpoint

    digitalpoint Well-Known Member

    Just tested it on my site... no issues with the overlay. Maybe because I force the HTML5 version rather than Flash or something... not sure. I suspect users would complain if it was an issue for certain browsers.
     
  17. HWS

    HWS Well-Known Member

    wmode is a setting for flash only. It specifies how the hidden background of the video will be. Due to a bug old IE browsers do not render any z-index correctly if wmode=opaque has not been set.
     
    Last edited: Sep 18, 2013
    Andy.N likes this.

Share This Page