scratch
/graph.php |
@@ -64,7 +64,8 @@ |
die('File not found.'); |
} |
|
$URL = $config['URL_PATH'].$_GET['hash']; |
$URL = $config['URL_PATH'].'og/'.$_GET['hash']; |
$VIDEO_URL = $config['URL_PATH'].'file.php?hash='.$_GET['hash']; |
|
switch(strtoupper($fileExtension)) { |
case 'GIF': |
@@ -76,7 +77,7 @@ |
<meta property="og:url" content="$URL"> |
<meta property="og:title" content="Scratch Copy"> |
<meta property="og:type" content="video.other"> |
<meta property="og:image" content="$URL"> |
<meta property="og:image" content="$VIDEO_URL"> |
<meta property="og:image:width" content="$width"> |
<meta property="og:image:height" content="$height"> |
</head> |
@@ -89,7 +90,34 @@ |
|
</html> |
END; |
break; |
break; |
case 'MP4': |
echo <<<END |
<html> |
<head> |
<!-- These two aren't necessary for embedding. --> |
<meta property="og:site_name" content="Scratch Copy"> |
<meta property="og:title" content="Scratch Copy"> |
<meta property="og:type" content="video.other"> |
<meta property="og:description" content="Scratch Copy"> |
<meta property="og:url" content="$URL"> |
<meta property="og:image" content="https://scratch.grimore.org/img/blueprint.png"> |
<meta property="og:video" content='https://scratch.grimore.org/flowplayer/flowplayer.swf?config={"clip":{"url":"$VIDEO_URL"}}'> |
<meta property="og:video:secure_url" content='https://scratch.grimore.org/flowplayer/flowplayer.swf?config={"clip":{"url":"$VIDEO_URL"}}'> |
<meta property="og:video:type" content="application/x-shockwave-flash"> |
<meta property="og:video:height" content="254"> |
<meta property="og:video:width" content="650"> |
</head> |
|
<body> |
<p> |
<object width="425" height="300" id="Scratch Copy" name="Scratch Copy" data="https://scratch.grimore.org/flowplayer/flowplayer.swf" type="application/x-shockwave-flash"><param name="movie" value="https://scratch.grimore.org/flowplayer/flowplayer.swf" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="flashvars" value='config={"clip":{"url":"$VIDEO_URL"}}' /></object> |
</p> |
</body> |
|
</html> |
END; |
break; |
} |
|
|