android - YouTubePlayerSupportFragment fullscreen button forces orientation change and does not enter fullscreen -


i creating youtubeplayersupportfragment. playing in portrait mode works fine. click fullscreen button of player forces orientation change , recreates activity in (the video stops playing , fragment recreated).

this how create fragment:

fragment = (youtubeplayersupportfragment) getsupportfragmentmanager().findfragmentbyid(r.id.youtube_fragment); fragment.initialize(config.youtube_api_key, this); 

the similar thing on stackoverflow find question: youtubeplayersupportfragment starts duplicate activity

this guy has same problem no answer far.

i had same issue , apparently it's defined behaviour. can disable (for example in oninitializationsucces):

@override public void oninitializationsuccess(provider provider, youtubeplayer player, boolean success) {     player.setfullscreencontrolflags(0); 

more info here.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -