-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Improve codec unsupported detection #1711
Merged
hicom150
merged 8 commits into
webtorrent:master
from
hicom150:fix_codec_unsupported_detection
Oct 13, 2019
Merged
Changes from 3 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
5023651
Improve codec unsupported detection
hicom150 d4a8d9a
Apply review changes
hicom150 5280fc7
Merge branch 'master' into fix_codec_unsupported_detection
hicom150 3d85803
Improve codec unsupported detection
hicom150 f5e186d
Apply review changes
hicom150 b47d335
Merge branch 'fix_codec_unsupported_detection' of github.com:hicom150…
hicom150 287bcfd
Merge branch 'master' into fix_codec_unsupported_detection
hicom150 f2c531b
use videoTracks and audioTracks to check unsupported codecs
hicom150 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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.
Maybe?
I put it on a branch: https://github.com/webtorrent/webtorrent-desktop/tree/issue-1711-improve-error-handling
For some reason I would send PR to your clone, I think select your fork as the base. Maybe a bug in GitHub, to many forks of this repo.
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.
I think that we should dispatch
mediaError
when error type isNotSupportedError
(original code) or when any error case (like the latest code change).Given that the possible exceptions are
NotSupportedError
orNotAllowedError
I wouldn't show this last one to the final user 😅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.
why not?
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.
It also says other exceptions may be reported,. I suppose these are not very likely to be thrown, but it may be good user gets an error if something odd happens.
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.
With the current code, in the unlikely event of an error named
NotAllowedError
, or any other exception, it will prompt the user with 'Codec unsupported' right?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 that is right 😅 Although it is not 100% correct for the final user, the action should be the same: open an external player to be able to play the file, otherwise it would see the message
The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.
which I found a bit confusing for the user as it doesn't give any "call to action" to solve the problem.On the other hand, it is true that we should log the proper error code, so we can debug future problems easily 😉
What do you think @Borewit ?