not able to play any embed youtube video on iphone 5/safari

Tag: youtube-api , mediaelement.js , mediaelement Author: bmjiande Date: 2013-06-28

I use mediaelement player and embed youtube videos in it. my code in client-side javascript is as follows:

$("#player").html(
  '<video width=' + width + ' height=' + height + '  autoplay>' +
  '<source src=$VIDEO_URL' + ' type="video/youtube"></source>' +
  '</video>'
);

$('video').mediaelementplayer({
  success: function(player, node) {
    mePlayer = player;
    ...
  }
});

When I try on play any video on iPhone, is says "This video is currently unavailable".

What is it I am missing? Please help.

Other Answer1

I found the answer here..in case anyone else struggling

http://apiblog.youtube.com/2010/07/new-way-to-embed-youtube-videos.html