setAudioTrack method
Sets the current AudioTrack for audio output.
- Currently selected AudioTrack can be accessed using
state.track.audio
orstream.track.audio
. - The list of currently available AudioTracks can be obtained accessed using
state.tracks.audio
orstream.tracks.audio
. - External audio track can be loaded using AudioTrack.uri constructor.
player.setAudioTrack(
AudioTrack.uri(
'https://www.iandevlin.com/html5test/webvtt/v/upc-tobymanley.mp4',
title: 'English',
language: 'en',
),
);
Implementation
Future<void> setAudioTrack(AudioTrack track) async {
return platform?.setAudioTrack(track);
}