Created
February 9, 2013 00:15
-
-
Save raytiley/4743119 to your computer and use it in GitHub Desktop.
Shows how to output an embeded limelight player from mediaID provided in CablecastAPI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head><title>CreaTV Limelight Player Example</title></head> | |
<body> | |
<h1>Limelight Player From Cablecast API</h1> | |
<p> | |
<?php | |
//Setup Script | |
$server = "173.11.100.21"; //cablecast server address | |
$showID = isset($_GET['ShowID']) ? $_GET['ShowID'] : 15859; | |
$client = new SoapClient("http://$server/CablecastWS/CablecastWS.asmx?WSDL"); | |
// Get the Show Information from Cablecast | |
$result = $client->GetShowInformation( array('ShowID' => $showID)); | |
// If the Custom Field is present, we have a mediaID | |
if(isset($result->GetShowInformationResult->CustomFields->CustomField[1])) { | |
echo "<h2>" . $result->GetShowInformationResult->Title . "</h2>"; | |
//We have a mediaID so print out a player. | |
$mediaID = $result->GetShowInformationResult->CustomFields->CustomField[1]->Value; | |
echo "<span class=\"LimelightEmbeddedPlayer\"><script src=\"http://assets.delvenetworks.com/player/embed.js\"></script><object type=\"application/x-shockwave-flash\" id=\"limelight_player_877239\" name=\"limelight_player_877239\" class=\"LimelightEmbeddedPlayerFlash\" width=\"480\" height=\"321\" data=\"http://assets.delvenetworks.com/player/loader.swf\"><param name=\"movie\" value=\"http://assets.delvenetworks.com/player/loader.swf\"/><param name=\"wmode\" value=\"window\"/><param name=\"allowScriptAccess\" value=\"always\"/><param name=\"allowFullScreen\" value=\"true\"/><param name=\"flashVars\" value=\"playerForm=Player&mediaId=$mediaID\"/></object><script>LimelightPlayerUtil.initEmbed('limelight_player_877239');</script></span>"; | |
} else { | |
echo "This show is not available for on demand viewing."; | |
} | |
?> | |
</p> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment