setUrl method

Future<void> setUrl(
  1. String url, {
  2. bool autoplay = true,
})

Cambia la URL del video

Implementation

Future<void> setUrl(String url, {bool autoplay = true}) async {
  try {
    await _methodChannel.invokeMethod('setUrl', {
      'url': url,
      'autoplay': autoplay,
    });
  } catch (e) {
    debugPrint('[NativeVideoPlayer] Error al cambiar URL: $e');
    rethrow;
  }
}