-
Notifications
You must be signed in to change notification settings - Fork 598
/
test.js
32 lines (29 loc) · 947 Bytes
/
test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import {LogLevel, getTagged, setDefaultLogLevel} from './node_modules/bp_logger/logger';
import * as streamedian from './src/player.js';
import WebsocketTransport from './src/transport/websocket.js';
import RTSPClient from './src/client/rtsp/client.js';
import HLSClient from './src/client/hls/client.js';
import {isSafari} from "./src/core/util/browser.js";
setDefaultLogLevel(LogLevel.Debug);
getTagged("transport:ws").setLevel(LogLevel.Error);
getTagged("client:rtsp").setLevel(LogLevel.Error);
let wsTransport = {
constructor: WebsocketTransport,
options: {
socket: "wss://specforge.com/ws/"
}
};
let p = new streamedian.WSPlayer('test_video', {
// url: `${STREAM_UNIX}${STREAM_URL}`,
// type: wsp.StreamType.HLS,
modules: [
{
client: RTSPClient,
transport: wsTransport
},
{
client: HLSClient,
transport: wsTransport
}
]
});