How do I play Youtube videos using the phonegap-videoplayer-plugin?

前端 未结 4 1060
天涯浪人
天涯浪人 2021-01-19 13:10

I am using a Phonegap plugin for playing a video in my iOS app. I\'m able to play a video with the URL format like http://easyhtml5video.com/images/happyfit2.mp4

相关标签:
4条回答
  • 2021-01-19 13:15

    YouTube Terms of Service: "You agree not to access Content through any technology or means other than the video playback pages of the Service itself, the Embeddable Player, or other explicitly authorized means YouTube may designate."

    0 讨论(0)
  • 2021-01-19 13:16

    try to give the youtube url in this format.

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

    You will get the desired result. But Autoplay is not enabled, as Apple stopped supporting autoplay to save user's bandwidth

    0 讨论(0)
  • 2021-01-19 13:19

    There are some methods that will give you direct link to youtube videos. Use "gdata" option to find all possible video formats.

    Then parse the result to get desired link. Hope this might be useful

    0 讨论(0)
  • 2021-01-19 13:29

    But everywhere I found the code to be edited in .m and .h files. None have explained how to use it.

    That's because you can only directly use MPMoviePlayerController from native apps (written in Objective-C). For any other technology you'll have to have an intermediary layer in between.

    From googling, I found this plugin for PhoneGap that claims to integrate with MPMoviePlayerController. I've no idea if it's any good, but it might do as a starting point.

    0 讨论(0)
提交回复
热议问题