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:
useWorkerWether or not to use Web WorkerwebglWebGL mode that should be useddebuggerWhether or not the debugger should runwidthWidth of the player, should match expected streamheightHeight 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:
streamLinkLink to the stream websocketreconnectTimeoutTimeout 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);