mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-10 09:39:58 +00:00
Add stubbed cast.framework API implementation
This commit is contained in:
22
ext/src/shim/framework/classes/ApplicationMetadata.ts
Normal file
22
ext/src/shim/framework/classes/ApplicationMetadata.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
"use strict";
|
||||
|
||||
import Image from "../../cast/classes/Image";
|
||||
import Session from "../../cast/classes/Session";
|
||||
|
||||
|
||||
export default class ApplicationMetadata {
|
||||
public applicationId: string;
|
||||
public images: Image[];
|
||||
public name: string;
|
||||
public namespaces: string[];
|
||||
|
||||
constructor (sessionObj: Session) {
|
||||
this.applicationId = sessionObj.appId;
|
||||
this.images = sessionObj.appImages;
|
||||
this.name = sessionObj.displayName;
|
||||
|
||||
// Convert [{ name: <ns> }, ...] to [ <ns>, ... ]
|
||||
this.namespaces = sessionObj.namespaces.map(
|
||||
namespaceObj => namespaceObj.name);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user