www/adium.im 495:3b54e6ac6e58: Attempting to make the video play...

commits at adium.im commits at adium.im
Sun Jan 8 09:18:50 UTC 2012


details:	http://hg.adium.im/www/adium.im/rev/3b54e6ac6e58
revision:	495:3b54e6ac6e58
branch:		adiumx.com
author:		Peter Hosey <hg at boredzo.org>
date:		Sun Jan 08 01:18:46 2012 -0800

Attempting to make the video player less tall for HD videos.

diffs (75 lines):

diff -r 663773fa3d2a -r 3b54e6ac6e58 screencasts/index.php
--- a/screencasts/index.php	Sun Jan 08 01:11:55 2012 -0800
+++ b/screencasts/index.php	Sun Jan 08 01:18:46 2012 -0800
@@ -9,30 +9,35 @@
 			'blip_id' => 'AYLmrAQA',
 			'title' => "Installing Adium",
 			'permalink_name' => 'installing-adium',
+			'useHD' => 1,
 			'description' => "How to copy Adium from its disk image into your Applications folder."
 		),
 		array(
 			'blip_id' => 'AYK86zcA',
 			'title' => "First Run",
 			'permalink_name' => 'first-run',
+			'useHD' => 0,
 			'description' => "A demonstration of running Adium's setup assistant for the first time."
 		),
 		array(
 			'blip_id' => 'AYK86zUA',
 			'title' => "Adding a contact; first chat",
 			'permalink_name' => 'adding-contacts',
+			'useHD' => 0,
 			'description' => "Adding contacts to your list and initiating chats with them."
 		),
 		array(
 			'blip_id' => 'AYK86zYA',
 			'title' => "Chatting",
 			'permalink_name' => 'chatting',
+			'useHD' => 0,
 			'description' => "The basic features Adium provides when chatting with another person."
 		),
 		array(
 			'blip_id' => 'AYK860cA',
 			'title' => "Outgoing Text Colors",
 			'permalink_name' => 'outgoing-text-colors',
+			'useHD' => 0,
 			'description' => "How to set your outgoing text color, and then how to set it back to no color."
 		),
 		/* This one hasn't been re-uploaded to blip.tv yet. --PRH
@@ -119,12 +124,12 @@
 <?php } ?>
 		];
 		currentEpisode = 0;
-		function changeEpisode(episodeNumber, episodeID, episodeName) {
+		function changeEpisode(episodeNumber, episodeID, episodeName, useHD) {
 			document.title = "Adium - Videos - " + episodeName;
 		
 			// Embed won't let us change the "src" on its own.
 			// So we just modify the div containing it.
-			document.getElementById("video").innerHTML = '<iframe src="http://blip.tv/play/' + episodeID + '.html?p=1" width="480" height="376" frameborder="0" allowfullscreen></iframe><embed type="application/x-shockwave-flash" src="http://a.blip.tv/api.swf#' + episodeID + '" style="display:none"></embed>';
+			document.getElementById("video").innerHTML = '<iframe src="http://blip.tv/play/' + episodeID + '.html?p=1" width="480" height="' + (useHD ? '300' : '376') + " frameborder="0" allowfullscreen></iframe><embed type="application/x-shockwave-flash" src="http://a.blip.tv/api.swf#' + episodeID + '" style="display:none"></embed>';
 
 			// Style current info.
  			document.getElementById("episode" + episodeNumber).style.background = "#FFE5E5";
@@ -173,9 +178,9 @@
 					foreach ($episodes as $episode) {
 						$which = !$which; // SMARTY
 						printf('<tr id="episode%d" class="episode episode%d">', $count, $which);
-						printf('<td class="episodeImgae"><a href="/screencasts/%s" onclick="changeEpisode(%d, \'%s\', \'%s\'); return false;"><img src="previews/episode%d.png" alt="Preview of Episode %s" style="border: 0;" /></a></td>', $episode['permalink_name'], $count, $episode['blip_id'], $episode['title'], $count, $episode['title']);
+						printf('<td class="episodeImgae"><a href="/screencasts/%s" onclick="changeEpisode(%d, \'%s\', \'%s\', %d); return false;"><img src="previews/episode%d.png" alt="Preview of Episode %s" style="border: 0;" /></a></td>', $episode['permalink_name'], $count, $episode['blip_id'], $episode['title'], $episode['useHD'], $count, $episode['title']);
 						printf('<td>');
-						printf('<a href="/screencasts/%s" onclick="javascript:changeEpisode(%d, \'%s\', \'%s\'); return false;">Episode %d: %s</a>', $episode['permalink_name'], $count, $episode['blip_id'], $episode['title'], $count++, $episode['title']);
+						printf('<a href="/screencasts/%s" onclick="javascript:changeEpisode(%d, \'%s\', \'%s\', %d); return false;">Episode %d: %s</a>', $episode['permalink_name'], $count, $episode['blip_id'], $episode['title'], $episode['useHD'], $count++, $episode['title']);
 						printf('<p>%s</p>', $episode['description']);
 						printf('</td>');
 						printf('</tr>');
@@ -186,7 +191,7 @@
 					</div>
 					<?php if ($video_ID !== null) { ?>
 					<script type="text/javascript" charset="utf-8">
-						changeEpisode(<?=$video_ID?>, '<?=$episodes[$video_ID]['blip_id']?>', '<?=$episodes[$video_ID]['title']?>');
+						changeEpisode(<?=$video_ID?>, '<?=$episodes[$video_ID]['blip_id']?>', '<?=$episodes[$video_ID]['title']?>', <?=$episodes[$video_ID]['useHD']?>);
 					</script>
 					<?php } ?>
 				</div>



More information about the commits mailing list