Reputation: 15
My embded youtube video won't play on mobile devices (desktop working fine). the videos is trigger when an image which hover it got clicked.i would like to keep it that way just to make it work on mobile. (i know that it has something to do with the fact that i must emded it)
can you please advice Thanks a lot!! this is the code:
a class="thumb-video show-product-video" href="https://www.youtube.com/watch?v=fmpEyJJHBC8">
Upvotes: 0
Views: 204
Reputation: 11
in the html, add the unique code of youtube in the last section of url
ex: http://www.youtube.com/v/fmpEyJJHBC8
Upvotes: 1
Reputation: 11
try this
public string GetVideo(object MedVideo)
{
//DataRowView dRView = (DataRowView)imgSRC;
string v = MedVideo.ToString();
v = v.Substring(v.LastIndexOf("v=") + 2);
if (v.Contains("&"))
v = v.Substring(0, v.LastIndexOf("&"));
VideoURL = "http://www.youtube.com/v/" + v;
return VideoURL;
}
Upvotes: 0