-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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
Fix Video Unavailable problem at YouTube preview #26980
Conversation
hey @Sn-Kinos , thank you for your contribution. Could you please describe the exact steps on how to reproduce the issue you are trying to solve so we can create a ticket and associate it with this fix? Thanks! |
@pvev I wonder if there's anything else I need to do 🏃♂️ |
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.
Codewise, LGTM. Waiting for security review.
E2E test triggered successfully for PR #26980. The corresponding commit's status check will be available shortly. |
E2E test run is starting for commit
|
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 PR, @Sn-Kinos! I always assumed that the fact that YouTube videos didn't play for me in MM was something on my end, not that we were missing some things on the iframe
. Great find!
No changes needed about what I commented on
@Sn-Kinos sorry that this review is taking longer that normal, but there are some security concerns about this change that are being discussed internally. As soon as we define an action, we will let you know. Thanks. |
I understand. I referred this iframe code from another commercial messenger app. I hope it can help you. |
@Sn-Kinos, thank you for your patience. The decision to use the referrer policy strict-origin-when-cross-origin can expose some sensitive information, which may be considered more or less critical depending on the use case. Therefore, this decision should be made by the workspace administrator. Given this, the idea is to make this value configurable through a parameter in the admin console. I wanted to ask if you would like to add this new configuration parameter and set the referrer policy based on that parameter (I would help and guide you through this process). Alternatively, I can merge your PR as it is and then take care of adding this configuration parameter in a subsequent PR. |
@pvev I prefer a subsequents PR. I thought there would be no problem because I brought the parameters used in Slack as it is, but I guess it wasn't? |
/update-branch |
@Sn-Kinos Seems like a hiccup in the CI. Let's see if re-running the CI solves it |
New commit detected. SpinWick will upgrade if the updated docker image is available. |
Test server creation failed. Review the error details here. |
/update-branch |
New commit detected. SpinWick will upgrade if the updated docker image is available. |
Mattermost test server updated with git commit Access here: https://mattermost-pr-26980.test.mattermost.cloud |
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.
able to play the video now.
Thank you @Sn-Kinos
I'm waiting to develop YouTube Shorts layout. Is it only the Security Review left now? Or is there anything else I can do? |
@esarafianou Can you confirm this change? |
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.
@larkox code looks good but we need someone from Product to agree on adding a new experimental option since we now better track the different product lifecycle paths (experimental - alpha - beta - GA). Adding it as under ExperimentalSettings
is another thing we need Product to agree on as this makes moving the option out of experimental a breaking change (needing to change the config name).
@wiersgallak can you let us know what you think?
@esarafianou From what I understand, as long as the word "experimental" is not included in the configuration name and it is just under the experimental config setting location, we can move the config setting location without changing the full name of it. |
Is there anything to do for me to solve it? |
@Sn-Kinos I think this is ready now to merge. Thank you very much for your contribution and for your patience during our review. Our QE process makes exhaustive reviews to any bit we will put in our code base to always guarantee the best quality and security. |
* Fix YouTube preview shows Video Unavailable * Fix typo on iframe property * Remove duplicated property * fix lint error (double-quotes, unknown property) * renew snapshot for youtube_video.tsx * fix double quotes and newline error on snapshot for youtube_video.tsx * fix blank on snapshot for youtube_video.tsx * Add YouTube Shorts Embed Preview * Revert "Add YouTube Shorts Embed Preview" This reverts commit b5fb7a4. * Add setting for Youtube Referrer Policy * fix test code error about Youtube Referrer Policy * remove mistake changes on `webpack.config.js` * add test and snapshot about `youtubeReferrerPolicy = true` * fix errors on ci * update description of YouTube Referrer Policy * remove unnecessary whitespace in default_config.ts * remove ko.json changes to prevent conflict with translate tool * update snapshot of `youtube_video.test.tsx` * referrerPolicy on `youtube_video` didn't follow global policy value mattermost#26980 (comment) * update snapshot of `youtube_video.test.tsx` * Remove obsolete snapshot * fix typo on index.ts @ youtube_video --------- Co-authored-by: Mattermost Build <build@mattermost.com> Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
Summary
Fixed the problem that YouTube preview shows Video Unavailable instead of the video.
youtube_video.tsx
Reproduce
Create a post that occurs Video Unavailable problem. I used https://youtu.be/edsx_MOhVnk on the below screenshots.
Ticket Link
No Tickets. (less than 20 lines of code change)
Screenshots
I haven't change the UI. But I can show about it w/ screenshots.
Release Note