CC-4725: Have a "share" button on the popup player

-done
This commit is contained in:
denise 2013-01-03 13:13:27 -05:00
parent 91caec8a75
commit 59f3826055
2 changed files with 62 additions and 13 deletions

View file

@ -1,5 +1,6 @@
<div id="content" class="jp-container">
<h1><? echo _("Live stream") ?></h1>
<h1><? echo _("Live stream") ?></h1>
<a id="popup-link" href="#">Share</a>
<?php $ids = Application_Model_StreamSetting::getEnabledStreamIds(); ?>
<script>
function setjPlayer(url, type, serverType){
@ -31,21 +32,34 @@ $(document).ready(function(){
setjPlayer(elem.attr("data-url"), elem.attr("data-type"), elem.attr("server-type"));
});
<?php
if (count($ids) > 0){
$id = $ids[0];
$streamData = Application_Model_StreamSetting::getStreamData($id);
$url = "http://".$streamData["${id}_host"].":".$streamData["${id}_port"]."/".$streamData["${id}_mount"];
$type = $streamData["${id}_type"];
$serverType = $streamData["${id}_output"];
if ($type == "ogg")
$type = "oga";
echo "setjPlayer('$url', '$type', '$serverType');";
}
?>
<?php
if (count($ids) > 0){
$id = $ids[0];
$streamData = Application_Model_StreamSetting::getStreamData($id);
$url = "http://".$streamData["${id}_host"].":".$streamData["${id}_port"]."/".$streamData["${id}_mount"];
$type = $streamData["${id}_type"];
$serverType = $streamData["${id}_output"];
if ($type == "ogg")
$type = "oga";
echo "setjPlayer('$url', '$type', '$serverType');";
}
?>
$("#popup-link").click(function() {
$("#popup-share").show("slow");
$("#popup-share-link").val($("#combo-box option:selected").attr("data-url"));
});
$("#popup-close").click(function() {
$("#popup-share").hide("slow");
});
});
</script>
<div class="jp-logo"><img id="logo-img" onload='resizeToMaxHeight(this, 40);' src="<?php echo $this->logo ?>" /></div>
<div id="popup-share">
<a class="close-round" href="#" id="popup-close"></a>
<input id="popup-share-link" type="text" readonly="readonly"/>
</div>
<div class="jp-stream">
<div class="jp-stream-text"><? echo _("Select stream:"); ?></div>