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

Drag and drop should fire 'notifyFilterContentUpdated' event when adding element to the DOM

XMLWordPrintable

    • MOODLE_31_STABLE, MOODLE_32_STABLE
    • MOODLE_31_STABLE, MOODLE_32_STABLE
    • MDL-57480-master
    • Hide
      1. Make sure videojs player is enabled on your site
      2. Create a new label resource and add media to it via atto. Select an mp4 from your filesystem and confirm.
      3. Save the label and view the course home page.
      4. Confirm that you see the video and can play it.
      5. Now, drag and drop the same mp4 video from your filesystem into the course and select the first option when prompted. This will embed the file in a label.
      6. Confirm that:
        • The video is added
        • You can play the video and
        • The media player controls are the same as the first video (uses videojs)
      7. Refresh the page
      8. Confirm that both videos look the same and can be played.
      Show
      Make sure videojs player is enabled on your site Create a new label resource and add media to it via atto. Select an mp4 from your filesystem and confirm. Save the label and view the course home page. Confirm that you see the video and can play it. Now, drag and drop the same mp4 video from your filesystem into the course and select the first option when prompted. This will embed the file in a label. Confirm that : The video is added You can play the video and The media player controls are the same as the first video (uses videojs) Refresh the page Confirm that both videos look the same and can be played.

      Noticed this missing when I was testing MDL-57187. Basically, if you enable the media player 'videojs' and then drag and drop an mp4 into the course and select the first option (add as a label, not a file), then the file is added, but the setup code for videojs is never called so the video is rendered in the browser default player. On page refresh this is resolved, and the videojs player is used, but it's not a nice thing to see when dropping a file in this way. Audio files are also affected by this.

      I think the solution is to fire the 'notifyFilterContentUpdated' event, as videojs already listens for this (see here)

            jaked Jake Dallimore
            jaked Jake Dallimore
            Mark Nelson Mark Nelson
            Dan Poltawski Dan Poltawski
            Ryan Wyllie Ryan Wyllie
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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