-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jsmpeg.player.pause() not working properly #398
Comments
It's also debatable how theses should work. Sure But what does So, if you just want to en-/deable the video stream, the best solution right now would be to I'll look into supporting |
Ah, nice. Thanks for the reply! |
Hi, I am currently using this library for displaying the rtsp stream that is sent by node.js server with node-rtsp-stream.
What I want to do is keep displaying the video stream on the canvas by using jsmpeg player, and pause/restart when the user press the button.
Since this library contains the pause(), stop(), and start() methods, I was trying to use those methods for implementing the functionalities.
However, for some reason pause() and stop() method never works on my code..
`var client;
var canvas;
var rtsp_player;
function init_rtsp_video_canvas() {
client = new WebSocket('ws://localhost:9999');
canvas = document.querySelector('canvas');
rtsp_player = new jsmpeg(client, {canvas: canvas, loop: true, autoplay: true});
}
function pause_rtsp_client() {
rtsp_player.pause();
}
function play_rtsp_client() {
rtsp_player.play();
}
`
Am I missing something or doing some stupid mistake?
The text was updated successfully, but these errors were encountered: