Minor cast.framework changes

This commit is contained in:
hensm
2019-03-19 18:35:25 +00:00
parent 270d661de0
commit 894738889a
3 changed files with 17 additions and 10 deletions

View File

@@ -25,7 +25,7 @@ type EventHandler = (eventData:
type MessageListener = (namespace: string, message: string) => void;
export default class RemotePlayer {
export default class CastSession {
constructor (sessionObj: Session, state: string) {
console.info("STUB :: CastSession#constructor");
}

View File

@@ -44,16 +44,22 @@ export default {
, RemotePlayer, RemotePlayerChangedEvent, RemotePlayerController
, SessionStateEventData, VolumeEventData
, CastContext: Object.assign(CastContext, {
getInstance () {
/**
* CastContext class with an extra getInstance method used to
* instantiate and fetch a singleton instance.
*/
, CastContext: {
...CastContext
, getInstance () {
if (castContext) {
return castContext;
return castContext
}
castContext = new CastContext();
return castContext;
}
})
}
, VERSION: "1.0.07"