getAudioUrlFlexible method

Future<Map<String, dynamic>> getAudioUrlFlexible({
  1. String? title,
  2. String? artist,
  3. String? videoId,
  4. String audioQuality = 'HIGH',
})

Get audio URL using flexible parameters

At least one of title, artist, or videoId must be provided. If videoId is provided, it will be used directly for faster results. If only title and/or artist are provided, the method will search for the song first and then extract the audio URL.

Parameters:

  • title: Song title (optional if videoId is provided)
  • artist: Artist name (optional if videoId is provided)
  • videoId: YouTube video ID (optional if title/artist provided)
  • audioQuality: Audio quality level - "LOW", "MED", "HIGH", "VERY_HIGH"

Returns a Map with:

  • success: bool - Whether the operation was successful
  • audioUrl: String - The direct audio URL (if successful)
  • error: String - Error message (if failed)
  • Additional metadata about the request

Implementation

Future<Map<String, dynamic>> getAudioUrlFlexible({
  String? title,
  String? artist,
  String? videoId,
  String audioQuality = 'HIGH',
}) {
  throw UnimplementedError('getAudioUrlFlexible() has not been implemented.');
}