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
Post a Comment