Hi! I’m new to the forum. I bought the book about a month ago and I’m enjoying it so far. However, I’ve a question regarding this chapter(maybe?) and the video playback challenge of the prior chapter.
In general, how do you handle rotation on video playback using MediaPlayer and a SurfaceHolder? I’m using setRetainInstance(true) and that seems to be insufficient for the job. To clarify, I’m playing a random mp4 file. On rotation, the playback seems to just stop.
I’m aware that OnSurfaceDestroyed() and OnSurfaceChanged() are called in the SurfaceHolder.Callback. Does this play into the equation for the solution? I’m aware that the callbacks are called but I’m uncertain as to how they effect playback.