PlayQueueUtils.jsm File Reference

Javascript utilities for the play queue. More...

Go to the source code of this file.

Functions

Cu import ("resource://app/jsmodules/sbLibraryUtils.jsm")
 

Variables

 EXPORTED_SYMBOLS = [ "PlayQueueUtils" ]
 
const Cc = Components.classes
 
const Ci = Components.interfaces
 
const Cu = Components.utils
 
var PlayQueueUtils
 

Detailed Description

Javascript utilities for the play queue.

Definition in file PlayQueueUtils.jsm.

Function Documentation

Cu import ( "resource://app/jsmodules/sbLibraryUtils.jsm"  )

Variable Documentation

const Cc = Components.classes

Definition at line 32 of file PlayQueueUtils.jsm.

Definition at line 33 of file PlayQueueUtils.jsm.

const Cu = Components.utils

Definition at line 34 of file PlayQueueUtils.jsm.

EXPORTED_SYMBOLS = [ "PlayQueueUtils" ]

Definition at line 30 of file PlayQueueUtils.jsm.

var PlayQueueUtils
Initial value:
= {
openPlayQueue: function PlayQueueUtils_openPlayQueue() {
var paneMgr = Cc["@songbirdnest.com/Songbird/DisplayPane/Manager;1"]
.getService(Ci.sbIDisplayPaneManager);
var contentInfo = Cc["@songbirdnest.com/Songbird/playqueue/contentInfo;1"]
.createInstance(Ci.sbIDisplayPaneContentInfo);
paneMgr.showPane(contentInfo.contentUrl);
},
play: function PlayQueueUtils_play(aIndex ) {
if (typeof(aIndex) == "undefined")
{
var playQueueService = Cc["@songbirdnest.com/Songbird/playqueue/service;1"]
.getService(Ci.sbIPlayQueueService);
aIndex = playQueueService.index;
}
var sequencer = Cc["@songbirdnest.com/Songbird/Mediacore/Manager;1"]
.getService(Ci.sbIMediacoreManager).sequencer;
sequencer.playView(PlayQueueUtils.view, aIndex, true);
}
}
XPCOMUtils.defineLazyGetter(PlayQueueUtils, "view", function() {
var playQueueService = Cc["@songbirdnest.com/Songbird/playqueue/service;1"]
.getService(Ci.sbIPlayQueueService);
return LibraryUtils.createStandardMediaListView(playQueueService.mediaList);
})
const Ci
var paneMgr
Javascript wrappers for common library tasks.
const Cc
var PlayQueueUtils

Definition at line 39 of file PlayQueueUtils.jsm.