Skip to content
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

Does this work in chrome? #6

Closed
ykpark79 opened this issue Nov 21, 2018 · 5 comments
Closed

Does this work in chrome? #6

ykpark79 opened this issue Nov 21, 2018 · 5 comments

Comments

@ykpark79
Copy link

It works well with vlc player. However chrome only shows first image. Is there any way to test in the browser using img src tag?

@JPery
Copy link
Owner

JPery commented Nov 21, 2018

In fact, this project was created with the intention of stream video to a web browser using the tag. It should work fine if you write .

If you can't get it to work in chrome could you try in other web browser to see if it's going fine?

As I told in #2, you should have direct access to the stream via web browser with http://ip-address:port/

Please tell me if it's working fine.

@ykpark79
Copy link
Author

Thank you @JPery .
I tried Firefox it works.

I made test html page as below.

<html>
<head>
<title>My Web Page</title>
</head>
<body>
<img src="http://localhost:7777">
</body>
</html>

When I opened up this page with Chrome, my MJPEG server accepts two clients.
(Note that VLC was just one client)
Then stream freezes.

For the Firefox, it also start with two clients and stream freezes,
after a few seconds later, one client socket disconnected with "connection reset by peer",
then it started to stream in the browser.

I was wondering why browser is connected as two clients. I think this is causing the issue.
(this might not be an issue of mjpeg server but the browser)

@JPery
Copy link
Owner

JPery commented Nov 22, 2018

I've uploaded a new version where I can read the HTTP headers. With this features Chrome seems to work well. I think that the two clients on Chrome are due to the actual request and some "cache" request. I hope this version works well for you

@ykpark79
Copy link
Author

ykpark79 commented Nov 23, 2018

Thanks. It works.
But I found another issue.
Regarding recent update, when I want to close application, it waits almost forever in Listener loop.

the way to reproduce is simple.
Run program -> open the web browser (localhost:7777)
while getting feed stream in the browser, if I turn off the software, it will wait forever.

@JPery
Copy link
Owner

JPery commented Nov 23, 2018

I'll take a look into it.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants