Doctor X
Doctor X

Reputation: 33

VideoView restarts playback on lock screen

I have an activity containing a vitamio VideoView, it works pretty well except for a annoying issue that causes the player to restart playback when I lock the screen.

As far as I can see it actually kills the activity upon locking and then restarts it. Anyone have an idea on how I can fix this issue?

Thanks in advance, X

Upvotes: 2

Views: 845

Answers (1)

Doctor X
Doctor X

Reputation: 33

What I ended up doing was adding android:configChanges="orientation|screenSize" to my manifest. And I added videoView.pause(); to my onPause() function in the VideoView activity to make sure it didn't continue playing.

Even though this worked I believe you must force the orientation for the VideoView activity, unless you want it to look weird when the orientation changes.

Upvotes: 1

Related Questions