RadioPlayer class
- Inheritance
-
- Object
- MiniPlayer
- RadioPlayer
Constructors
- RadioPlayer(MiniPlayer player)
Properties
- audioCache ↔ AudioCache
-
This is the
AudioCache
instance used by this player. Unless you want to control multiple caches separately, you don't need to change anything as the global instance will be used by default.getter/setter pairinherited - balance → double
-
no setterinherited
-
creatingCompleter
→ Completer<
void> -
Completer to wait until the native player and its event stream are
created.
finalinherited
- defaultFadeDuration ↔ Duration
-
Default fade duration
getter/setter pairinherited
- desiredState ↔ PlayerState
-
Auxiliary variable to re-check the volatile player state during async
operations.
getter/setter pairinherited
-
eventStream
→ Stream<
AudioEvent> -
no setterinherited
- fadeLoopDuration → Duration
-
update fade loop duration
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- mode → PlayerMode
-
no setterinherited
-
onDurationChanged
→ Stream<
Duration> -
Stream of changes on audio duration.
no setterinherited
-
onLog
→ Stream<
String> -
Stream of log events.
no setterinherited
-
onPlayerComplete
→ Stream<
void> -
Stream of player completions.
no setterinherited
-
onPlayerStateChanged
→ Stream<
PlayerState> -
Stream of changes on player state.
no setterinherited
-
onPositionChanged
→ Stream<
Duration> -
Stream of changes on audio position.
no setterinherited
-
onSeekComplete
→ Stream<
void> -
Stream of seek completions.
no setterinherited
- playbackRate → double
-
no setterinherited
- player ↔ MiniPlayer
-
getter/setter pair
- playerId → String
-
An unique ID generated for this instance of
AudioPlayer
.finalinherited - positionUpdater ← PositionUpdater?
-
Set the PositionUpdater to control how often the position stream will be
updated. You can use the
FramePositionUpdater
, theTimerPositionUpdater
or write your own implementation of thePositionUpdater
.no getterinherited - releaseMode → ReleaseMode
-
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- source → Source?
-
no setterinherited
- state ↔ PlayerState
-
The current playback state.
It is only set, when the corresponding action succeeds.
getter/setter pairinherited
- volume → double
-
no setterinherited
Methods
-
dispose(
) → Future< void> -
Closes all StreamControllers.
inherited
-
fadeIn(
{Duration? duration, required Source source, double? volume, double? balance, AudioContext? ctx, Duration? position, PlayerMode? mode, dynamic beforeStart(MiniPlayer)?}) → Future< void> -
fade in audio file
inherited
-
fadeOut(
{Duration? duration}) → Future< void> -
fade out audio file
inherited
-
getCurrentPosition(
) → Future< Duration?> -
inherited
-
getDuration(
) → Future< Duration?> -
Get audio duration after setting url.
Use it in conjunction with setUrl.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pause(
) → Future< void> -
Pauses the audio that is currently playing.
inherited
-
play(
Source source, {double? volume, double? balance, AudioContext? ctx, Duration? position, PlayerMode? mode, dynamic beforePlay(MiniPlayer)?}) → Future< void> -
play override
handle before start function
inherited
-
release(
) → Future< void> -
Releases the resources associated with this media player.
inherited
-
resume(
) → Future< void> -
Resumes the audio that has been paused or stopped.
inherited
-
seek(
Duration position) → Future< void> -
Moves the cursor to the desired position.
inherited
-
setAudioContext(
AudioContext ctx) → Future< void> -
inherited
-
setBalance(
double balance) → Future< void> -
Sets the stereo balance.
inherited
-
setPlaybackRate(
double playbackRate) → Future< void> -
Sets the playback rate - call this after first calling play() or resume().
inherited
-
setPlayerMode(
PlayerMode mode) → Future< void> -
inherited
-
setReleaseMode(
ReleaseMode releaseMode) → Future< void> -
Sets the release mode.
inherited
-
setSource(
Source source) → Future< void> -
Sets the audio source for this player.
inherited
-
setSourceAsset(
String path, {String? mimeType}) → Future< void> -
Sets the URL to an asset in your Flutter application.
The global instance of AudioCache will be used by default.
inherited
-
setSourceBytes(
Uint8List bytes, {String? mimeType}) → Future< void> -
inherited
-
setSourceDeviceFile(
String path, {String? mimeType}) → Future< void> -
Sets the URL to a file in the users device.
inherited
-
setSourceUrl(
String url, {String? mimeType}) → Future< void> -
Sets the URL to a remote link.
inherited
-
setVolume(
double volume) → Future< void> -
Sets the volume (amplitude).
inherited
-
stop(
) → Future< void> -
Stops the audio that is currently playing.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited