controller = VideoPlayerController.networkUrl(Uri.parse(baseUrl+videoUrl))
..initialize().then((_) {
setState(() {});
})..addListener(() {
final error = controller.value.errorDescription;
if (error != null) {
print("Video player error: $error");
}
});
controller.setPlaybackSpeed(1);
played();
근데 안드로이드 보안상 url로 비디오 접근이 안되신단다... 그래서 androidmanifest.xml에 추가해줘야 함
android:networkSecurityConfig="@xml/network_security_config"
android:usesCleartextTraffic="true"
이거 두개 application에 추가해야 됨