camstreamerlib 4.0.32-894be2d → 4.0.32-d499827

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.
@@ -0,0 +1,43 @@
1
+ # Examples
2
+
3
+ Standalone browser examples that use CamStreamerLib directly from a `<script type="module">`,
4
+ without a bundler or a framework.
5
+
6
+ ## Build the browser bundle
7
+
8
+ ```bash
9
+ npm install
10
+ npm run build:browser
11
+ ```
12
+
13
+ ## Run
14
+
15
+ Modules can't be loaded over `file://`, so serve the folder over HTTP:
16
+
17
+ ```bash
18
+ npx serve examples
19
+ ```
20
+
21
+ Both pages connect to a camera through the Device Connect proxy. Fill in the device host
22
+ (`<MAC_ADDRESS>.device-connect.net`) and the device access token in the form, or hardcode them in the
23
+ `DEVICE_HOST` / `DEVICE_ACCESS_TOKEN` constants at the top of the page's script to have the form
24
+ prefilled. See [doc/Client.md](../doc/Client.md).
25
+
26
+ ## camswitcher-events.html
27
+
28
+ Logs every CamSwitcher event. `DeviceConnectClient` (HTTP) backs `CamSwitcherAPI` to obtain the
29
+ websocket authorization token; `DeviceConnectWsClient` (websocket) backs `CamSwitcherEvents`, which
30
+ validates and dispatches the events. Connection state is taken from the `authorization` event.
31
+
32
+ See [doc/ws/CamSwitcherEvents.md](../doc/ws/CamSwitcherEvents.md).
33
+
34
+ ## planetracker-events.html
35
+
36
+ Logs every PlaneTracker event. PlaneTracker needs no authorization token — `PlaneTrackerEvents`
37
+ announces the connecting user (`userId` / `userName` / `userPriority`, editable in the form) as the
38
+ init message instead, so only the websocket client is needed.
39
+
40
+ `CAMERA_POSITION` and `FLIGHT_LIST` arrive continuously, so by default they only update the summary
41
+ line above the log; tick the checkbox to log them as well.
42
+
43
+ See [doc/ws/PlaneTrackerEvents.md](../doc/ws/PlaneTrackerEvents.md).