-
Notifications
You must be signed in to change notification settings - Fork 0
Playing the Stream
bapquad edited this page Feb 20, 2022
·
2 revisions
[Home] > Playing the Stream
This guide we will play the streaming.
First, you need to create the viewer in order to view the streaming. We should use the HTML tag with id is "main".
let stream = $.create("img#main");
Next, we start the streaming with the DOM element which we created above.
We should use the StartStream
method in the media5
package.
media5.StartStream(stream, "http://192.168.1.31:1080/mjpeg", 320, 280);
And now, full source look like as following.
import {element5 as $, media5} from '@bapquad/element5'
$.GetBody().css({
"margin": 0,
"padding": 0
});
let stream = $.create("img#main");
media5.StartStream(stream, "http://192.168.1.31:1080/mjpeg", 320, 240);
$("#wrapper").add(stream);
Bapquad Games since 2015
- Get Started
- Working with DOM
- Constructing the StyleSheet
- Working with Sprite
- Working with Timeline
- Working with Scroller
- Working with Camera
- Working with Microphone
- Making the Ajax Request
- Opening a Websocket
- Working with Storage
- Checking User Agent
- Working with GPS
- Working with Router
- Playing the Stream