I have such a bbcode youtube tag created on the forum:
Code: Select all
[youtube]{IDENTIFIER}://youtu.be/{SIMPLETEXT}[/youtube]
<iframe width="560" height="315" src="{IDENTIFIER}://www.youtube.com/embed/{SIMPLETEXT}" frameborder="0" allowfullscreen></iframe>
Youtube: [youtube]https://youtu.be/[/youtube]
The short link will change to embedded video:
https://youtu.be/W9P_qUnMaFg
The long link will not change to embedded video:
https://www.youtube.com/watch?v=W9P_qUnMaFg