SoundLoadOptions class
The SoundLoadOptions class contains different options to configure how audio files are loaded from the server.
The Sound.defaultLoadOptions object is the default for all loading operations if no SoundLoadOptions are provided to the Sound.load function.
Constructors
Properties
- ac3 ↔ bool
-
The application provides ac3 files as an option to load audio files.
getter/setter pair
-
alternativeUrls
↔ List<
String> ? -
A list of alternative urls for sound samples in the case where the
primary url does not work or the file type is not supported by the
browser. If this value is null, the alternative urls are calculated
automatically based on the mp3, mp4, ogg, opus, ac3 and wav properties.
getter/setter pair
- corsEnabled ↔ bool
-
Use CORS to download the audio file. This is often necessary when you have
to download audio files from a third party server.
getter/setter pair
- engine ↔ SoundEngine?
-
Ignore the SoundMixer.engine and use this sound engine instead.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- ignoreErrors ↔ bool
-
Ignore loading errors and use a silent audio sample instead.
getter/setter pair
- mp3 ↔ bool
-
The application provides mp3 files as an option to load audio files.
getter/setter pair
- mp4 ↔ bool
-
The application provides mp4 files as an option to load audio files.
getter/setter pair
- ogg ↔ bool
-
The application provides ogg files as an option to load audio files.
getter/setter pair
- opus ↔ bool
-
The application provides opus files as an option to load audio files.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- wav ↔ bool
-
The application provides wav files as an option to load audio files.
getter/setter pair
Methods
-
clone(
) → SoundLoadOptions - Create a deep clone of this SoundLoadOptions.
-
getOptimalAudioUrls(
String primaryUrl) → List< String> - Determine which audio files are the most likely to play smoothly, based on the supported types and formats available.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited