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

Domain restricted Vimeo videos require an updated URL format to load correctly

XMLWordPrintable

    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
    • MOODLE_310_STABLE, MOODLE_311_STABLE
    • MDL-72607-master_fix_media_vimeo_url_parser
    • Hide

      Setup

      This Vimeo URL can only be embedded within moodle.org and moodle.com domains. If you are testing locally:

      • You can temporarily change your OS hosts file by pointing the loopback IP (127.0.0.1) to moodle.org or moodle.com.
        OR
      • You can create a virtual host with moodle.org or moodle.com domains.

      Test

      1. Go to "Site administration" > "Plugins".
      2. Go to "Manage filters" in the "Filter" section.
      3. Ensure that "Multimedia plugins" is "On".
      4. Click on "Multimedia plugins" settings (on the right).
      5. Go to "Manage media player".
      6. Ensure that "Vimeo" is enabled.
      7. Create a course.
      8. On the new course: Click on "Turn editing on" / Enable "Edit mode" (master).
      9. Click on "Edit" on "Topic 1".
      10. Then click on "Edit topic" in the dropdown menu to edit the section.
      11. Using the Atto editor in the "Summary" field, insert or edit an audio/video file:
        1. Click on the "Insert media" icon.
        2. Select the "Video" tab.
        3. Example Vimeo URL https://vimeo.com/629106351/b75dc63af5
        4. Click on the "Insert media" button.
      12. Click on "Save changes".
      13. Ensure that the URL got converted to an embedded video in the course.
      14. Confirm that the embed video is playable.

      NOTE: "Sorry Because of its privacy settings, this video cannot be played here." can be displayed, if the domain is not allowed to be embedded. (If you are using the example URL and your site domain does not match the domains that are allowed in the video).

      Show
      Setup This Vimeo URL can only be embedded within moodle.org and moodle.com domains. If you are testing locally: You can temporarily change your OS hosts file by pointing the loopback IP (127.0.0.1) to moodle.org or moodle.com . OR You can create a virtual host with moodle.org  or moodle.com domains. Test Go to "Site administration" > "Plugins". Go to "Manage filters" in the "Filter" section. Ensure that "Multimedia plugins" is "On". Click on "Multimedia plugins" settings (on the right). Go to "Manage media player". Ensure that "Vimeo" is enabled. Create a course. On the new course: Click on "Turn editing on" / Enable "Edit mode" (master). Click on "Edit" on "Topic 1". Then click on "Edit topic" in the dropdown menu to edit the section. Using the Atto editor in the "Summary" field, insert or edit an audio/video file: Click on the "Insert media" icon. Select the "Video" tab. Example Vimeo URL https://vimeo.com/629106351/b75dc63af5 Click on the "Insert media" button. Click on "Save changes". Ensure  that the URL got converted to an embedded video in the course. Confirm that the embed video is playable. NOTE : "Sorry Because of its privacy settings, this video cannot be played here." can be displayed, if the domain is not allowed to be embedded. (If you are using the example URL and your site domain does not match the domains that are allowed in the video).

      We are using a lot of vimeo videos where we as a security measure restrict access on a domain, such that videos can only be embedde on eg. acme.com 

      Vimeo has recently updated their embed code for restricted videos so that the syntax has gone from: 

      <iframe src="https://player.vimeo.com/video/YYYYYYY/XXXXXXX" ></iframe>

      <iframe src="https://player.vimeo.com/video/YYYYYYY?h=XXXXXXX" ></iframe>

       

      The moodle multimedia filter will automatically try and create an embed link if a vimeo link is inserted and the links given by Vimeo are still in the format: 

      https://vimeo.com/XXXXX/YYYYY

      This causes moodle to generate an embed url on the old format which not cause Vimeo to display a "Sorry This video does not exist". 

       

      We have been in contact with vimeo support about this and the confirm the change: 

      Thanks for reaching out to support at Vimeo.
       
      For additional security, we’ve introduced a new privacy hash into the embed code of videos going forward. The player link will not function without the additional code, which is present in your full embed code, but easy to overlook.
       
      When copying and pasting your embed code, be sure to include the string of letters and numbers after the ‘h=‘ parameter in the embed code. 
       
      As an example, they’ll look like this:
       
      h=5c4dedfc34
       
      ​​
       
      Not including the privacy hash will lead to the video not being available for viewing wherever it's embedded.
       
      Links to private videos themselves, on the other hand, will have the hash at the end of URL, without the 'h=' parameter.
       
      So as an example, if a video has a privacy hash of 'h=9ea73a6a07', then the link of the videos will look like this: [*https://vimeo.com/123456789/*] 9ea73a6a07

       

       

        1. valid-domain.png
          valid-domain.png
          197 kB
        2. MDL-72607 video.png
          MDL-72607 video.png
          8 kB
        3. MDL72607 insert media.png
          MDL72607 insert media.png
          25 kB
        4. MDL-72607 before.png
          MDL-72607 before.png
          13 kB
        5. MDL-72607 atto.png
          MDL-72607 atto.png
          23 kB
        6. MDL-72607 after.png
          MDL-72607 after.png
          20 kB
        7. MDL-72607_v3.11_not allowed.png
          MDL-72607_v3.11_not allowed.png
          29 kB
        8. MDL-72607_v3.11_allowed.png
          MDL-72607_v3.11_allowed.png
          45 kB
        9. MDL-72607_v3.10_not allowed.png
          MDL-72607_v3.10_not allowed.png
          28 kB
        10. MDL-72607_v3.10_allowed.png
          MDL-72607_v3.10_allowed.png
          51 kB
        11. MDL-72607_master_not allowed.png
          MDL-72607_master_not allowed.png
          54 kB
        12. MDL-72607_master_allowed.png
          MDL-72607_master_allowed.png
          101 kB
        13. invalid-domain.png
          invalid-domain.png
          47 kB

            smo@praxis.dk Sam Møller
            tuekorsgaard Tue Korsgaard
            Simey Lameze Simey Lameze
            Victor Déniz Falcón Victor Déniz Falcón
            Angelia Dela Cruz Angelia Dela Cruz
            Votes:
            5 Vote for this issue
            Watchers:
            15 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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