on-internet
← Community

'videoView' with Kotlin and Android Studio

Stack Overflow ·

I have a videoView in my layout and code to play it. It works, but on the left side of the video, I have a black line, and this happened with all the videos who I played. I think is a propriety default from Android Studio, but I don’t what I can do to remove this. My function to play videos: private fun playVideo() { val videoUri = Uri.parse("android.resource://" + requireActivity().packageName + "/" + R.raw.videooooo) Log.d("VideoPlayer", "URI do vídeo: $videoUri") try { videoView.setVideoURI(videoUri) videoView.setOnPreparedListener { mediaPlayer -> mediaPlayer.isLooping = false } videoView.

Comments

Sign in or sign up to comment and upvote.

No comments yet.