I am trying to embed YouTubePlayerView in an android app. I am using YouTubePlayerAPI v1.2.1 in Android API 17.
It comes with a warning before the failure, which probably has something to do with it.
A crash occurs when player.play () is called. However, I still do not know how to play.
Any ideas?
02-20 15:52:07.924 6647-6867/? W/YouTubeAndroidPlayerAPI﹕ (unknown) setKeepScreenOn should be through player Surface, not SurfaceHolder
02-20 15:52:07.934 6647-6867/? W/dalvikvm﹕ threadid=25: thread exiting with uncaught exception (group=0x40d57930)
02-20 15:52:07.944 6647-6867/? E/AndroidRuntime﹕ FATAL EXCEPTION: YouTubePlayer.MediaPlayerThread
java.lang.AbstractMethodError: abstract method not implemented
at atz.getSurfaceContext(SourceFile)
at android.media.MediaPlayer.setDisplay(MediaPlayer.java:682)
at gos.a(SourceFile:174)
at goy.a(SourceFile:410)
at goy.a(SourceFile:40)
at gpd.handleMessage(SourceFile:792)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:137)
at android.os.HandlerThread.run(HandlerThread.java:60)
source
share