Fork of Dregu/visio. WebAssembly based H.264 baseline decoder and viewer for usage in a browser or webframe. It only supports H.264 baseline and only unwrapped, raw, NAL frames.
Initializes the player, this needs to be done once after loading the page.
Example: kochvisio.initializePlayer(true, 'auto', true, 640, 480)
Params:
useWorker
Wether or not to use Web Workerwebgl
WebGL mode that should be useddebugger
Whether or not the debugger should runwidth
Width of the player, should match expected streamheight
Height of the player, should match expected stream
Start consuming a video strem from the given link.
Example: kochvisio.startStream('ws://127.0.0.1:3060/atlas/socket/test/consumer', 2000)
Params:
streamLink
Link to the stream websocketreconnectTimeout
Timeout for ws reconnect (0=off)
Stop the running video stream.
Example: kochvisio.stopStream()
Testing a stream when using on a server (e.g. node http-server
)
kochvisio.initializePlayer(true, 'auto', true, 640, 480);
kochvisio.startStream('ws://127.0.0.1:3060/socket/test/consumer', 2000);
Using in production on mobile
// Assuming we're using mobile.html, built by bin/build
// Note that NO webworker is used in this use case!
kochvisio.initializePlayer(false, 'auto', false, 640, 480);
kochvisio.startStream('ws://127.0.0.1:3060/socket/test/consumer', 2000);