This repository has been archived by the owner on Feb 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
ALL-3936/Error classes #64
Merged
Merged
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
47b8303
Create enum to represent error types.
b400c12
Drop ExoPlayer specific exceptions in favour of NoPlayerError.
be193c7
Drop MediaPlayer specific exceptions in favour of NoPlayerError.
3e3e9a9
Return the PlayerErrorType instead of String.
804830a
American english, not english.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.novoda.noplayer; | ||
|
||
public class NoPlayerError implements Player.PlayerError { | ||
|
||
private final PlayerErrorType playerErrorType; | ||
private final Throwable cause; | ||
|
||
public NoPlayerError(PlayerErrorType playerErrorType, Throwable cause) { | ||
this.playerErrorType = playerErrorType; | ||
this.cause = cause; | ||
} | ||
|
||
@Override | ||
public PlayerErrorType getType() { | ||
return playerErrorType; | ||
} | ||
|
||
@Override | ||
public Throwable getCause() { | ||
return cause; | ||
} | ||
} |
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
17 changes: 17 additions & 0 deletions
17
core/src/main/java/com/novoda/noplayer/PlayerErrorType.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.novoda.noplayer; | ||
|
||
public enum PlayerErrorType { | ||
|
||
INVALID_RESPONSE_CODE, | ||
MALFORMED_CONTENT, | ||
FAILED_DRM_DECRYPTION, | ||
FAILED_DRM_INITIATING, | ||
FAILED_DRM_REQUEST, | ||
CONNECTIVITY_ERROR, | ||
MEDIA_FORMAT_NOT_RECOGNISED, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. RECOGNIZED 🇺🇸 |
||
MEDIA_SERVER_DIED, | ||
MEDIA_SOURCE_ERROR, | ||
STREAMED_VIDEO_ERROR, | ||
UNKNOWN | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Dorvaryn disappointed to not find |
||
|
||
} |
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
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
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
22 changes: 0 additions & 22 deletions
22
core/src/main/java/com/novoda/noplayer/internal/exoplayer/playererror/ConnectivityError.java
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
.../src/main/java/com/novoda/noplayer/internal/exoplayer/playererror/DrmDecryptionError.java
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
.../src/main/java/com/novoda/noplayer/internal/exoplayer/playererror/DrmInitiatingError.java
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
core/src/main/java/com/novoda/noplayer/internal/exoplayer/playererror/DrmRequestError.java
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
...ain/java/com/novoda/noplayer/internal/exoplayer/playererror/InvalidResponseCodeError.java
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
...c/main/java/com/novoda/noplayer/internal/exoplayer/playererror/MalformedContentError.java
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
core/src/main/java/com/novoda/noplayer/internal/exoplayer/playererror/MediaSourceError.java
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
core/src/main/java/com/novoda/noplayer/internal/exoplayer/playererror/UnknownError.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
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.
💯