Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the format of the video shared by YouTube in Android

I am creating an app which uses share functions of YouTube to add YouTube videos in my playlist, since the id of the videos in YouTube is hard to type for the users. The basic steps are:

  1. The user opens YouTube
  2. The user opens a specific video
  3. The user click on the share option
  4. He clicks on my app.

By checking the follow tutorial I found a easy way to get the shared link from YouTube: http://developer.android.com/training/sharing/receive.html

And I got the videos links liked with the follow structure:

https://youtu.be/VIDEO_ID

Where VIDEO_ID is the id of the video. Here is an example: https://youtu.be/prkQ6QFv-_Y

What I wonder is if all the videos shared by YouTube will have this structure or depending on the version, the structure will change?

If the answer of the previous question is yes, please, provide the link structure for corresponding version of YouTube.

like image 477
jiahao Avatar asked Aug 02 '15 21:08

jiahao


1 Answers

Sharing YouTube formats (What is the format of the video shared by YouTube App):

In order to test your query i have installed several versions of youtube and gathered results :

While using YouTube versions ,

5.9.4.9
5.9.0.13
5.9.0.12
5.10.1.5
5.13.3
5.14.5
5.16.4
5.17.6
6.0.13
10.02.3
10.03.5
10.05.6

I could get the format as : https://youtu.be/idgoeshere

Also if tested in browsers we have the same format

Use Format in your own risk - YouTube enter image description here

Youtube I.D parsing for new URL formats

Edit 1 :

Why different versions of YouTube app tested ?

Just to make sure that is there any formatting differences used in their apps.

like image 113
Tharif Avatar answered Nov 09 '22 05:11

Tharif