Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 multiple console errors when login and in onboarding welcome video #46854
Fix multiple console errors when login and in onboarding welcome video #46854
Changes from 12 commits
9616022
b26c1ef
198e6e9
2276e45
5baa0a5
a2cc65f
b0b0484
4ed343b
6bd2921
91ed245
483c083
e51f66e
a0f8339
ee5be98
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Hi @bernhardoj it appears that you applied 2 solutions in your proposal or error 7th , didn't you?
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.
Yes. The first one waits until the play promise is completed. But on Android mWeb (if I remember the platform correctly), the play is never triggered anymore after the video is stopped. So,
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 @bernhardoj do you mean the checking
isPlaying
in 1st option is not useful in Android mWeb? Or does it never returnisPlaying
status in Android mWeb?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.
Also, at this line only (not this error log), we only need to check
!currentReportID || currentReportID === '-1'
is enough, what do you think? And do you think we should make-1
as a constant?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.
Nope, what I mean is that, when we open the video, the play video is called multiple times.
App/src/components/VideoPlayerContexts/PlaybackContext.tsx
Lines 28 to 36 in 8193c37
And then
resetVideoPlayerData
is also called once. On other platforms, the order of call looks like this:In mWeb Android, it's
play
play
...
reset
[no more call]
But I just retested it and the call order is similar to other platforms too.
Still, we need to prevent the reset to be called, so we need to check for
prevCurrentReportID
too.I don't have a strong opinion about this one. There is -1 and '-1' and we use this everywhere on the app without const. Maybe we can have a new cleanup issue to create the const and replace it everywhere in the app.
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.
okay cool. Can you leave a comment explaining why we have to check both current and prev, also another comment in line 79? I think it's useful to back-read later.
App/src/components/VideoPlayerContexts/PlaybackContext.tsx
Line 79 in 91ed245
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.
Added comment
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 @bernhardoj