How to register link below on the iphone opens the Youtube app?

Good day!
How to register code links to on iphone opens the Youtube app?

Here when you click on the link to WATCH OUR 360 Movies www.karpovlab.com open in the browser and as the Safari hasn't lost 360 live, all wasted.: (
June 14th 19 at 20:34
1 answer
June 14th 19 at 20:36
https://m.youtube.com/watch?v=ID_VIDEO the browser will offer to open the link in the app
not working https://m.youtube.com/watch?v=KmgiRoUYaHs
or true written the address? - Saige.Bay commented on June 14th 19 at 20:39
I clicked from the phone, proposed to open in browser or app - jerod.Herm commented on June 14th 19 at 20:42
with iphone?
This code certainly works youtube://jhsdkRTD3

but it doesn't work on Android and PC :( - Saige.Bay commented on June 14th 19 at 20:45
I tried Android with chrome. there is not a system-it depends on the browser. there is a library that determines the os and browser, you can check if android + chrome and ios + chrome - set https://m.youtube.com/watch?v=KmgiRoUYaHs, if safari + ios put youtube://jhsdkRTD3 - jerod.Herm commented on June 14th 19 at 20:48
initially the question was about the iphone.
On Android works.
But how to combine? let me click on the picture and I don't know what device is the user? - Saige.Bay commented on June 14th 19 at 20:51
I have proposed a variant of js library )) to determine which devices go, and on this basis to put the right link - jerod.Herm commented on June 14th 19 at 20:54

Find more questions by tags YouTubeiOSHTMLCSS