Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-62401

Embed Youtube Videos with nocookie extension

XMLWordPrintable

    • MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_402_STABLE
    • MOODLE_403_STABLE
    • master_MDL-62401
    • Hide
      1. Log into Moodle as an admin
      2. Navigate to Site administration > plugins > manage media players
      3. Click 'settings' for 'VideoJS player'
      4. Un check 'YouTube videos' (We want to use the YouTube media player not VideoJS)
      5. Click 'save changes'
      6. Navigate to Site administration > plugins > manage media players
      7. Click 'settings' for 'YouTube'
      8. Check 'Use no cookie domain'
      9. Click 'save changes'
      10. Create a new course (OR restore the attached backup and skip to step 15)
      11. Add a new 'text and media area' resource
      12. Add a YouTube video link to the content, e.g. https://www.youtube.com/watch?v=C0DPdy98e4c
      13. Add a YouTube playlist link to the content, e.g https://www.youtube.com/playlist?list=PL59FEE129ADFF2B12
      14. Click 'Save and return to course'
      15. Once the course page has loaded open the web browser network and web tools
      16. On Application tab confirm there are no cookies present for https://www.youtube.com
      17. In the network traffic detail (you may need to reload the page) confirm there are no calls to any *.doubleclick.net domains
      Show
      Log into Moodle as an admin Navigate to Site administration > plugins > manage media players Click 'settings' for 'VideoJS player' Un check 'YouTube videos' (We want to use the YouTube media player not VideoJS) Click 'save changes' Navigate to Site administration > plugins > manage media players Click 'settings' for 'YouTube' Check 'Use no cookie domain' Click 'save changes' Create a new course (OR restore the attached backup and skip to step 15) Add a new 'text and media area' resource Add a YouTube video link to the content, e.g. https://www.youtube.com/watch?v=C0DPdy98e4c Add a YouTube playlist link to the content, e.g https://www.youtube.com/playlist?list=PL59FEE129ADFF2B12 Click 'Save and return to course' Once the course page has loaded open the web browser network and web tools On Application tab confirm there are no cookies present for https://www.youtube.com In the network traffic detail (you may need to reload the page)  confirm there are no calls to any *.doubleclick.net domains

      Youtube loads  a lot of cookies if videos are embedded. Youtube allows a reduction of cookie loading with a different embed code that is privacy compliant by using the youtube-nocookie.com domain

      Example:

      <iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/glwSTFuqmWo" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>

      Normally this is a feature you can select when fetching embed code from youtube page manually.

      This issue adds a configuration option to the YouTube media player that when set the Moodle LMS generated embed code uses the youtube-nocookie.com domain.  This means that when this admin option is enabled:

      • NO .youtube.com cookies are added to the users browser
      • No calls to *.doubleclick.net and googleads. are made
      • Calls ARE made to www.youtube-nocookie.com

      It will work for both single embedded videos and embedded playlists.

      NOTE: Cookies from www.youtube-nocookie.com are still added once a user has clicked play button. No calls to *.doubleclick.net and googleads. are made even when the play button is clicked.

            matt.porritt@moodle.com Matt Porritt
            ralfh Ralf Hilgenstock
            Stevani Andolo Stevani Andolo
            Ilya Tregubov Ilya Tregubov
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            9 Vote for this issue
            Watchers:
            17 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours, 17 minutes
                3h 17m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.