XF 2.0 The specified URL cannot be embedded as media.

KSA

Well-known member
I'm not able to embed YouTube videos for some reason. Its only shows the link not the video block.

Screen Shot 2017-09-19 at 11.56.32 PM.webp

When I click on insert media it gives the apporved sites "Apple Music, Giphy, Pinterest"

Youtube is not there.

Screen Shot 2017-09-19 at 11.58.18 PM.webp
 
What do you see in your BB code media sites list in the control panel?

I suspect you may have had an add-on in XF1 that overwrote the default media site implementations (and we haven't overwritten those back).
 
Media Site ID:
Code:
youtube
Site Title
Code:
YouTube
CHECK YES ON THE FOLLOWING
  • Show this site on the list of 'supported' sites shown to visitors
  • Enabled
Match URLS
Code:
youtube.com/watch?v={$id}
youtube.com/watch?*&v={$id}
youtube.com/v/{$id}
youtu.be/{$id}
youtube.com/*/u/*/{$id}
youtube.com/embed/{$id}

Embedd Template:
Code:
<div class="bbMediaWrapper">
    <div class="bbMediaWrapper-inner">
        <iframe src="https://www.youtube.com/embed/{$id}?wmode=opaque&start={$start}"
                width="560" height="315"
                frameborder="0" allowfullscreen="true"></iframe>
    </div>
</div>

URL Match Call Back
First Bix
Code:
XF\BbCode\Helper\YouTube
Second Box
Code:
matchCallback

Embedd HTML Call Back
First Box
Code:
XF\BbCode\Helper\YouTube
Second Box
Code:
htmlCallback
 
Top Bottom