@clockworkdog/cogs-client 1.4.0 → 1.4.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.
- package/dist/RtspStreamer.d.ts +2 -2
- package/dist/RtspStreamer.js +3 -8
- package/dist/browser/index.js +42 -4249
- package/package.json +2 -3
package/dist/RtspStreamer.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Html5VideoPipeline } from '@clockworkdog/media-stream-library-browser';
|
|
2
2
|
/**
|
|
3
3
|
* Manages a websocket connection to the COGS TCP relay which can be used to send RTSP video
|
|
4
4
|
* feeds to the web.
|
|
@@ -17,5 +17,5 @@ export default class RtspStreamer {
|
|
|
17
17
|
play(params: {
|
|
18
18
|
uri: string;
|
|
19
19
|
videoElement: HTMLVideoElement;
|
|
20
|
-
}):
|
|
20
|
+
}): Html5VideoPipeline;
|
|
21
21
|
}
|
package/dist/RtspStreamer.js
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
// We also then need to import the same class as a type so we can return the correct Typescript types.
|
|
5
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
6
|
-
/// @ts-ignore
|
|
7
|
-
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
8
|
-
const { Html5VideoPipeline, isRtcpBye } = require('media-stream-library/dist/browser-cjs.js');
|
|
3
|
+
const media_stream_library_browser_1 = require("@clockworkdog/media-stream-library-browser");
|
|
9
4
|
const urls_1 = require("./helpers/urls");
|
|
10
5
|
/**
|
|
11
6
|
* Manages a websocket connection to the COGS TCP relay which can be used to send RTSP video
|
|
@@ -21,14 +16,14 @@ class RtspStreamer {
|
|
|
21
16
|
*/
|
|
22
17
|
play(params) {
|
|
23
18
|
const { uri, videoElement } = params;
|
|
24
|
-
const pipeline = new Html5VideoPipeline({
|
|
19
|
+
const pipeline = new media_stream_library_browser_1.Html5VideoPipeline({
|
|
25
20
|
ws: { uri: this._websocketUri },
|
|
26
21
|
rtsp: { uri: uri },
|
|
27
22
|
mediaElement: videoElement,
|
|
28
23
|
});
|
|
29
24
|
// Restart stream on RTCP BYE (stream ended)
|
|
30
25
|
pipeline.rtsp.onRtcp = (rtcp) => {
|
|
31
|
-
if (isRtcpBye(rtcp)) {
|
|
26
|
+
if (media_stream_library_browser_1.isRtcpBye(rtcp)) {
|
|
32
27
|
setTimeout(() => this.play(params), 0);
|
|
33
28
|
}
|
|
34
29
|
};
|