Microdata

This commit is contained in:
Pierre Rudloff 2014-05-23 19:33:52 +02:00
parent 8a9298fb1b
commit ba963cad50

14
api.php
View file

@ -28,18 +28,18 @@ if (isset($_GET["url"])) {
include 'head.php';
?>
<body>
<div class="wrapper">
<div itemscope itemtype="http://schema.org/VideoObject" class="wrapper">
<div class="main">
<?php
include 'logo.php';
?>
<p>You are going to download<i>
<a id="video_link" data-ext="<?php echo $video->ext; ?>" data-video="<?php echo $video->url; ?>" href="<?php echo $video->webpage_url; ?>">
<p>You are going to download<i itemprop="name">
<a itemprop="url" id="video_link" data-ext="<?php echo $video->ext; ?>" data-video="<?php echo $video->url; ?>" href="<?php echo $video->webpage_url; ?>">
<?php
echo $video->title;
?></a></i>. <img class="cast_icon" id="cast_disabled" src="img/ic_media_route_disabled_holo_light.png" alt="Google Cast™ is disabled" title="Google Cast is not supported on this browser." /><img class="cast_btn cast_hidden cast_icon" id="cast_btn_launch" src="img/ic_media_route_off_holo_light.png" title="Cast to ChromeCast" alt="Google Cast™" /><img src="img/ic_media_route_on_holo_light.png" alt="Casting to ChromeCast…" title="Stop casting" id="cast_btn_stop" class="cast_btn cast_hidden cast_icon" /></p>
<?php
echo '<img class="thumb" src="',
echo '<img itemprop="image" class="thumb" src="',
$video->thumbnail, '" alt="" />';
?><br/>
<form action="api.php">
@ -53,9 +53,9 @@ if (isset($_GET["url"])) {
<ul id="format" class="format">
<?php
foreach ($video->formats as $format) {
echo '<li>';
echo '<a href="', $format->url ,'">';
echo $format->format, ' (', $format->ext, ')';
echo '<li itemprop="encoding" itemscope itemtype="http://schema.org/VideoObject">';
echo '<a itemprop="contentUrl" href="', $format->url ,'">';
echo '<span itemprop="videoQuality">', $format->format, '</span> (<span itemprop="encodingFormat">', $format->ext, '</span>)';
echo '</a></li>';
}
?>