Giter Site home page Giter Site logo

[Feature Request] Hibernate about neko HOT 13 OPEN

m1k1o avatar m1k1o commented on August 15, 2024 3
[Feature Request] Hibernate

from neko.

Comments (13)

mbattista avatar mbattista commented on August 15, 2024

If I understand correctly you just want a possibility to stop/start the gstreamer pipeline on command?

from neko.

m1k1o avatar m1k1o commented on August 15, 2024

Not only gstreamer pipeline but also browser and WebRTC server.

from neko.

mbattista avatar mbattista commented on August 15, 2024

Why also browser and WebRTC?

Stopping the pipeline would leave neko in the starting state, before anyone has joined and could save some cpu cores.
But the browser and the WebRTC server do not need that many resources?

If you e.g. stop an youtube video to watch later and hypernate kills the browser, you have to remember how far along the video you were.

from neko.

m1k1o avatar m1k1o commented on August 15, 2024

My motivation is to be able to disconnect users mainly from streaming video from my server, while being connected to chat. So you are right, no need to turn off browser.

If I have my deployment and I have some people, they are constantly pulling video from my server. Unless I turn off neko, they disconnect or I kick them. I thought about having some lobby, so people can be connected and chat while not receiving video data from server unless admin allows.

Another level of this would be to have this split between users and admins. So allow only admins to stream (logging in to accounts, typing some sensitive information) while users would wait in the lobby and after they will be let in.

from neko.

mbattista avatar mbattista commented on August 15, 2024

Simple Solution: Stop the pipeline. All users stay connected and can chat, bandwidth and cpu-cyclen are saved. People see a black "placeholder" where the video should be.
Advantages: Quickly implemented, Sufficient for most cases

Complex Solution: Video does not autoplay. Instead there is an overlay which has to be clicked to join the WebRTC session. If no gstreamer pipeline is run, an different overlay gets put over the video until a video is streamed.
Advantages: Users have clean input, User initiate WebRTC session.

from neko.

m1k1o avatar m1k1o commented on August 15, 2024

I like the first solution, and I think, it could be indeed sufficient. That would create a new usecase: Truning only video pipeline off, so if you are just listening to music, you don't need to receive video stream.

from neko.

mbattista avatar mbattista commented on August 15, 2024

This feature took longer then I expected and is still not finished.

It will still need a lot of re-code since it will now need to save all the peerconnections and corresponding websockets to reanounce SDPs after each change of track (removed audio / video). I will try to tackle #48 while I am at it.

from neko.

m1k1o avatar m1k1o commented on August 15, 2024

You can open a draft pull request and I can help with some tasks, if you want.

from neko.

Kinuseka avatar Kinuseka commented on August 15, 2024

I wonder if this is still being worked on? Its a very helpful feature.

from neko.

m1k1o avatar m1k1o commented on August 15, 2024

I don't think this is being worked on. It can be acheived by stopping docker exec neko supervisorctl stop google-chrome and starting docker exec neko supervisorctl start google-chrome. You could wrap it to a simple service and create custom button for that.

from neko.

Kinuseka avatar Kinuseka commented on August 15, 2024

I was hoping for an automatic hibernation when there are no more users on the room.

from neko.

m1k1o avatar m1k1o commented on August 15, 2024

That info can be received using /stats?pwd=<admin> endpoint. But yeah, it would be nicer if it would be part of neko itself. But the project is getting bigger and bigger, maybe it would be a good time to think about some plugins/addons. Where such logic could be easily added to neko externally.

from neko.

yesBad avatar yesBad commented on August 15, 2024

I could write you a simple modified image that checks like each minute if a user is connected and based on that it will stop/start the browser, if you are interested @Kinuseka

from neko.

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.