Best practice is to reload the src attribute when loading is complete:
An example that I did on the map page using google map in iframe:
$(document).delegate('.ui-page', 'pageshow', function () { $("#mapframe").attr("src","https://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=624+Hill+Farm+Lane+Springfield,+PA&aq=&sll=39.930274,-75.289307&sspn=0.289068,0.580215&ie=UTF8&hq=&hnear=624+Hill+Farm+Lane+Springfield,+Pennsylvania 19064&t=m&ll=39.923297,-75.352306&spn=0.063191,0.109863&z=10&output=embed&iwloc"); });
In your case:
$(document).delegate('.ui-page', 'pageshow', function () { $(".youtube-player").attr("src","http://www.youtube.com/embed/cTl3U6aSd2w"); });
Give it a try. Hope it works!
Nisha source share