MethodChannelMymedia class

An implementation of MymediaPlatform that uses method channels.

Inheritance

Constructors

MethodChannelMymedia.new()
Constructor that sets up the event channel listener.

Properties

eventChannel EventChannel
The event channel used to receive visualization data.
final
hashCode int
The hash code for this object.
no setterinherited
methodChannel MethodChannel
The method channel used to interact with the native platform.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

Operators

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