-
Notifications
You must be signed in to change notification settings - Fork 297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lectures
: Fix embedding of TUM-Live videos in lecture units
#8183
Lectures
: Fix embedding of TUM-Live videos in lecture units
#8183
Conversation
Lecture
: Embed tum live URLs without 'video_only=1' parameter in url validatorLecture
: Fix embedding of TUM-Live videos in lecture units
WalkthroughThe update enhances the video unit form's URL validation mechanism in an Angular application. It refines the validation logic for video URLs, introducing new validators for source and transformed URLs, and adapts to handle specific TUM URLs by converting them to an embeddable format. This adjustment ensures more precise validation and user feedback, improving the overall user experience in managing video content within the application. Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
...pp/lecture/lecture-unit/lecture-unit-management/video-unit-form/video-unit-form.component.ts
Outdated
Show resolved
Hide resolved
The failing tests are not related to the changes I did. |
The suggested changes would invert the changes and not work
…upported-for-video-units
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Manual test, locally.
Generates embeddable video URL correctly.
...pp/lecture/lecture-unit/lecture-unit-management/video-unit-form/video-unit-form.component.ts
Outdated
Show resolved
Hide resolved
...pp/lecture/lecture-unit/lecture-unit-management/video-unit-form/video-unit-form.component.ts
Outdated
Show resolved
Hide resolved
...pp/lecture/lecture-unit/lecture-unit-management/video-unit-form/video-unit-form.component.ts
Outdated
Show resolved
Hide resolved
...pp/lecture/lecture-unit/lecture-unit-management/video-unit-form/video-unit-form.component.ts
Outdated
Show resolved
Hide resolved
...pp/lecture/lecture-unit/lecture-unit-management/video-unit-form/video-unit-form.component.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides @rstief 's statements, code looks good 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the improvements, I just have one additional thought.
I dont like the two let
statements. Couldnt you move the whole functionality after the try catch inside the try blocks and return the error state inside the catch blocks?
I personally would like that better. What are your thoughts on this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed on slack, I am fine with this solution as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code lgtm 👍
...pp/lecture/lecture-unit/lecture-unit-management/video-unit-form/video-unit-form.component.ts
Show resolved
Hide resolved
...pp/lecture/lecture-unit/lecture-unit-management/video-unit-form/video-unit-form.component.ts
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good after changes 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-test after code changes, still works
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maintainer approved 👍
Lecture
: Fix embedding of TUM-Live videos in lecture unitsLectures
: Fix embedding of TUM-Live videos in lecture units
Checklist
General
Client
Motivation and Context
This PR resolves an existing issue where a video unit, added to a lecture using a TUM-Live URL without the 'video_only=1' URL parameter, could not be embedded. #8157
Description
Steps for Testing
Prerequisites:
Testserver States
Note
These badges show the state of the test servers.
Green = Currently available, Red = Currently locked
Review Progress
Performance Review
Code Review
Manual Tests
Test Coverage
Screenshots
Summary by CodeRabbit
New Features
Bug Fixes
Tests