Code Monkey home page Code Monkey logo

Comments (3)

moeiscool avatar moeiscool commented on June 18, 2024 1

@indus i know you asked this a long time ago but for anyone stumbling on this now. You can use JSMPEG with socket.io! See my gist here https://gist.github.com/moeiscool/e2a584cca6f4e3f1691a96b6c56856f9

I modified the library to work as a pipe. https://github.com/ShinobiCCTV/jsmpeg-pipe So we can write data as we are emitted it from socket.io

from jsmpeg.

phoboslab avatar phoboslab commented on June 18, 2024

Narf. Finding the cause for such memory leaks is notoriously difficult. I'll look into it. However, it doesn't seem to be that bad - judging from your screenshot, it only rises about ~2mb in 10minutes :)

To solve the other problem, you could close() the WebSocket (and maybe throw the jsmpeg instance away altogether) when the page is hidden and reconnect/recreate when it becomes visible again. Support for the page visibility API is quite good, but it's still a bit of a pain to use with all the vendor prefixes currently.

from jsmpeg.

indus avatar indus commented on June 18, 2024

using visibility API to kill the stream instance sounds ok. Thanks.

Just another short question: I already have a socket.io server running in my project. It spreads some realtime GPS-positions to a handfull clients. Do you think its better to integrate the video-streaming into the existing "socket.io"-server, and avoid a second websocket-server?... or to run them separately side-by-side?

from jsmpeg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.