Adding importance handling
This commit is contained in:
parent
e7b0f859a5
commit
ac7fa164b6
8 changed files with 48 additions and 11 deletions
|
@ -8,6 +8,8 @@ import type {UserSimplePeerInterface} from "./SimplePeer";
|
|||
import {get, readable, Readable, writable, Writable} from "svelte/store";
|
||||
import {obtainedMediaConstraintStore} from "../Stores/MediaStore";
|
||||
import {DivImportance} from "./LayoutManager";
|
||||
import type {ImportanceStore} from "../Stores/ImportanceStore";
|
||||
import {createImportanceStore} from "../Stores/ImportanceStore";
|
||||
|
||||
const Peer: SimplePeerNamespace.SimplePeer = require('simple-peer');
|
||||
|
||||
|
@ -28,7 +30,7 @@ export class VideoPeer extends Peer {
|
|||
private onBlockSubscribe: Subscription;
|
||||
private onUnBlockSubscribe: Subscription;
|
||||
public readonly streamStore: Readable<MediaStream | null>;
|
||||
public readonly importanceStore: Writable<DivImportance>;
|
||||
public readonly importanceStore: ImportanceStore;
|
||||
public readonly statusStore: Readable<"connecting" | "connected" | "error" | "closed">;
|
||||
public readonly constraintsStore: Readable<MediaStreamConstraints|null>;
|
||||
|
||||
|
@ -92,7 +94,7 @@ export class VideoPeer extends Peer {
|
|||
};
|
||||
});
|
||||
|
||||
this.importanceStore = writable(DivImportance.Normal);
|
||||
this.importanceStore = createImportanceStore(DivImportance.Normal);
|
||||
|
||||
this.statusStore = readable<"connecting" | "connected" | "error" | "closed">("connecting", (set) => {
|
||||
const onConnect = () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue