Embedding Youtube code: possible?

Dear Wackowiki insiders


Is it possible to embed a Youtube video with the code given by Youtube like this:


<iframe width="560" height="315" src="https://www.youtube.com/embed/dROLGWhCcWY" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>	

Thanks for any help.


Morgy

Comments

  1. 2. Embedding Youtube HTML5 Video as Inline HTML

    <#<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/dROLGWhCcWY" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>#>



    Ensure you allowed the formatter to process Inline HTML and the CSP (Content Security Policy) to load from the media source.
    1. enable Inline HTML support
      1. for a page (page properties > extended) as Admin or
      2. for everyone (secondary config ['allow_rawhtml'])
    2. If CSP is enabled, what is recommended, you must set the CSP directives in your csp_custom.conf:
      1. Content-Security-Policy:
        	default-src 'self';
        	script-src 'self' 'unsafe-inline';
        	style-src 'self' 'unsafe-inline';
        	img-src * data:;
        	media-src 'self' archive.org *.youtube.com *.youtube-nocookie.com dailymotion.com;
        	object-src 'self' archive.org *.googlevideo.com *.ytimg.com *.youtube.com *.youtube-nocookie.com dailymotion.com;
        	frame-src 'self' archive.org *.youtube.com *.youtube-nocookie.com *.dailymotion.com;	
      2. set your Content-Security-Policy (CSP) in your secondary config config['csp'] to 2 (custom)

    • WikiAdmin
    • 02.04.2022 18:55 edited
Log in or create an account to post a comment.