ConcatenatingAudioSource class
An AudioSource representing a concatenation of multiple audio sources to be played in succession. This can be used to create playlists. Playback between items will be gapless on Android, iOS and macOS, while there will be a slight gap on Web.
(Untested) Audio sources can be dynamically added, removed and reordered while the audio is playing.
- Inheritance
-
- Object
- AudioSource
- ConcatenatingAudioSource
Constructors
-
ConcatenatingAudioSource({required List<
AudioSource> children, bool useLazyPreparation = true, ShuffleOrder? shuffleOrder}) -
Creates a
ConcatenatingAudioSorce
with the specified children. If useLazyPreparation istrue
, children will be loaded/buffered as late as possible before needed for playback (currently supported on Android only). When AudioPlayer.shuffleModeEnabled istrue
,shuffleOrder
will be used to determine the playback order (defaulting to DefaultShuffleOrder).
Properties
-
children
→ List<
AudioSource> -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- length → int
-
The number of AudioSources.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
sequence
→ List<
IndexedAudioSource> -
no setteroverride
-
shuffleIndices
→ List<
int> -
no setteroverride
- useLazyPreparation → bool
-
final
Methods
-
add(
AudioSource audioSource) → Future< void> - (Untested) Appends an AudioSource.
-
addAll(
List< AudioSource> children) → Future<void> - (Untested) Appends multiple AudioSources.
-
clear(
) → Future< void> - (Untested) Removes all AudioSources.
-
insert(
int index, AudioSource audioSource) → Future< void> -
(Untested) Inserts an AudioSource at
index
. -
insertAll(
int index, List< AudioSource> children) → Future<void> -
(Untested) Insert multiple AudioSources at
index
. -
move(
int currentIndex, int newIndex) → Future< void> -
(Untested) Moves an AudioSource from
currentIndex
tonewIndex
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeAt(
int index) → Future< void> -
(Untested) Dynamically remove an AudioSource at
index
after this ConcatenatingAudioSource has already been loaded. -
removeRange(
int start, int end) → Future< void> -
(Untested) Removes a range of AudioSources from index
start
inclusive toend
exclusive. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
int index) → AudioSource