dolphins...@gmail.com

unread,
May 9, 2019, 10:48:54 AM5/9/19
to mitappinv...@googlegroups.com
I'm trying to figure out how to make my app open Youtube with the click of a button and I saw that someone else fixed my first problem by using a vnd rather than a url... the only problem is, I don't know what that is or how to find it. Can anyone help me?

edit- I used the vnd provided in the post and it worked, I just need to find out how to get that URI for another video

Evaldas Latoškinas

unread,
May 9, 2019, 1:16:24 PM5/9/19
to mitappinv...@googlegroups.com
As far as I am aware, the VND data URI uses the same video ID used for the typical URL links.

So for example, if you had the video as in the post: http://www.youtube.com/watch?v=8ADwPLSFeY8

The video ID is the last part of the url (v=8ADwPLSFeY8)

Then, you can format your vnd uri as follows: vnd.youtube:8ADwPLSFeY8

I could be wrong, but I believe each video in Youtube only has one ID. Hope this helps!

Yuko Mitsuketa

unread,
May 9, 2019, 3:27:49 PM5/9/19
to mitappinv...@googlegroups.com
I tried that. The weird thing about it is Youtube doesn't recognize the id. The URL and the vnd in the post don't have the same id.

vnd used: vnd.youtube:5Yn6fR7CAD0

the vnd takes me to a different video entirely in the app than the link does.

edit- I changed the vnd and it took me to the same one... but my video doesn't work. Is it because there are symbols and such?
Here's the link I'd like to use: https://www.youtube.com/watch?v=atp0MuIQc_M&t=82s
the vnd I tried and didn't work: vnd.youtube:atp0MulQc_M&t=82s

edit #2- Nevermind! After some fiddling around with the video id I figured out that the last bit was the timing on the video. Thank you so much for your help in pushing me in the right direction. Now to do this 15 more times.

Evaldas Latoškinas

unread,
May 9, 2019, 4:05:43 PM5/9/19
to MIT App Inventor Forum
Indeed, the issue is the &t=82s bit of the url. In fact, this parameter can be specified in the "Extra Key" and "Extra Value" fields, where t is the key, and 82 is the value, if I'm correct (or the Extras list, but one Extra Key and Value pair should suffice).

I believe the documentation here covers a bit more on this:
http://ai2.appinventor.mit.edu/reference/other/activitystarter.html

Good luck and glad to know it worked!
Reply all
Reply to author
Forward
0 new messages