Skip to content

Instantly share code, notes, and snippets.

@sbrisko
Created December 21, 2012 04:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sbrisko/4350623 to your computer and use it in GitHub Desktop.
Save sbrisko/4350623 to your computer and use it in GitHub Desktop.
manage output info
function ManageOutputInformation(event) {
// this was only being called on stream change, now being triggered on any output change
var selection = $(this).val();
var parent = $(this).parents('.live_output_settings');
var id = selection.replace(/.*_(\d+)$/, "$1");
// STREAM
var stream_controllers = ['channels', 'channel_profiles', 'stream_jobs', 'stream_job_profiles'];
if (stream_controllers.indexOf(page.controller) >= 0) {
ToggleOutputDependencies(parent,selection);
SetOutputDestructionStatus(selection,parent);
}
else {
// LIVE
// get the output object associated with the output and check to see if it current has a preset id
var output_object = GlobalOutputGroupsManager.find_output_by_id(parent.attr('id'));
if(!_.isNull(output_object.get_preset_id())){
if($(this).data('changeable') !== true){
$(document).trigger('output_settings_change',[output_object]);
}
}
// only call these if the input was from the stream selector of the output
if($(this).hasClass('content_source_select')) {
SetOutputStreamData(id,parent);
// SetOutputDestructionStatus(selection,parent);
ToggleStreamDependencies(id);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment