I have an online restaurant menu on magento. Every product has a video description. When open a video on iPad it doesn't autostart and doesn't close when end. This is a php function, that opens a video file:

private function _getProductVideo($product, $number, $class) {
$video_file = $product - > {
'getProductVideo'.$number
}();
if (!empty($video_file)) {
$screenshot = $product - > {
'getProductVideo'.$number.'Screenshot'
}();
if (!empty($screenshot)) {
$html = '<a href="'.Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'catalog/product/video/'.$video_file.'" class="'.$class.' videothumb rel"><img class="abs" src="'.Mage::getDesign() - > getSkinUrl('img/video_play.png').'" alt=""/><img src="'.Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'catalog/product'.$screenshot.'" alt=""/><autoplay="true"></a>';

return $html;
}
}

I heard about quicktime .qtl format that has "quitwhendone" command, but don't know how to setup it on magento. So what should I do, to make videos in magento autostart and autoclose?