yqritc / Android-ScalableVideoView

Android Texture VideoView having a variety of scale types like the scale types of ImageView such as fitCenter, centerCrop, centerTopCrop and more
Apache License 2.0
1.09k stars 223 forks source link

Bug: no audio after repeating #44

Open AndroidDeveloperLB opened 6 years ago

AndroidDeveloperLB commented 6 years ago

I use this:

        videoView.setRawData(R.raw.test)
        videoView.isLooping = true
        videoView.setVolume(1f, 1f)
        videoView.prepare { videoView.start() }

And this in layout file:

<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent" android:layout_height="match_parent">

    <com.yqritc.scalablevideoview.ScalableVideoView
        android:id="@+id/videoView" android:layout_width="match_parent" android:layout_height="match_parent"
        app:scalableType="centerCrop"/>
</RelativeLayout>

Yet for some reason, after the first playback, I can't hear anything. How come?

Attached sample project. MyApplication.zip