Merge branch 'saas-dev' of github.com:sourcefabric/airtime into saas-dev
This commit is contained in:
commit
59ad4fd7f5
14 changed files with 93 additions and 12 deletions
|
@ -110,7 +110,7 @@ $pages = array(
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'label' => "<i class='icon-briefcase icon-white'></i>"._('Billing'),
|
'label' => (Application_Model_Preference::GetPlanLevel()=="trial") ? "<i class='icon-star icon-orange'></i><span style='color: #ff5d1a'>"._('Upgrade')."</span>" : "<i class='icon-briefcase icon-white'></i>"._('Billing'),
|
||||||
'controller' => 'billing',
|
'controller' => 'billing',
|
||||||
'action' => 'upgrade',
|
'action' => 'upgrade',
|
||||||
'resource' => 'billing',
|
'resource' => 'billing',
|
||||||
|
|
|
@ -24,7 +24,8 @@ class ApiController extends Zend_Controller_Action
|
||||||
"show-tracks",
|
"show-tracks",
|
||||||
"show-schedules",
|
"show-schedules",
|
||||||
"station-logo",
|
"station-logo",
|
||||||
"show-logo"
|
"show-logo",
|
||||||
|
"stream-m3u"
|
||||||
);
|
);
|
||||||
|
|
||||||
if (Zend_Session::isStarted()) {
|
if (Zend_Session::isStarted()) {
|
||||||
|
@ -1501,5 +1502,23 @@ class ApiController extends Zend_Controller_Action
|
||||||
$hint = Application_Common_UsabilityHints::getUsabilityHint($userPath);
|
$hint = Application_Common_UsabilityHints::getUsabilityHint($userPath);
|
||||||
$this->_helper->json->sendJson($hint);
|
$this->_helper->json->sendJson($hint);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function streamM3uAction()
|
||||||
|
{
|
||||||
|
$this->view->layout()->disableLayout();
|
||||||
|
$this->_helper->viewRenderer->setNoRender(true);
|
||||||
|
|
||||||
|
header('Content-Type: application/x-mpegurl');
|
||||||
|
header('Content-Disposition: attachment; filename=stream.m3u');
|
||||||
|
$m3uFile = "#EXTM3U\r\n\r\n"; //Windows linebreaks eh
|
||||||
|
|
||||||
|
$stationName = Application_Model_Preference::GetStationName();
|
||||||
|
$streamData = Application_Model_StreamSetting::getEnabledStreamData();
|
||||||
|
|
||||||
|
foreach ($streamData as $stream) {
|
||||||
|
$m3uFile .= "#EXTINF,".$stationName." - " . strtoupper($stream['codec']) . "\r\n";
|
||||||
|
$m3uFile .= $stream['url'] . "\r\n\r\n";
|
||||||
|
}
|
||||||
|
echo $m3uFile;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,7 @@ class EmbedController extends Zend_Controller_Action
|
||||||
$this->view->muses_swf = Application_Common_HTTPHelper::getStationUrl() . "js/airtime/player/muses.swf";
|
$this->view->muses_swf = Application_Common_HTTPHelper::getStationUrl() . "js/airtime/player/muses.swf";
|
||||||
$this->view->metadata_api_url = Application_Common_HTTPHelper::getStationUrl() . "api/live-info";
|
$this->view->metadata_api_url = Application_Common_HTTPHelper::getStationUrl() . "api/live-info";
|
||||||
$this->view->player_title = json_encode($this->view->escape($request->getParam('title')));
|
$this->view->player_title = json_encode($this->view->escape($request->getParam('title')));
|
||||||
|
$this->view->jquery_i18n = Application_Common_HTTPHelper::getStationUrl() . "js/i18n/jquery.i18n.js?";
|
||||||
|
|
||||||
$styleParam = $request->getParam('style');
|
$styleParam = $request->getParam('style');
|
||||||
$player_style = isset($styleParam) ? $styleParam : "basic";
|
$player_style = isset($styleParam) ? $styleParam : "basic";
|
||||||
|
|
|
@ -370,6 +370,9 @@ class LibraryController extends Zend_Controller_Action
|
||||||
|
|
||||||
if ($form->isValid($serialized)) {
|
if ($form->isValid($serialized)) {
|
||||||
$file->setDbColMetadata($serialized);
|
$file->setDbColMetadata($serialized);
|
||||||
|
$this->view->status = true;
|
||||||
|
} else {
|
||||||
|
$this->view->status = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -424,7 +424,12 @@ class LocaleController extends Zend_Controller_Action
|
||||||
": activate to sort column ascending",
|
": activate to sort column ascending",
|
||||||
": activate to sort column descending",
|
": activate to sort column descending",
|
||||||
//End of datatables
|
//End of datatables
|
||||||
"Welcome to the new Airtime Pro!" => _("Welcome to the new Airtime Pro!")
|
"Welcome to the new Airtime Pro!" => _("Welcome to the new Airtime Pro!"),
|
||||||
|
//embed player
|
||||||
|
"On Air" => _("On Air"),
|
||||||
|
"Off Air" => _("Off Air"),
|
||||||
|
"Offline" => _("Offline"),
|
||||||
|
"Nothing scheduled" => _("Nothing scheduled")
|
||||||
);
|
);
|
||||||
$this->view->layout()->disableLayout();
|
$this->view->layout()->disableLayout();
|
||||||
$this->_helper->viewRenderer->setNoRender(true);
|
$this->_helper->viewRenderer->setNoRender(true);
|
||||||
|
|
|
@ -169,6 +169,26 @@ class Application_Form_EditAudioMD extends Zend_Form
|
||||||
));
|
));
|
||||||
$this->addElement($language);
|
$this->addElement($language);
|
||||||
|
|
||||||
|
$validCuePattern = '/^(?:[0-9]{1,2}:)?(?:[0-9]{1,2}:)?[0-9]{1,6}(\.\d{1,6})?$/';
|
||||||
|
|
||||||
|
$cueIn = new Zend_Form_Element_Text('cuein');
|
||||||
|
$cueIn->class = 'input_text';
|
||||||
|
$cueIn->setLabel("Cue In:");
|
||||||
|
$cueInValidator = Application_Form_Helper_ValidationTypes::overrideRegexValidator(
|
||||||
|
$validCuePattern, _(sprintf("Specify cue in time in the format %s", "(hh:mm:)ss(.dddddd)"))
|
||||||
|
);
|
||||||
|
$cueIn->setValidators(array($cueInValidator));
|
||||||
|
$this->addElement($cueIn);
|
||||||
|
|
||||||
|
$cueOut = new Zend_Form_Element_Text('cueout');
|
||||||
|
$cueOut->class = 'input_text';
|
||||||
|
$cueOut->setLabel('Cue Out:');
|
||||||
|
$cueOutValidator = Application_Form_Helper_ValidationTypes::overrideRegexValidator(
|
||||||
|
$validCuePattern, _(sprintf("Specify cue out time in the format %s", "(hh:mm:)ss(.dddddd)"))
|
||||||
|
);
|
||||||
|
$cueOut->setValidators(array($cueOutValidator));
|
||||||
|
$this->addElement($cueOut);
|
||||||
|
|
||||||
// Add the submit button
|
// Add the submit button
|
||||||
$this->addElement('button', 'editmdsave', array(
|
$this->addElement('button', 'editmdsave', array(
|
||||||
'ignore' => true,
|
'ignore' => true,
|
||||||
|
|
|
@ -5,8 +5,12 @@
|
||||||
<link rel="stylesheet" href="<?php echo $this->css?>" type="text/css">
|
<link rel="stylesheet" href="<?php echo $this->css?>" type="text/css">
|
||||||
<script src="<?php echo $this->mrp_js?>" type="text/javascript"></script>
|
<script src="<?php echo $this->mrp_js?>" type="text/javascript"></script>
|
||||||
<script src="<?php echo $this->jquery?>" type="text/javascript"></script>
|
<script src="<?php echo $this->jquery?>" type="text/javascript"></script>
|
||||||
|
|
||||||
|
<script src="<?php echo $this->jquery_i18n?>" type="text/javascript"></script>
|
||||||
|
<script src="/locale/general-translation-table" type="text/javascript"></script>
|
||||||
<link href='https://fonts.googleapis.com/css?family=Roboto:400,100,300,700' rel='stylesheet' type='text/css'>
|
<link href='https://fonts.googleapis.com/css?family=Roboto:400,100,300,700' rel='stylesheet' type='text/css'>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
$.i18n.setDictionary(general_dict);
|
||||||
|
|
||||||
var RETRY_DELAY_MSECS = 2000; //Delay before trying to reconnect to stream after an error.
|
var RETRY_DELAY_MSECS = 2000; //Delay before trying to reconnect to stream after an error.
|
||||||
var MAX_MOBILE_SCREEN_WIDTH = 760;
|
var MAX_MOBILE_SCREEN_WIDTH = 760;
|
||||||
|
@ -280,9 +284,9 @@
|
||||||
if (data.current === null) {
|
if (data.current === null) {
|
||||||
if (data.currentShow != null && data.currentShow.length > 0) {
|
if (data.currentShow != null && data.currentShow.length > 0) {
|
||||||
//Master/show source have no current track but they do have a current show.
|
//Master/show source have no current track but they do have a current show.
|
||||||
$("p.now_playing").html("On Air:" + "<span>" + data.currentShow[0].name + "</span>");
|
$("p.now_playing").html($.i18n._("On Air") + "<span>" + data.currentShow[0].name + "</span>");
|
||||||
} else {
|
} else {
|
||||||
$("p.now_playing").html("Off Air" + "<span>Offline</span>");
|
$("p.now_playing").html($.i18n._("Off Air") + "<span>"+ $.i18n._("Offline") + "</span>");
|
||||||
}
|
}
|
||||||
time_to_next_track_starts = 20000;
|
time_to_next_track_starts = 20000;
|
||||||
} else {
|
} else {
|
||||||
|
@ -311,7 +315,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data.next === null) {
|
if (data.next === null) {
|
||||||
$("ul.schedule_list").find("li").html("Nothing scheduled");
|
$("ul.schedule_list").find("li").html($.i18n._("Nothing scheduled"));
|
||||||
} else {
|
} else {
|
||||||
$("ul.schedule_list").find("li").html(data.next.name);
|
$("ul.schedule_list").find("li").html(data.next.name);
|
||||||
}
|
}
|
||||||
|
@ -364,7 +368,7 @@
|
||||||
<div style="clear:both"></div>
|
<div style="clear:both"></div>
|
||||||
|
|
||||||
<div class="airtime_schedule">
|
<div class="airtime_schedule">
|
||||||
<p class="airtime_next">Next</p>
|
<p class="airtime_next"><?php echo _("Next") ?></p>
|
||||||
<ul class="schedule_list">
|
<ul class="schedule_list">
|
||||||
<li></li>
|
<li></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="player_instructions">
|
<div id="player_instructions">
|
||||||
Customize the player by configuring the options below. When you are done,
|
<?php echo _("Customize the player by configuring the options below. When you are done,
|
||||||
copy the embeddable code below and paste it into your website's HTML.
|
copy the embeddable code below and paste it into your website's HTML.") ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php echo $this->element->getElement('player_title')->render(); ?>
|
<?php echo $this->element->getElement('player_title')->render(); ?>
|
||||||
|
|
|
@ -415,6 +415,7 @@ textarea {
|
||||||
|
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
margin: 0 0 10px;
|
margin: 0 0 10px;
|
||||||
|
max-width: 280px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Playlist/Block/Webstream Editors */
|
/* Playlist/Block/Webstream Editors */
|
||||||
|
|
BIN
airtime_mvc/public/css/img/glyphicons-halflings-orange.png
Normal file
BIN
airtime_mvc/public/css/img/glyphicons-halflings-orange.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
|
@ -8,6 +8,15 @@
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#edit-md-dialog ul.errors {
|
||||||
|
clear: both;
|
||||||
|
float: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#edit-md-dialog dd input.input_text {
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
|
||||||
.spl_sortable,.spl_sortable>li,.side_playlist>div,#spl_editor,.spl_artist,.spl_cue_in,.spl_fade_in,.spl_cue_out,.spl_fade_out
|
.spl_sortable,.spl_sortable>li,.side_playlist>div,#spl_editor,.spl_artist,.spl_cue_in,.spl_fade_in,.spl_cue_out,.spl_fade_out
|
||||||
{
|
{
|
||||||
clear: left;
|
clear: left;
|
||||||
|
|
|
@ -3781,6 +3781,11 @@ hr {
|
||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.icon-orange {
|
||||||
|
margin-right: 4px;
|
||||||
|
background-image: url("img/glyphicons-halflings-orange.png");
|
||||||
|
}
|
||||||
|
|
||||||
.nav-ui-icon-formatter {
|
.nav-ui-icon-formatter {
|
||||||
width:16px !important;
|
width:16px !important;
|
||||||
display:inline;
|
display:inline;
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
function isAudioSupported(mime){
|
function isAudioSupported(mime){
|
||||||
var audio = new Audio();
|
var audio = new Audio();
|
||||||
|
|
||||||
|
if ((typeof mime) !== "string" || (mime === null)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
var bMime = null;
|
var bMime = null;
|
||||||
if (mime.indexOf("ogg") != -1 || mime.indexOf("vorbis") != -1) {
|
if (mime.indexOf("ogg") != -1 || mime.indexOf("vorbis") != -1) {
|
||||||
bMime = 'audio/ogg; codecs="vorbis"';
|
bMime = 'audio/ogg; codecs="vorbis"';
|
||||||
|
|
|
@ -513,15 +513,24 @@ var AIRTIME = (function(AIRTIME){
|
||||||
newTab.wrapper.find(".md-save").on("click", function() {
|
newTab.wrapper.find(".md-save").on("click", function() {
|
||||||
var file_id = newTab.wrapper.find('#file_id').val(),
|
var file_id = newTab.wrapper.find('#file_id').val(),
|
||||||
data = newTab.wrapper.find("#edit-md-dialog form").serializeArray();
|
data = newTab.wrapper.find("#edit-md-dialog form").serializeArray();
|
||||||
$.post(baseUrl+'library/edit-file-md', {format: "json", id: file_id, data: data}, function() {
|
$.post(baseUrl+'library/edit-file-md', {format: "json", id: file_id, data: data}, function(resp) {
|
||||||
|
|
||||||
|
newTab.wrapper.find("#edit-md-dialog").parent().html(resp.html);
|
||||||
|
|
||||||
// don't redraw the library table if we are on calendar page
|
// don't redraw the library table if we are on calendar page
|
||||||
// we would be on calendar if viewing recorded file metadata
|
// we would be on calendar if viewing recorded file metadata
|
||||||
if ($("#schedule_calendar").length === 0) {
|
if ($("#schedule_calendar").length === 0) {
|
||||||
oTable.fnStandingRedraw();
|
oTable.fnStandingRedraw();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (resp.status === true) {
|
||||||
|
AIRTIME.playlist.closeTab();
|
||||||
|
}
|
||||||
|
|
||||||
|
//re-initialize events since we changed the html
|
||||||
|
initFileMdEvents(newTab);
|
||||||
});
|
});
|
||||||
|
|
||||||
AIRTIME.playlist.closeTab();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
newTab.wrapper.find('#edit-md-dialog').on("keyup", function(event) {
|
newTab.wrapper.find('#edit-md-dialog').on("keyup", function(event) {
|
||||||
|
@ -529,6 +538,7 @@ var AIRTIME = (function(AIRTIME){
|
||||||
newTab.wrapper.find('.md-save').click();
|
newTab.wrapper.find('.md-save').click();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function openPlaylist(json) {
|
function openPlaylist(json) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue