Android Question Need to run YouTube video inside my App

Khairy Abdelhamid

Active 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
 
Upvote 0

DonManfred

Expert
Licensed User
Upvote 0

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
 
Upvote 0

Khairy Abdelhamid

Active 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
 

Attachments

  • YouTubeStreamFinderDemo2.zip
    10 KB · Views: 184
Upvote 0

Khairy Abdelhamid

Active 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
 
Upvote 0

moster67

Expert
Licensed User
Check the Url retrieved and use it with a video library such as Exoplayer or similar to play the video
 
Upvote 0

Khairy Abdelhamid

Active 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
 
Upvote 0

Khairy Abdelhamid

Active 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
 
Upvote 0

moster67

Expert
Licensed User
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 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:
B4X:
vv.LoadVideo("http",theUrl)
vv.Play
 
Upvote 0
Top