ssawchenko / android-youtube-player

Automatically exported from code.google.com/p/android-youtube-player
0 stars 0 forks source link

Android TV (ADT-1) YouTubePlayerFragment does not works #30

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago

1. extends YouTubePlayerFragment on Android TV (ADT-1)
2. and try to play video using YouTubePlayerFragment does not works
3. It works well on other devices including Logitech review box.\
4. On Android TV (ADT-1) it can be played in full screen using 
YouTubeStandalonePlayer. 

But our requirement is to run it in fragment. 

this.initialize(ServiceSecret.youtube_developer_key,new 
YouTubePlayer.OnInitializedListener() {
            @Override
            public void onInitializationSuccess(YouTubePlayer.Provider provider, YouTubePlayer youTubePlayer, boolean wasRestored) {
                mProvider=provider;
                mPlayer=youTubePlayer;
                mPlayer.setShowFullscreenButton(false);
                mPlayer.setPlayerStyle(YouTubePlayer.PlayerStyle.MINIMAL);

                if (!wasRestored) {
                   mPlayer.loadVideos(mContents);
                }
            }
            @Override
            public void onInitializationFailure(YouTubePlayer.Provider provider, YouTubeInitializationResult youTubeInitializationResult) {
                Log.e(tag,youTubeInitializationResult.toString());
                Log.e(tag,youTubeInitializationResult.name());
            }
        });

Error Shown in fragment. 
09-28 19:52:11.931    4226-4226/com.island.streamplayer 
E/YoutubeVideoFragment﹕ SERVICE_INVALID
09-28 19:52:11.931    4226-4226/com.island.streamplayer 
E/YoutubeVideoFragment﹕ SERVICE_INVALID

Original issue reported on code.google.com by satendar...@gmail.com on 28 Sep 2014 at 2:30