PlaybackError class
Represents an error that occurred during playback.
A PlaybackError is thrown by the MediaX plugin when a playback error
occurs. The error may be due to various reasons such as network errors,
codec errors, DRM errors, internal errors, audio session errors, or invalid
player states.
The PlaybackError class provides the following properties:
message: A message describing the error.errorCode: A unique error code that can be used to identify the error.stackTrace: The stack trace of the error.
The PlaybackError class provides a set of standard error codes that can be used to identify the type of error that occurred. These error codes are defined in the PlaybackError class as static constants.
The PlaybackError class is used by the MediaX plugin to indicate that a playback error has occurred. It is used to provide information about the error to the developer and to help them debug the issue.
Constructors
-
PlaybackError.fromPlatform(Map<
String, dynamic> errorDetails) -
Create a PlaybackError from platform error details
factory
Properties
- errorCode → int
-
The error code identifying the type of error that occurred.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- message → String
-
The error message describing the playback error.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stackTrace → String
-
The stack trace of the error.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, dynamic> - Converts the PlaybackError object to a map.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- audioSessionError → const int
- Audio session error occurred.
- codecError → const int
- Codec initialization failed.
- drmError → const int
- DRM decryption failed.
- internalError → const int
- Playback failed due to an internal error.
- invalidState → const int
- Invalid player state.
- networkError → const int
- Network error occurred.
- resourceError → const int
- Failed to allocate resources.
- sourceNotFound → const int
- Media source not found.
- timeout → const int
- Playback timed out.
- unknown → const int
- Unknown error occurred.
- unsupportedFormat → const int
- Media format is not supported.