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

Domain restricted Vimeo videos are not working via the WS proxy script

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.10.9, 3.11.5, 4.0
    • 3.10.10, 3.11.6
    • Media
    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_400_STABLE
    • MOODLE_310_STABLE, MOODLE_311_STABLE
    • MDL-74042-311
    • MDL-74042-master
    • Hide

      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.
      15. As an admin, enable "Mobile services": Site administration ► Mobile app ► Mobile settings
      16. Create a Token in the mobile app service for any user enrolled in the course where the video is
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      17. Open the following URL in a browser in incognito mode, WS_TOKEN should be replaced with the token you created before: http://YOUR_MOODLE_SITE/media/player/vimeo/wsplayer.php?video=629106351&token=WS_TOKEN&h=b75dc63af5
      18. Confirm that:
        • You can play the video or you see a message indicating the video can't be played (it could happen because of the video restrictions)
      19. Inspect the previous page source code and confirm that:
        • You see an iframe pointing to src="https://player.vimeo.com/video/629106351?h=b75dc63af5"

      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
      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. As an admin, enable "Mobile services": Site administration ► Mobile app ► Mobile settings Create a Token in the mobile app service for any user enrolled in the course where the video is Click on Site administration ► Plugins ► Web services ► Manage tokens Open the following URL in a browser in incognito mode, WS_TOKEN should be replaced with the token you created before: http://YOUR_MOODLE_SITE/media/player/vimeo/wsplayer.php?video=629106351&token=WS_TOKEN&h=b75dc63af5 Confirm that: You can play the video or you see a message indicating the video can't be played (it could happen because of the video restrictions) Inspect the previous page source code and confirm that: You see an iframe pointing to src="https://player.vimeo.com/video/629106351?h=b75dc63af5" 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).

    Description

      This is a follow-up of MDL-72607 where support to hashed videos was added.

      It seems that it was missed to update the WS proxy script used by external clients: /media/player/vimeo/wsplayer.php

      The fix is quite simple to implement

      Attachments

        Issue Links

          Activity

            People

              jleyva Juan Leyva
              jleyva Juan Leyva
              Dani Palou Dani Palou
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              David Woloszyn, Huong Nguyen, Jake Dallimore, Michael Hawkins, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                14/Mar/22

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 hours, 15 minutes
                  2h 15m