Skip to content Skip to sidebar Skip to footer

How To Play A Video Using The Youtube Api With Firebase?

To do this: 1.- I make the instance to firebase mDatabase = FirebaseDatabase.getInstance().getReference().child('Videos'); 2.- Then I link the layout to the code mNoticiasSing

Solution 1:

Do this.

youTubePlayerView.initialize("YOUR API KEY",
            new YouTubePlayer.OnInitializedListener() {
                @Override
                public void onInitializationSuccess(YouTubePlayer.Provider provider,
                        YouTubePlayer youTubePlayer, boolean b) {


                    youTubePlayer.loadVideo("VIDEO_ID_HERE");
                }
                @Override
                public void onInitializationFailure(YouTubePlayer.Provider provider,
                        YouTubeInitializationResult youTubeInitializationResult) {

                }
    });

Post a Comment for "How To Play A Video Using The Youtube Api With Firebase?"