How to play Youtube video using phonegap-videoplayer plugin?

I am using the Phonegap plugin to play videos in my iOS application. I can play videos with a URL format like http://easyhtml5video.com/images/happyfit2.mp4 .

How to play Youtube video using phonegap-videoplayer plugin?

+4
source share
4 answers

There are several ways that will give you a direct link to a YouTube video. Use "gdata" to find all possible video formats.

Then analyze the result to get the link you want. Hope this can be helpful

+1
source

YouTube’s Terms of Service : “You agree not to access the Content through any technology or means other than the video playback pages of the Service itself, the Embedded Player, or other explicitly what YouTube may mean."

+2
source

But everywhere I found editing code in the .m and .h files. No one has explained how to use it.

This is because you can directly use MPMoviePlayerController from within your own applications (written in Objective-C). For any other technology, you will have to have an intermediate layer between them.

From googling, I found this PhoneGap plugin that claims to integrate with MPMoviePlayerController. I don’t know if this is good, but it can serve as a starting point.

+1
source

try entering the YouTube URL in this format.

 http://www.youtube.com/embed/jxXukpxNSx4 

You will get the desired result. But autorun is not turned on because Apple has stopped supporting autorun to save traffic

+1
source

Source: https://habr.com/ru/post/1400828/


All Articles