Future<void> playLocalFile(String filePath) async { // Ensure the file path is correct and accessible from the web directory await _audioPlayer.play(DeviceFileSource(filePath)); }