mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-10 17:49:58 +00:00
Minor API fixes
This commit is contained in:
@@ -47,6 +47,7 @@ export default class Session {
|
|||||||
private _setReceiverVolumeLevelCallbacks: CallbacksMap = new Map();
|
private _setReceiverVolumeLevelCallbacks: CallbacksMap = new Map();
|
||||||
private _stopCallbacks: CallbacksMap = new Map();
|
private _stopCallbacks: CallbacksMap = new Map();
|
||||||
|
|
||||||
|
|
||||||
constructor (
|
constructor (
|
||||||
public sessionId: string
|
public sessionId: string
|
||||||
, public appId: string
|
, public appId: string
|
||||||
@@ -95,6 +96,7 @@ export default class Session {
|
|||||||
case "shim:/session/connected": {
|
case "shim:/session/connected": {
|
||||||
this.status = SessionStatus.CONNECTED;
|
this.status = SessionStatus.CONNECTED;
|
||||||
this.sessionId = message.data.sessionId;
|
this.sessionId = message.data.sessionId;
|
||||||
|
this.transportId = message.data.sessionId;
|
||||||
this.namespaces = message.data.namespaces;
|
this.namespaces = message.data.namespaces;
|
||||||
this.displayName = message.data.displayName;
|
this.displayName = message.data.displayName;
|
||||||
this.statusText = message.data.statusText;
|
this.statusText = message.data.statusText;
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ export default {
|
|||||||
|
|
||||||
// Already initialized
|
// Already initialized
|
||||||
if (apiConfig) {
|
if (apiConfig) {
|
||||||
errorCallback(new Error_(ErrorCode.RECEIVER_UNAVAILABLE));
|
errorCallback(new Error_(ErrorCode.INVALID_PARAMETER));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -239,8 +239,8 @@ onMessage(message => {
|
|||||||
subject: "popup:/close"
|
subject: "popup:/close"
|
||||||
});
|
});
|
||||||
|
|
||||||
apiConfig.sessionListener(session);
|
|
||||||
sessionRequestInProgress = false;
|
sessionRequestInProgress = false;
|
||||||
|
|
||||||
sessionSuccessCallback(
|
sessionSuccessCallback(
|
||||||
session
|
session
|
||||||
, message.data.selectedMedia);
|
, message.data.selectedMedia);
|
||||||
|
|||||||
Reference in New Issue
Block a user