Skip to content

Commit 7ad9c80

Browse files
committed
fix: build fails due to deprication warnings
Fix usage of outdated network method in video and audio player.
1 parent 79ec194 commit 7ad9c80

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/flutter_html_audio/lib/flutter_html_audio.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ class _AudioWidgetState extends State<AudioWidget> {
6060
];
6161

6262
if (sources.isNotEmpty && sources.first != null) {
63-
audioController = VideoPlayerController.network(
64-
sources.first ?? "",
63+
audioController = VideoPlayerController.networkUrl(
64+
Uri.parse(sources.first ?? ""),
6565
);
6666
chewieAudioController = ChewieAudioController(
6767
videoPlayerController: audioController!,

packages/flutter_html_video/lib/flutter_html_video.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class _VideoWidgetState extends State<VideoWidget> {
8484
break;
8585
default:
8686
_videoController =
87-
VideoPlayerController.network(sourceUri.toString());
87+
VideoPlayerController.networkUrl(sourceUri);
8888
break;
8989
}
9090
_chewieController = ChewieController(

0 commit comments

Comments
 (0)