setMediaFromNetwork method
This stops playback and changes the data source. Once the new data source has been loaded, the playback state will revert to
its state before the method was called. (i.e. if this method is called whilst media is playing, once the new
data source has been loaded, the new stream will begin playing.)
dataSource
- the URL of the stream to start playing.
Implementation
Future<void> setMediaFromNetwork(
String dataSource, {
bool? autoPlay,
HwAcc? hwAcc,
}) async {
_dataSourceType = DataSourceType.network;
package = null;
await _setStreamUrl(
dataSource,
dataSourceType: DataSourceType.network,
autoPlay: autoPlay,
hwAcc: hwAcc,
);
}