-
Notifications
You must be signed in to change notification settings - Fork 23
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
Add Streaming Switch Button for Additional Options #188
Conversation
Reviewer's Guide by SourceryThis pull request adds a switch button to toggle between standard and no-cookies YouTube URLs within the app. The changes include adding a new switch button in the admin room types edit view, introducing a 'noCookies' data property, and updating the YouTube URL construction logic in the MediaSource component to respect the 'noCookies' setting. File-Level Changes
Tips
|
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.
Hey @untari - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider using camelCase for the 'noCookies' variable to align with Vue.js naming conventions (e.g., 'noCookies' -> 'noCookies').
- To reduce code duplication, consider extracting the YouTube URL generation logic into a separate method that can be used for both the main URL and language-specific URLs.
Here's what I looked at during the review
- 🟡 General issues: 3 issues found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.
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.
Please implement it in a way that every option is separate, e.g.
- Loop
- Autostart
- Mute
- Modest branding
- Hide controls
- Hide titles and uploader info
- Don`t show related info at the end
So organizers should be able to hide controls and use modest branding without the nocookie-domain as well and configure all kind of options independently.
noted @mariobehling For the code changes suggestions above, I will test it locally first |
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.
When you are building URL, it is safer to use URLSearchParams
and URL
.
For example:
const params = new URLSearchParams()
if (loop) {
params.append('loop', 1)
}
const baseUrl = 'https://youtube.com'
const url = params.size ? `${baseUrl}?${params}` : baseUrl
Not every character is allowed in an URL, those API will automatically escape illeagal characters.
@hongquan Thank you for the suggestion, will modify the URL using the URLSearchParams. |
|
This PR closes/references issue: (#170)
This update introduces a switch button to toggle between standard and no-cookies YouTube URLs within the app.
Summary by Sourcery
This pull request adds a switch button in the admin room types edit view to toggle between standard and no-cookies YouTube URLs. The YouTube URL construction logic has been updated to respect the state of this switch.