@urun-sh/core 0.1.6 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -5
- package/dist/{chunk-YOWFDYKX.mjs → chunk-ADK75OQ6.mjs} +5 -5
- package/dist/index.d.mts +23 -8
- package/dist/index.d.ts +23 -8
- package/dist/index.js +5 -5
- package/dist/index.mjs +1 -1
- package/dist/{internal-D8r8sCkX.d.mts → internal-BVUaf1Cq.d.mts} +32 -17
- package/dist/{internal-D8r8sCkX.d.ts → internal-BVUaf1Cq.d.ts} +32 -17
- package/dist/internal.d.mts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +5 -5
- package/dist/internal.mjs +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as AppOptions, A as App$1,
|
|
2
|
-
export { L as Layer, d as LayoutConfig, e as LayoutContext, S as SceneContext, f as SceneGraph,
|
|
1
|
+
import { a as AppOptions, A as App$1, h as SessionDocument, b as ChannelMultiplexer, g as Session$1, T as TransportSession, j as SessionStream$1, l as StoreOptions, k as Store } from './internal-BVUaf1Cq.mjs';
|
|
2
|
+
export { L as Layer, d as LayoutConfig, e as LayoutContext, S as SceneContext, f as SceneGraph, n as TransportState } from './internal-BVUaf1Cq.mjs';
|
|
3
3
|
|
|
4
4
|
declare function App(appId: string, options: AppOptions): App$1;
|
|
5
5
|
|
|
@@ -16,19 +16,34 @@ declare class SessionDocumentImpl implements SessionDocument {
|
|
|
16
16
|
on(event: 'change', handler: (snap: Record<string, unknown>) => void): () => void;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
declare class SessionStream implements SessionStream$1 {
|
|
20
|
+
private _name;
|
|
21
|
+
private _transport;
|
|
22
|
+
private _track;
|
|
23
|
+
private _handlers;
|
|
24
|
+
private _unsubscribeTransport;
|
|
25
|
+
constructor(_name: string, _transport: TransportSession);
|
|
26
|
+
get track(): MediaStreamTrack | null;
|
|
27
|
+
attach(track: MediaStreamTrack): Promise<void>;
|
|
28
|
+
detach(): Promise<void>;
|
|
29
|
+
seek(target: number | 'live'): Promise<void>;
|
|
30
|
+
on(event: 'track', handler: (track: MediaStreamTrack | null) => void): () => void;
|
|
31
|
+
dispose(): void;
|
|
32
|
+
private _setTrack;
|
|
33
|
+
}
|
|
34
|
+
|
|
19
35
|
declare class Session implements Session$1 {
|
|
20
36
|
private _sessionId;
|
|
21
37
|
private _multiplexer;
|
|
22
38
|
private _transport;
|
|
23
39
|
private _docs;
|
|
40
|
+
private _streams;
|
|
24
41
|
constructor(sessionId: string, multiplexer: ChannelMultiplexer, transport: TransportSession);
|
|
25
|
-
|
|
26
|
-
stream(name: string):
|
|
27
|
-
stream(name: string, track: MediaStreamTrack | null): void;
|
|
42
|
+
get id(): string;
|
|
43
|
+
stream(name: string): SessionStream;
|
|
28
44
|
|
|
29
45
|
doc(key: string): SessionDocumentImpl;
|
|
30
|
-
|
|
31
|
-
on(name: string, handler: (data: unknown) => void): () => void;
|
|
46
|
+
disconnect(): void;
|
|
32
47
|
}
|
|
33
48
|
|
|
34
49
|
declare function createStore(options: StoreOptions): Store & {
|
|
@@ -45,4 +60,4 @@ interface VideoStreamOptions {
|
|
|
45
60
|
|
|
46
61
|
declare function videoStream(source: ReadableStream<Uint8Array>, options?: VideoStreamOptions): MediaStream;
|
|
47
62
|
|
|
48
|
-
export { App, App$1 as AppInterface, AppOptions, Session, SessionDocument, Session$1 as SessionInterface, Store, StoreOptions, type VideoStreamOptions, createStore, videoStream };
|
|
63
|
+
export { App, App$1 as AppInterface, AppOptions, Session, SessionDocument, Session$1 as SessionInterface, SessionStream$1 as SessionStream, Store, StoreOptions, type VideoStreamOptions, createStore, videoStream };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as AppOptions, A as App$1,
|
|
2
|
-
export { L as Layer, d as LayoutConfig, e as LayoutContext, S as SceneContext, f as SceneGraph,
|
|
1
|
+
import { a as AppOptions, A as App$1, h as SessionDocument, b as ChannelMultiplexer, g as Session$1, T as TransportSession, j as SessionStream$1, l as StoreOptions, k as Store } from './internal-BVUaf1Cq.js';
|
|
2
|
+
export { L as Layer, d as LayoutConfig, e as LayoutContext, S as SceneContext, f as SceneGraph, n as TransportState } from './internal-BVUaf1Cq.js';
|
|
3
3
|
|
|
4
4
|
declare function App(appId: string, options: AppOptions): App$1;
|
|
5
5
|
|
|
@@ -16,19 +16,34 @@ declare class SessionDocumentImpl implements SessionDocument {
|
|
|
16
16
|
on(event: 'change', handler: (snap: Record<string, unknown>) => void): () => void;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
declare class SessionStream implements SessionStream$1 {
|
|
20
|
+
private _name;
|
|
21
|
+
private _transport;
|
|
22
|
+
private _track;
|
|
23
|
+
private _handlers;
|
|
24
|
+
private _unsubscribeTransport;
|
|
25
|
+
constructor(_name: string, _transport: TransportSession);
|
|
26
|
+
get track(): MediaStreamTrack | null;
|
|
27
|
+
attach(track: MediaStreamTrack): Promise<void>;
|
|
28
|
+
detach(): Promise<void>;
|
|
29
|
+
seek(target: number | 'live'): Promise<void>;
|
|
30
|
+
on(event: 'track', handler: (track: MediaStreamTrack | null) => void): () => void;
|
|
31
|
+
dispose(): void;
|
|
32
|
+
private _setTrack;
|
|
33
|
+
}
|
|
34
|
+
|
|
19
35
|
declare class Session implements Session$1 {
|
|
20
36
|
private _sessionId;
|
|
21
37
|
private _multiplexer;
|
|
22
38
|
private _transport;
|
|
23
39
|
private _docs;
|
|
40
|
+
private _streams;
|
|
24
41
|
constructor(sessionId: string, multiplexer: ChannelMultiplexer, transport: TransportSession);
|
|
25
|
-
|
|
26
|
-
stream(name: string):
|
|
27
|
-
stream(name: string, track: MediaStreamTrack | null): void;
|
|
42
|
+
get id(): string;
|
|
43
|
+
stream(name: string): SessionStream;
|
|
28
44
|
|
|
29
45
|
doc(key: string): SessionDocumentImpl;
|
|
30
|
-
|
|
31
|
-
on(name: string, handler: (data: unknown) => void): () => void;
|
|
46
|
+
disconnect(): void;
|
|
32
47
|
}
|
|
33
48
|
|
|
34
49
|
declare function createStore(options: StoreOptions): Store & {
|
|
@@ -45,4 +60,4 @@ interface VideoStreamOptions {
|
|
|
45
60
|
|
|
46
61
|
declare function videoStream(source: ReadableStream<Uint8Array>, options?: VideoStreamOptions): MediaStream;
|
|
47
62
|
|
|
48
|
-
export { App, App$1 as AppInterface, AppOptions, Session, SessionDocument, Session$1 as SessionInterface, Store, StoreOptions, type VideoStreamOptions, createStore, videoStream };
|
|
63
|
+
export { App, App$1 as AppInterface, AppOptions, Session, SessionDocument, Session$1 as SessionInterface, SessionStream$1 as SessionStream, Store, StoreOptions, type VideoStreamOptions, createStore, videoStream };
|