Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to open native app #134

Closed
Aathi opened this issue Apr 9, 2015 · 5 comments
Closed

How to open native app #134

Aathi opened this issue Apr 9, 2015 · 5 comments

Comments

@Aathi
Copy link

Aathi commented Apr 9, 2015

Hi,
I am trying to embed youtube in my app but some of the videos are restricted by owner so I decided to open those videos in mobile native app(youtube). Is there a way to open native app from my app with that particular youtube link .

@dukex
Copy link
Contributor

dukex commented Apr 10, 2015

Hi @Aathi

Do you can use a cordova plugin like https://github.com/raulduran/VideoPlayer or https://github.com/Glitchbone/CordovaYoutubeVideoPlayer

I recently used the VideoPlayer plugin and works fine

@Aathi
Copy link
Author

Aathi commented Apr 10, 2015

Hi Thanks,
1.https://github.com/Glitchbone/CordovaYoutubeVideoPlayer I think this plugin doesn't support to play Playlist
2.https://github.com/raulduran/VideoPlayer doesn't work

@billybonks
Copy link
Contributor

Im not sure what os you are using, but if its android then you just need to create an Intent. here is an tutorial about creating them in cordova http://smus.com/android-phonegap-plugins/

@flieks
Copy link

flieks commented Jan 25, 2016

yea maybe they use old youtube api's i think.
investigating the Youtube API, i added manually in the plugin a reference to lib YouTubeAndroidPlayerApi.jar
import com.google.android.youtube.player.YouTubeStandalonePlayer;

and then just add this
Intent intent = YouTubeStandalonePlayer.createVideoIntent(this.cordova.getActivity(), "AIzaSyAqKzdGPFWE9Cuy1z5ZDhyF5fI8gERD8KM", vid, 0, true, false);
this.cordova.getActivity().startActivity(intent);

@Aathi
Copy link
Author

Aathi commented Jan 25, 2016

@flieks Cool.. Tnx 😎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants