BodyYoutubeLink2iframe

Creates youtube embed from link
Converts a link to youtube video into a youtube iframe (actual youtube video)
This was used a while back and got updated as youtube changed the way the video is embed in websites.
Just pass the body where that link is found
Can handle several syntax of youtube links like
https://youtube.com
https://youtu.be/


Public

Tested

My Own Work
Function BodyYoutubeLink2iframe(strLink)
Rett = strLink
Rett = Replace(Rett, "http://www.youtube.com/v/", "")
Rett = Replace(Rett, "https://www.youtube.com/v/", "")
Rett = Replace(Rett, "http://youtube.com/v/", "")
Rett = Replace(Rett, "https://youtube.com/v/", "")
Rett = Replace(Rett, "https://www.youtube.com/watch?", "")
Rett = Replace(Rett, "https://youtu.be/", "")
Rett = Replace(Rett, "www.youtube.com/v/", "")
' https://www.youtube.com/watch?v=VuNIsY6JdUw
Rett = Cutstring(Rett, "v=", "&", 1)
Rett = Cutstring3(Rett, 1, "&")
Rett = "" & vbcrlf
BodyYoutubeLink2iframe=Rett
End Function

strLink

Views 1049 Downloads 348

Classic ASP Multimedia
ANmarAmdeen
802
Attachments
Revisions

v1.0