How to make player code validate on W3C?

W3C will throw error for iframes, so you need to use object tags in place of iframe tags.

<?php

if($matches[1][0]==”full”)
{
$replace = ‘<object data=”http://html5.svnlabs.com/html5full.php?id=’.$matches[2][0].’&bg=f6f6f6″ type=”text/html” width=”606″ height=”230″ style=”border: medium none; background-color:#f6f6f6; overflow:hidden; width: 606px; height: 230px;”></object>’;
}
else if($matches[1][0]==”big”)
{
$replace = ‘<object data=”http://html5.svnlabs.com/html5big.php?id=’.$matches[2][0].’&bg=f6f6f6″ type=”text/html” width=”386″ height=”434″ style=”border: medium none; background-color:#f6f6f6; overflow:hidden; width: 386px; height: 434px;”></object>’;
}
else
{
$replace = ‘<object data=”http://html5.svnlabs.com/html5small.php?id=’.$matches[2][0].’&bg=f6f6f6″ type=”text/html” width=”386″ height=”230″ style=”border: medium none; background-color:#f6f6f6; overflow:hidden; width: 386px; height: 230px;”></object>’;
}

if($matches[1][0]==”full”)
{
$replace = ‘<iframe src=”http://html5.svnlabs.com/html5full.php?id=’.$matches[2][0].'” frameborder=”0″ marginheight=”0″ marginwidth=”0″ scrolling=”no” width=”566″ height=”207″></iframe>’;
}
else if($matches[1][0]==”big”)
{
$replace = ‘<iframe src=”http://html5.svnlabs.com/html5big.php?id=’.$matches[2][0].'” frameborder=”0″ marginheight=”0″ marginwidth=”0″ scrolling=”no” width=”347″ height=”414″></iframe>’;
}
else
{
$replace = ‘<iframe src=”http://html5.svnlabs.com/html5small.php?id=’.$matches[2][0].'” frameborder=”0″ marginheight=”0″ marginwidth=”0″ scrolling=”no” width=”347″ height=”207″></iframe>’;
}

?>

Posted in: HTML5, Joomla, WordPress

About Us

We are one of the leading provider for HTML5 MP3/MP4 Horizontal Playlist, Vertical Playlist, Karaoke, Lyrics, FeedBurner Podcast, Amazon S3, AWS CloudFront, CDN, Wordpress, Joomla, Standalone, Video, Radio, Folder Player.

Connect With Us