Giter Club home page Giter Club logo

Comments (15)

ojack avatar ojack commented on August 9, 2024

Hi @mariawitek that part is currently broken in most browsers unfortunately. Working on fixing it!

from hydra.

mariawitek avatar mariawitek commented on August 9, 2024

Ok, thanks for the update @ojack !

from hydra.

sanotronics avatar sanotronics commented on August 9, 2024

I have the same issue.

Not JS expert at all, but maybe this helps?
https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/srcObject

from hydra.

sanotronics avatar sanotronics commented on August 9, 2024

I just tried on a local server replacing line 61 on https://github.com/ojack/hydra/blob/1985574d65dacea079bad1824b06090b7187de90/hydra-server/app/src/pb-live.js#L61

for the following (as suggested in the previous link I sent)

if ('srcObject' in video) {
  video.srcObject = stream
} else {
  // Avoid using this in new browsers, as it is going away.
  video.src = window.URL.createObjectURL(stream)
}

And it worked, streaming to a browser instance... Once haha

Rolled back to confirm that had done the trick, but then I couldn't get it to work once again:/

from hydra.

sanotronics avatar sanotronics commented on August 9, 2024

it worked!

I just added that very code in the bundle.js file and commented line 1123 (same as line 61 in the pb file) and I got a stream from one local instance to another :)

Tried (and it worked) in:

  • Brave browser Version 1.7.92 Chromium: 80.0.3987.163 (Official Build) (64-bit)
  • Chrome Version 81.0.4044.113 (Official Build) (64-bit)
  • Firefox 70.0.1 (64-bit)

Seems to be a really easy fix luckily :)

from hydra.

ojack avatar ojack commented on August 9, 2024

Hey I just updated this! I thought it was something much more complicated, thanks @sanotronics . @mariawitek try and report back if it works!

Closing this for now, but feel free to keep commenting.

from hydra.

mariawitek avatar mariawitek commented on August 9, 2024

Hey thanks @ojack! I just tried in firefox and chrome, and it worked in both! (PS: I deleted a comment I just posted where I said it didn't work. I just needed to wait a bit!)

from hydra.

ojack avatar ojack commented on August 9, 2024

Oh thats great to hear! I would love to hear more about how you end up using this feature. It was something that was initially a part of hydra (and was one of the reasons I made it). But since then I haven't used it very much.

Going to close this issue but feel free to continue to add comments here.

from hydra.

mariawitek avatar mariawitek commented on August 9, 2024

So actually I'm using it for maybe a slightly unusual (and less interesting) reason.. I've been doing some live-streams with a DJ and don't have a webcam. We wanted to use one laptop as the webcam (placed so that both the DJ and I were visible), and then connect to another laptop to make patterns with the output in hydra and send that out via obs (hope that makes sense!)

from hydra.

sanotronics avatar sanotronics commented on August 9, 2024

Oh I'm so glad I could help out!

I think it's a great feature to use remote cam like a smart phone :) this gives you a lot more flexibility and resolution than the laptop webcam

I was able to use initCam() to use the front camera and initCam(1) for the back camera.

Will test later if the stream works but I have a feeling it will

from hydra.

ojack avatar ojack commented on August 9, 2024

from hydra.

sanotronics avatar sanotronics commented on August 9, 2024

I also have a friend who uses the output that this project generates, which is a controlled PWM RGB LED using the rolling shutter of the smartphones cams, and inputs this to hydra.

The result is quite awesome :)

hydra-RSD
hydra-RSD-2

Great work olivia :) Cheers from Argentina

from hydra.

sanotronics avatar sanotronics commented on August 9, 2024

@ojack do you still have that website to load the camera?

Looks like hydra doesn't load properly on iPhones :( in an iPad it does load πŸ™ƒ

hydra-iOS-fail

from hydra.

ojack avatar ojack commented on August 9, 2024

@sanotronics no I don't. And oh no, did this update that was supposed to make it run on IOS, https://github.com/ojack/hydra/blob/5e289dc539ba51797f79e0d3840ba5441fb0e3a8/hydra-server/app/index.js#L23
but it seems it still isn't working. I don't have an ios device so can't test.

from hydra.

sanotronics avatar sanotronics commented on August 9, 2024

me neither, but I can work remotely with my father or this friend of mine to debug, if need be

It seems to work in iPad, so iOS shouldn't be the problem, but something related to iPhones :/

from hydra.

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.