30 const Cc = Components.classes;
31 const Ci = Components.interfaces;
32 const Cr = Components.results;
36 const SONGBIRD_PLAYLISTREADERLISTENER_IID = Components.interfaces.sbIPlaylistReaderListener;
49 addDistinctOnly:
false,
50 playWhenLoaded:
false,
51 mediaMimetypesOnly:
false,
55 onLocationChange:
function(aWebProgress, aRequest, aLocation)
59 onProgressChange:
function(aWebProgress, aRequest, curSelfProgress, maxSelfProgress, curTotalProgress, maxTotalProgress)
63 onSecurityChange:
function(aWebProgress, aRequest, aStateFlags)
67 onStateChange:
function(aWebProgress, aRequest, aStateFlags, aStatus)
69 if (aStateFlags & 16 )
72 this.state =
"STATE_STOP";
74 var playlistReaderMngr =
Cc[
"@songbirdnest.com/Songbird/PlaylistReaderManager;1"]
75 .getService(
Ci.sbIPlaylistReaderManager);
76 var mm =
Cc[
"@songbirdnest.com/Songbird/Mediacore/Manager;1"]
77 .getService(
Ci.sbIMediacoreManager);
79 var strContentType =
"";
80 var aChannel = aRequest.QueryInterface(Components.interfaces.nsIChannel);
85 strContentType = aChannel.contentType;
88 Components.utils.reportError(err);
91 playlistReaderMngr.originalURI = this.originalURI;
93 playlistReaderMngr.loadPlaylist(this.destinationURI,
94 this.mediaList, strContentType,
97 if (this.playWhenLoaded)
99 var view = this.mediaList.createView();
100 mm.sequencer.playView(view, 0);
104 this.
observer.observe(this.mediaList,
"success",
"");
110 this.
observer.observe(
null,
"error: could not create playlist",
"");
111 Components.utils.reportError(e);
115 playlistReaderMngr.originalURI =
null;
120 onStatusChange:
function(aWebProgress, aRequest, aStateFlags, strStateMessage)
126 if (!aIID.equals(Components.interfaces.sbIPlaylistReaderListener) &&
127 !aIID.equals(Components.interfaces.nsIWebProgressListener) &&
128 !aIID.equals(Components.interfaces.nsISupportsWeakReference) &&
129 !aIID.equals(Components.interfaces.nsISupports))
131 throw Components.results.NS_ERROR_NO_INTERFACE;
144 registerSelf:
function(compMgr, fileSpec, location, type)
146 compMgr = compMgr.QueryInterface(Components.interfaces.nsIComponentRegistrar);
158 throw Components.results.NS_ERROR_NO_INTERFACE;
160 if (!iid.equals(Components.interfaces.nsIFactory))
161 throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
166 canUnload:
function(compMgr)
181 throw Components.results.NS_ERROR_NO_AGGREGATION;
183 if (!iid.equals(SONGBIRD_PLAYLISTREADERLISTENER_IID) &&
184 !iid.equals(Components.interfaces.nsIWebProgressListener) &&
185 !iid.equals(Components.interfaces.nsISupportsWeakReference) &&
186 !iid.equals(Components.interfaces.nsISupports))
187 throw Components.results.NS_ERROR_INVALID_ARG;
function NSGetModule(comMgr, fileSpec)
function CPlaylistReaderListener()
SafebrowsingApplicationMod prototype registerSelf
sbOSDControlService prototype QueryInterface
SafebrowsingApplicationMod prototype getClassObject
var sbPlaylistReaderListenerModule
const SONGBIRD_PLAYLISTREADERLISTENER_CONTRACTID
const SONGBIRD_PLAYLISTREADERLISTENER_CID
ContinuingWebProgressListener prototype onStateChange
const SONGBIRD_PLAYLISTREADERLISTENER_CLASSNAME