@tak-ps/cloudtak 13.77.1 → 13.78.1

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.
@@ -1,3 +1,5 @@
1
+ import 'video.js/dist/video-js.css';
2
+ import { type PlaybackProtocol } from './video/protocol.ts';
1
3
  export type VideoPlayerMetadata = {
2
4
  name: string;
3
5
  active: boolean;
@@ -12,9 +14,11 @@ type __VLS_Props = {
12
14
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
15
  metadata: (metadata: VideoPlayerMetadata) => any;
14
16
  error: (error: Error) => any;
17
+ protocol: (protocol: PlaybackProtocol) => any;
15
18
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
16
19
  onMetadata?: ((metadata: VideoPlayerMetadata) => any) | undefined;
17
20
  onError?: ((error: Error) => any) | undefined;
21
+ onProtocol?: ((protocol: PlaybackProtocol) => any) | undefined;
18
22
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
23
  declare const _default: typeof __VLS_export;
20
24
  export default _default;
@@ -0,0 +1,80 @@
1
+ /**
2
+ * WhepReader - WebRTC/WHEP reader for MediaMTX streams.
3
+ *
4
+ * A TypeScript port of the MediaMTX `reader.js` (MediaMTXWebRTCReader) shipped
5
+ * with the MediaMTX web player, retaining its behaviour:
6
+ * - ICE servers are discovered via an OPTIONS request (Link headers)
7
+ * - The SDP offer is edited to enable stereo Opus & non-advertised codecs
8
+ * - ICE candidates are trickled via PATCH (application/trickle-ice-sdpfrag)
9
+ * - Failures tear the session down and restart after a short pause
10
+ *
11
+ * Credentials are sent via the Authorization header (never in the URL).
12
+ */
13
+ export type WhepReaderConfig = {
14
+ /** Absolute URL of the WHEP endpoint */
15
+ url: string;
16
+ user?: string;
17
+ pass?: string;
18
+ token?: string;
19
+ /** Pause between restarts after an error (ms) */
20
+ retryPause?: number;
21
+ /** Abort a connection attempt that has not produced a track in this time (ms) */
22
+ connectTimeout?: number;
23
+ onError?: (err: string) => void;
24
+ onTrack?: (evt: RTCTrackEvent) => void;
25
+ onDataChannel?: (evt: RTCDataChannelEvent) => void;
26
+ /** Called once the peer connection reaches the connected state */
27
+ onConnected?: () => void;
28
+ };
29
+ type OfferData = {
30
+ iceUfrag: string;
31
+ icePwd: string;
32
+ medias: string[];
33
+ };
34
+ export default class WhepReader {
35
+ static DEFAULT_RETRY_PAUSE: number;
36
+ static DEFAULT_CONNECT_TIMEOUT: number;
37
+ private static nonAdvertisedCodecsProbe;
38
+ static isSupported(): boolean;
39
+ private conf;
40
+ private state;
41
+ private restartTimeout;
42
+ private connectTimeout;
43
+ private pc;
44
+ private offerData;
45
+ private sessionUrl;
46
+ private queuedCandidates;
47
+ private nonAdvertisedCodecs;
48
+ constructor(conf: WhepReaderConfig);
49
+ close(): void;
50
+ private static supportsNonAdvertisedCodec;
51
+ private static unquoteCredential;
52
+ static linkToIceServers(links: string | null): RTCIceServer[];
53
+ static parseOffer(sdp: string): OfferData;
54
+ private static reservePayloadType;
55
+ private static addCodec;
56
+ private static enableStereoPcmau;
57
+ private static enableMultichannelOpus;
58
+ private static enableL16;
59
+ private static enableStereoOpus;
60
+ static editOffer(sdp: string, nonAdvertisedCodecs: string[]): string;
61
+ static generateSdpFragment(od: OfferData, candidates: RTCIceCandidate[]): string;
62
+ private handleError;
63
+ private restart;
64
+ private static probeNonAdvertisedCodecs;
65
+ private getNonAdvertisedCodecs;
66
+ private start;
67
+ private armConnectTimeout;
68
+ private clearConnectTimeout;
69
+ private authHeader;
70
+ private requestICEServers;
71
+ private setupPeerConnection;
72
+ private sendOffer;
73
+ private setAnswer;
74
+ private onLocalCandidate;
75
+ private sendLocalCandidates;
76
+ private onConnectionState;
77
+ private onTrack;
78
+ private onDataChannel;
79
+ }
80
+ export {};
@@ -0,0 +1,26 @@
1
+ import type { VideoLeaseProtocols } from '../../../types.ts';
2
+ export type PlaybackProtocol = 'webrtc' | 'hls';
3
+ /**
4
+ * Leases proxying an existing HTTP(S) source are HLS streams being re-served
5
+ * by MediaMTX - keep HLS as their default. Everything else (RTSP/RTMP/SRT/etc)
6
+ * is served over WebRTC with HLS as the fallback.
7
+ */
8
+ export declare function isHlsSource(source?: string | null): boolean;
9
+ /**
10
+ * Ordered list of protocols to attempt for playback - the first entry is the
11
+ * default and each subsequent entry is a fallback
12
+ */
13
+ export declare function playbackOrder(protocols: VideoLeaseProtocols | undefined, source?: string | null, webrtcSupported?: boolean): PlaybackProtocol[];
14
+ /**
15
+ * Split embedded basic-auth credentials out of a stream URL so they can be
16
+ * sent via the Authorization header instead of being exposed in the URL
17
+ */
18
+ export declare function splitCredentials(input: string): {
19
+ url: string;
20
+ username: string;
21
+ password: string;
22
+ };
23
+ /**
24
+ * MediaMTX serves WHEP at `<webrtc path url>/whep`
25
+ */
26
+ export declare function whepUrl(webrtc: string): string;
@@ -1,12 +1,14 @@
1
1
  import type { Component } from 'vue';
2
- import type { VideoConnection, Attachment } from '../types.ts';
2
+ import type { VideoConnection, VideoLease, Attachment } from '../types.ts';
3
3
  export declare enum VideoStoreType {
4
4
  COT = "cot",
5
- CONNECTION = "connection"
5
+ CONNECTION = "connection",
6
+ LEASE = "lease"
6
7
  }
7
8
  export type PaneVideoConfig = {
8
9
  type: VideoStoreType;
9
- url: string;
10
+ url?: string;
11
+ lease?: number;
10
12
  };
11
13
  export type PaneAttachmentConfig = {
12
14
  attachment: Attachment;
@@ -38,5 +40,6 @@ export declare const useFloatStore: import("pinia").StoreDefinition<"float", {
38
40
  }): Pane;
39
41
  addAttachment(attachment: Attachment): void;
40
42
  addConnection(connection: VideoConnection): void;
43
+ addLease(lease: VideoLease): void;
41
44
  addCOT(uid: string): Promise<void>;
42
45
  }>;
@@ -166,6 +166,11 @@ export declare const useMapStore: import("pinia").StoreDefinition<"cloudtak", {
166
166
  * originating client's change is not echoed back to the API.
167
167
  */
168
168
  reconcileOverlays: () => Promise<void>;
169
+ /**
170
+ * Mark a mission subscription as unsubscribed when its overlay no
171
+ * longer exists, clearing the active mission if it was this one
172
+ */
173
+ unsubscribeOrphanedMission: (guid: string) => Promise<void>;
169
174
  reconcileOverlaysOnce: () => Promise<void>;
170
175
  updateIconRotation: (enabled: boolean) => void;
171
176
  updateDistanceUnit: (unit: string) => void;
@@ -17,5 +17,7 @@ export declare function addBackgroundStateListener(handler: (isBackgrounded: boo
17
17
  * suspended. Resolves immediately on web.
18
18
  */
19
19
  export declare function whenForegrounded(): Promise<void>;
20
+ export declare function addBackButtonListener(handler: () => void): Promise<() => void>;
21
+ export declare function minimizeApp(): Promise<void>;
20
22
  export declare function openExternalUrl(url: string | URL): Promise<void>;
21
23
  export declare function openSecondaryView(url: string | URL): Promise<void>;
@@ -77,8 +77,11 @@ export default class AtlasDatabase {
77
77
  * Return CoTs touching a given polygon
78
78
  *
79
79
  * @param poly - GeoJSON Polygon to test CoTs against
80
+ * @param opts.mission - If set, test features from the given Mission GUID instead of the CoT store
80
81
  */
81
- touching(poly: Polygon): Promise<Set<COT>>;
82
+ touching(poly: Polygon, opts?: {
83
+ mission?: string;
84
+ }): Promise<Set<COT>>;
82
85
  /**
83
86
  * Hydrate the in-memory store from the local Dexie feature database.
84
87
  *
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tak-ps/cloudtak",
3
3
  "type": "module",
4
- "version": "13.77.1",
4
+ "version": "13.78.1",
5
5
  "types": "dist/types/plugin.d.ts",
6
6
  "files": [
7
7
  "dist/types"
@@ -44,13 +44,13 @@
44
44
  "@capacitor/keyboard": "^8.0.3",
45
45
  "@capacitor/preferences": "^8.0.1",
46
46
  "@capacitor/status-bar": "^8.0.2",
47
- "@capawesome/capacitor-network": "0.1.3",
47
+ "@capawesome/capacitor-network": "0.1.4",
48
48
  "@capgo/background-geolocation": "^8.0.39",
49
49
  "@capgo/capacitor-compass": "^8.1.17",
50
50
  "@capgo/capacitor-updater": "^8.50.1",
51
51
  "@mapbox/tile-cover": "^3.0.2",
52
52
  "@scalar/api-reference": "^1.66.1",
53
- "@simplewebauthn/browser": "^13.3.0",
53
+ "@simplewebauthn/browser": "^14.0.0",
54
54
  "@tabler/core": "^1.4.0",
55
55
  "@tabler/icons-vue": "^3.0.0",
56
56
  "@tak-ps/node-cot": "^14.47.0",
@@ -100,6 +100,7 @@
100
100
  "terra-draw-route-snap-mode": "^0.4.1",
101
101
  "terra-route": "^0.0.18",
102
102
  "uuid": "^14.0.0",
103
+ "video.js": "^8.24.0",
103
104
  "vue": "^3.2.31",
104
105
  "vue-component-type-helpers": "^3.0.7",
105
106
  "vue-eslint-parser": "^10.4.1",