Mymedia class

A Flutter plugin for audio streaming and visualization.

Constructors

Mymedia.new()
Creates a new Mymedia instance This class is kept for backward compatibility Consider using FlutterAudioRecorderPlayer instead

Properties

durationStream Stream<int>
Returns a stream of duration updates.
no setter
hashCode int
The hash code for this object.
no setterinherited
lastPlayerException PlayerException?
Gets the last player exception.
no setter
playerExceptionStream Stream<PlayerException?>
Returns a stream of player exceptions.
no setter
playerStateStream Stream<PlaybackState>
Returns a stream of combined player state updates.
no setter
playingStream Stream<bool>
Returns a stream of playing state updates.
no setter
playlist Playlist?
Gets the current playlist.
no setter
positionStream Stream<int>
Returns a stream of position updates.
no setter
processingStateStream Stream<ProcessingState>
Returns a stream of processing state updates.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
speedStream Stream<double>
Returns a stream of speed updates.
no setter
volumeStream Stream<double>
Returns a stream of volume updates.
no setter

Methods

cancelRecording() Future<bool>
Cancels the current recording without saving.
deleteRecording(String id) Future<bool>
Deletes a recording.
dispose() → void
Disposes of resources
getDuration() Future<int>
Gets the duration of the current audio in milliseconds.
getPcmDataStream() Stream<PcmData>
Returns a stream of PCM audio data.
getPlatformVersion() Future<String?>
Returns the current platform version.
getPlaybackStateStream() Stream<PlaybackState>
Returns a stream of playback state updates.
getPosition() Future<int>
Gets the current playback position in milliseconds.
getRecordings() Future<List<AudioRecording>>
Gets all recordings as a list of AudioRecording objects.
getVisualizationDataStream() Stream<VisualizationData>
Returns a stream of visualization data.
isPlaying() Future<bool>
Returns whether audio is currently playing.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pausePlayback() Future<void>
Pauses the current playback.
resumePlayback() Future<void>
Resumes the current playback.
savePcmAsWav(String filePath) Future<bool>
Saves the current PCM buffer as a WAV file.
seekTo(int position) Future<void>
Seeks to the specified position in milliseconds.
setAudioSource(AudioSource source) Future<int>
Sets the audio source to play
setSpeed(double speed) Future<void>
Sets the playback speed (0.5 to 2.0).
setVolume(double volume) Future<void>
Sets the volume (0.0 to 1.0).
skipToIndex(int index) Future<bool>
Skips to a specific index in the playlist.
skipToNext() Future<bool>
Skips to the next track in the playlist.
skipToPrevious() Future<bool>
Skips to the previous track in the playlist.
startPlayback(String url) Future<bool>
Starts playback of the audio stream from the given URL.
startRecording({int? sampleRate, int? channels, int? bitDepth, String? title}) Future<bool>
Starts recording the audio that's currently playing.
stopPlayback() Future<void>
Stops the current playback.
stopRecording(String filePath) Future<bool>
Stops recording and saves the recorded audio as a WAV file.
toString() String
A string representation of this object.
inherited
updateRecordingTitle(String id, String title) Future<bool>
Updates the title of a recording.

Operators

operator ==(Object other) bool
The equality operator.
inherited