19

My Nexus 4 got upgraded to 4.4 and now whenever MediaPlayer plays a sound, I get the warning:

Should have subtitle controller already set

And also when calling mp.release() I now get the warning

mediaplayer went away with unhandled events

The same app on a Nexus 7 with 4.3 doesn't display these warnings.

PFort
  • 485
  • 2
  • 6
  • 15
  • 2
    possible duplicate of [Should have subtitle controller already set Mediaplayer error Android](http://stackoverflow.com/questions/20087804/should-have-subtitle-controller-already-set-mediaplayer-error-android) – rds Aug 20 '14 at 11:54

2 Answers2

10

In Android 4.4 kitkat, there is a new feature which supports WebVTT for HLS which has introduced some changes in MediaPlayer. (Reference: Kitkat highlights - Closed Captions)

From your description of the error, it looks like the actual player engine is not invoking setSubtitleAnchor as VideoView is doing here. This leads to the error message from another method here which is invoked as part of the prepare state transition before invoking the listener.

P.S: Is your player a custom player or a standard player which comes pre-bundled as part of the Android distribution? Can you share any further logs?

Ganesh
  • 5,880
  • 2
  • 36
  • 54
5
mp.reset();
mp.release();

That should help you get rid of the second warning

Jared Burrows
  • 54,294
  • 25
  • 151
  • 185
Azad
  • 112
  • 6