-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[$250] Safari - Unable to play video attachment #52673
Comments
Triggered auto assignment to @puneetlath ( |
Job added to Upwork: https://www.upwork.com/jobs/~021858504313972501020 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @hoangzinh ( |
@m-natarajan can you please the video format that's causing the bug coz mp4 is working in safari |
Edited by proposal-police: This proposal was edited at 2024-11-24 13:13:08 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.A video attachment in the chat won't start playing in Safari on macOS. What is the root cause of that problem?Safari don't support AV1 codec playback on devices older than iPhone 15 and M3 Mac. They put a hardware decoder into the new devices in 2023, that can play these video formats, as stated here. But older devices don't support it. There is further proof of this from caniuse.com:The video's codec information: caniuse.com states that Safari don't fully support it: What changes do you think we should make in order to solve the problem?First we have to solve the Unhandled Promise Rejection error. That happens because setStatusAsync(status) called on a video, that failed to load. So I would add a catch to this call, that handles rejections:
Second, I would add a fallback image for these situations, when a video couldn't be played. There is an onError hook on the Video component, that calls a method, when a fatal error happened, and the video couldn't be played. I would add an isError state, and render a fallback image when it's set to true. What alternative solutions did you explore? (Optional)Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job. |
📣 @PeterZsigmond! 📣
|
Contributor details |
✅ Contributor details stored successfully. Thank you for contributing to Expensify! |
ProposalI added images to proof that the video won't load in Safari, but do load in Chrome. |
ProposalPlease re-state the problem that we are trying to solve in this issue.On Safari, video uploaded to chat will not play. Preview of video shows correctly. Console error shows What is the root cause of that problem?Safari does not support AV1 codec. Partial support has been added in Safari 18.1+ but requires specific hardware support such as a M3 MacBook Pro. Video playback on Chrome and Edge works because AV1 codec is supported. What changes do you think we should make in order to solve the problem?After user clicks play, check for browser support of video codec using the What alternative solutions did you explore? (Optional) |
@puneetlath, @hoangzinh Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
@me-ZaidAli he already attached in the issue's description. |
@PeterZsigmond thanks for creating a proposal. Your RCA is not clear to me. It doesn't explain why other MP4 video work but this MP4 video. Are you able to check your RCA again to make those points clearer? Thank you. |
@garatkarr thanks for creating a proposal. Could you find proof of your findings in your RCA?
Can you also elaborate a bit on your solution? What component of onError event did you mention to? And how do we know if "browser does not support the codec" based on error message/code? Thank you. |
Proposal |
@hoangzinh I uploaded an AV1 mp4 video file to a chat and witness the same issue as the bug reporter. I confirmed that video was indeed AV1 video codec. This screenshot below shows Safari does not support AV1 unless it has the hardware decoder which is found in newest Macs (M3+) and iPhone 15+. The Just one idea, open to other solutions. |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@puneetlath, @hoangzinh Whoops! This issue is 2 days overdue. Let's get this updated quick! |
Thanks for updates @PeterZsigmond @garatkarr. Although @garatkarr is the first one who pointed out a correct root cause. However, @PeterZsigmond is the 1st one who provided a correct solution to me. We can just display a general error message in those cases. |
Issue not reproducible during KI retests. (First week) |
@puneetlath @hoangzinh this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks! |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
I'm still able to reproduce this issue in latest main Screen.Recording.2024-12-03.at.06.36.11.mov |
@PeterZsigmond's proposal looks good to me Link to proposal #52673 (comment) 🎀👀🎀 C+ reviewed |
Current assignee @puneetlath is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new. |
@puneetlath, @hoangzinh Whoops! This issue is 2 days overdue. Let's get this updated quick! |
All your @puneetlath |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@puneetlath, @hoangzinh Whoops! This issue is 2 days overdue. Let's get this updated quick! |
Awaiting @puneetlath for 2nd review round |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.0.63-3
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?:
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @rojiphil
Slack conversation (hyperlinked to channel name): ts_external_expensify_bugs
Action Performed:
Expected Result:
The video should play
Actual Result:
The app crashes with
Not supported error
in dev environmentUnable to play the video in staging environment
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
attachment-play-crash.mp4
attachment-play-crash-staging.mp4
Recording.3170.mp4
https://github.com/user-attachments/assets/2b502b64-83c3-4b81-bc7b-b57cf6892ab0 (Video used as attachment)
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @hoangzinhThe text was updated successfully, but these errors were encountered: