Skip to content

fix: add target='_blank' for videos hosted outside edx#36361

Merged
hinakhadim merged 3 commits intomasterfrom
TNL-11904/add-attribute-to-download-video-btn
Mar 17, 2025
Merged

fix: add target='_blank' for videos hosted outside edx#36361
hinakhadim merged 3 commits intomasterfrom
TNL-11904/add-attribute-to-download-video-btn

Conversation

@hinakhadim
Copy link
Copy Markdown
Contributor

Description

When an author or learner clicks the "Download Video" button in the Video XBlock, the resulting behavior is inconsistent. Some videos download directly, while others remain in the same tab, and some redirect the user to a new page within the same tab.

Currently, when users click on a video file hosted outside of the edX platform, it opens in the same tab, disrupting the user experience. To improve consistency and usability, we propose modifying the behavior so that clicking the "Download Video" button always opens the video in a new tab, regardless of the hosting origin.

Useful information to include:

  • Which edX user roles will this change impact? Common user roles are "Learner", "Course Author"

Supporting information

Testing instructions

Please provide detailed step-by-step instructions for testing this change.

  • I've created a test-course for testing
  • Go to Last SubSection > Unit. (Link)
  • You'll see 4 videos. The second one should be downloadable in the same tab. Other should redirect to a anew tab for downloading.

Deadline

"None" if there's no rush, or provide a specific date or event (and reason) if there is one.

before

Screen.Recording.2025-03-11.at.8.10.44.PM.mov

after

Screen.Recording.2025-03-11.at.8.12.00.PM.mov

Copy link
Copy Markdown
Contributor

@schenedx schenedx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Copy Markdown
Contributor

@mfarhan943 mfarhan943 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@hinakhadim hinakhadim merged commit ee7fd49 into master Mar 17, 2025
@hinakhadim hinakhadim deleted the TNL-11904/add-attribute-to-download-video-btn branch March 17, 2025 06:10
@edx-pipeline-bot
Copy link
Copy Markdown
Contributor

2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production.

@edx-pipeline-bot
Copy link
Copy Markdown
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

1 similar comment
@edx-pipeline-bot
Copy link
Copy Markdown
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

leoaulasneo98 pushed a commit to aulasneo/edx-platform that referenced this pull request Mar 25, 2025
leoaulasneo98 pushed a commit to aulasneo/edx-platform that referenced this pull request Mar 26, 2025
tonybusa pushed a commit to tonybusa/edx-platform that referenced this pull request Apr 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants