From 3dbedc3a56b523d131d33acac39262d7b7743bc3 Mon Sep 17 00:00:00 2001 From: martin Date: Tue, 27 Sep 2011 15:26:40 -0400 Subject: [PATCH] CC-2724: Play Stream Icon + jPlayer popup styling -#of streams and stream bitrates now fetched from database. --- .../application/models/StreamSetting.php | 43 +++++++++++++++++-- .../scripts/dashboard/stream-player.phtml | 19 ++++---- 2 files changed, 51 insertions(+), 11 deletions(-) diff --git a/airtime_mvc/application/models/StreamSetting.php b/airtime_mvc/application/models/StreamSetting.php index 1e43b435d..eea87ba0a 100644 --- a/airtime_mvc/application/models/StreamSetting.php +++ b/airtime_mvc/application/models/StreamSetting.php @@ -1,7 +1,43 @@ getAll($sql); + $ids = array(); + + foreach ($rows as $row){ + $ids[] = substr($row["keyname"], 0, strpos($row["keyname"], "_")); + } + + //Logging::log(print_r($ids, true)); + + return $ids; + } + + /* Returns all information related to a specific stream. An example + * of a stream id is 's1' or 's2'. */ + public static function getStreamData($p_streamId){ + global $CC_DBC; + $sql = "SELECT * " + ."FROM cc_stream_setting " + ."WHERE keyname LIKE '${p_streamId}_%'"; + + $rows = $CC_DBC->getAll($sql); + $data = array(); + + foreach($rows as $row){ + $data[$row["keyname"]] = $row["value"]; + } + + return $data; } public static function getStreamSetting(){ @@ -12,6 +48,7 @@ class Application_Model_StreamSetting { $rows = $CC_DBC->getAll($sql); return $rows; } + public static function setStreamSetting($data){ global $CC_DBC; foreach($data as $key=>$d){ @@ -37,4 +74,4 @@ class Application_Model_StreamSetting { } } } -} \ No newline at end of file +} diff --git a/airtime_mvc/application/views/scripts/dashboard/stream-player.phtml b/airtime_mvc/application/views/scripts/dashboard/stream-player.phtml index 717072ddc..352ed6de8 100644 --- a/airtime_mvc/application/views/scripts/dashboard/stream-player.phtml +++ b/airtime_mvc/application/views/scripts/dashboard/stream-player.phtml @@ -15,21 +15,24 @@ $(document).ready(function(){ supplied: "oga", wmode: "window" }); + + $('.bit-rates').click(function(){console.log("click")}); });
+ + - - + + Kbit/s) +