in Kotlin / Android Я пытаюсь воспроизвести видео в формате mp4 Logcat показывает эти ошибки
URI http://videocdn.bodybuilding.com/video/mp4/62000/62792m.mp4
D/SurfaceView: BG show() Surface(name=Background for - SurfaceView - android.widget.VideoView{aaf519c VFE...... ......ID 20,108-700,487 #7f0a0164 app:id/exercise_video}
D/SurfaceView: surfaceCreated 1 #3 android.widget.VideoView{aaf519c VFE...... ......ID 20,108-700,487 #7f0a0164 app:id/exercise_video}
W/MediaPlayer: Couldn't open http://videocdn.bodybuilding.com/video/mp4/62000/62792m.mp4: java.io.FileNotFoundException: No content provider: http://videocdn.bodybuilding.com/video/mp4/62000/62792m.mp4
D/MediaPlayer: setDataSource IOException | SecurityException happend :
java.io.FileNotFoundException: No content provider: http://videocdn.bodybuilding.com/video/mp4/62000/62792m.mp4
at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1402)
at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:1253)
at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:1176)
at android.media.MediaPlayer.attemptDataSource(MediaPlayer.java:1182)
at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1154)
at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1178)
at android.widget.VideoView.openVideo(VideoView.java:399)
Видео отсутствует, но звук слышен, несмотря на сообщения об ошибках.
<VideoView
android:id="@+id/exercise_video"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginTop="5dp"
android:layout_marginEnd="10dp"
android:layout_marginBottom="5dp"
android:visibility="gone"
android:background="@android:color/holo_green_dark"
android:contentDescription="@string/blank" />
и
val uri = Uri.parse("http://videocdn.bodybuilding.com/video/mp4/62000/62792m.mp4")/// url)
exercise_video.setVideoURI(uri)
exercise_video.start()
Я пробовал другие URL и у всех одна и та же проблема
Что такое IOException или SecurityException ??
Спасибо заранее