Android Question Need to run YouTube video inside my App

Discussion in 'Android Questions' started by Khairy Abdelhamid, Jun 24, 2019.

  1. Khairy Abdelhamid

    Khairy Abdelhamid Member Licensed User

    Dear All,
    Greetings,
    I need to run YouTube video inside my App.
    I really spent long times with different libraries, examples,.. but fail to run video inside my app.

    by only given direct link like:
    https://www.youtube.com/watch?v=rYGW4Cuwhgs&list=PLSXG.......

    hope to find complete example with requested libraries.

    thanks in advance.

    best regards
     
    Last edited: Jun 25, 2019
  2. ronell

    ronell Well-Known Member Licensed User

    did you already try this library?
     
  3. Khairy Abdelhamid

    Khairy Abdelhamid Member Licensed User

    Dear Mr. ronell
    Many thanks for your interest and your reply.
    In the link that you send :
    to run video
    Sub PlayVideo_Click
    YouTube.StartVideo("AIzaSyxxxxxxxx-xxxx-xxxxxxxxxxxx", "0xdZXOM_Otc", 0, False, True)
    End Sub

    while I need to run a video based on YouTube address like :
    www.youtube.com/watch?v=x3c1ih2NJEg


    That I need to run any video by know direct link (as above) without any preparation

    Hope to explain what i need correctly.

    Hope to find example/lib for that
    Best regards
     
  4. DonManfred

    DonManfred Expert Licensed User

    And
    Code:
    YouTube.StartVideo("AIzaSyxxxxxxxx-xxxx-xxxxxxxxxxxx", _
          
    "x3c1ih2NJEg"0FalseTrue)
    does not work for you?
     
    Peter Simpson likes this.
  5. ronell

    ronell Well-Known Member Licensed User

    im confuse why do you want to play videos using only the full address

    - use the library i suggested
    - play videos using VIDEO ID
     
    DonManfred likes this.
  6. Khairy Abdelhamid

    Khairy Abdelhamid Member Licensed User

    Hi, all
    thanks for suggestions,
    I still have problem to run YoutubeStreamFinder, (attach the project).
    I still need to solve that (I'm sure it was worked with me in past but now not), hope to run it (attach project).


    On the other hand i find other library SNYoutube it work well, but I have problem, that, the youtube icon shown on top of video, and if pressing it, the youtube page appear, i need to prevent that, I need to make my project don't goout to youtube or any other external thing.
    Also, other thing appear at the end of running video, that link to related video appear and refer also to youtube page and exit my project
    so, my question now, how make my view (SNYoutube) view only target video, without youtube icon and without related video in last of viewing.

    thanks at all
    best regards
     

    Attached Files:

  7. moster67

    moster67 Expert Licensed User

    DonManfred and Peter Simpson like this.
  8. Khairy Abdelhamid

    Khairy Abdelhamid Member Licensed User

    Dear Moster
    Many thanks for your, and thanks for all interest.

    I test YoutubeDL library and demo, it work but just to retrive information about the video,

    Now i need to play the video, please if you have a way to play youtube.

    best regards
     
  9. moster67

    moster67 Expert Licensed User

    Check the Url retrieved and use it with a video library such as Exoplayer or similar to play the video
     
  10. Khairy Abdelhamid

    Khairy Abdelhamid Member Licensed User

    Thanks Mr. Moster,
    ExoPlayer run normal video using URL as in example demo, it work well

    But I need to run YouTube video using URL of youtube or using Video ID or by any other way.

    I search for run youtube using ExoPlayer but didn't find way, are you know a way for that ?

    Best regards
     
  11. Almora

    Almora Active Member Licensed User

  12. Khairy Abdelhamid

    Khairy Abdelhamid Member Licensed User

    Dear Mr. Almora

    Thanks for your interest.
    I go through the thread with all examples,...
    But I fail to run it.
    Can you please send me/share a final example to run youtube link direct in the app.

    best regards
     
  13. moster67

    moster67 Expert Licensed User

    I am sorry but I don't understand what you want.
    If you use my YouTube-DL wrapper you will get a direct link (see the variable "theUrl" in the sample project). Just use this url in a video player and you can play the video bypassing the YouTube user interface. Heck, you can easily use the standard VideoViev which is part of the Audio library and play it:
    Code:
    vv.LoadVideo("http",theUrl)
    vv.Play
     
    DonManfred likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice