Hubs-Foundation / hubs

Duck-themed multi-user virtual spaces in WebVR. Built with A-Frame.
https://hubsfoundation.org
Mozilla Public License 2.0
2.13k stars 1.42k forks source link

links to open networks/federated and videos from peertube #2537

Open r3k2 opened 4 years ago

r3k2 commented 4 years ago

Hello, I was trying today hubs to use it for a hacker conference, we avoid anything not open and centralized, we notice there is only options to link to twitter and videos from youtube and other proprietary places, no options for mastodon, peertube, lbry, jitsi, etc just to name a few... I though mozilla was all about open standards, So this is a feature requests to please allow for people to be able to post to mastodon, link to peertube videos or lbry. Thanks

┆Issue is synchronized with this Jira Task

netpro2k commented 4 years ago

You can paste links to any publicly accessible urls on the web that can be played by a standard

Re Jitsi. Currently WebRTC streaming is only supported through the configured SFU (currently Janus Gateway) for screen and webcam sharing. Supporting playing back arbitrary WebRTC video streams would be a reasonable amount of effort.

In general anything that would require implementing some sort of special client side handling outside of what you could put into a

For sharing if navigator.share is implemented, that is preferred, but we fallback as you noticed to twitter. Since Hubs rooms are just standard URLs they can very easily be shared to any platform that can accept text, so implementing share dialogs for every possible platform does not seem to be a high priority. Open to ideas on how we could expose additional services without sacrificing UX or needing to implement additional site-specific code. Perhaps url template strings in the admin console for Hubs cloud instances?

r3k2 commented 4 years ago

@netpro2k thanks so much for your fast reply, unfortunately i'm about to head to bed is 5:30 am here, will review in details your msg tomorrow and follow up. thanks

JT-os commented 4 years ago

Thanks for the great info. Is there any type of specific documentation on topics like this either in the code or a developer resource. The user facing docs don't have this kind of detail that is needed for more sophisticated setup. Like sometimes some projects put info in header files and such or patch submission info is detailed for example. Is there any other place we can do some diligence for details? Thanks and great job BTW.

netpro2k commented 4 years ago

Unfortunately no, outside of the user docs (and discussions on our community Discord) the best place to find out this sort of info is just to dig into the source code. For most of the relevant code is in media-video https://github.com/mozilla/hubs/blob/master/src/components/media-views.js#L235 and then more generally the meida-loader component https://github.com/mozilla/hubs/blob/master/src/components/media-loader.js. The media-video code is pretty messy, but at a high level it creates a

r3k2 commented 4 years ago

hello @netpro2k thanks for so much information, I was able to confirm that creating a new scene I am able to hardcode a video from any of the youtube-dl places I tried, specially peertube so THANK YOU!

Now the part you take a screenshot or what to share something only having a twitter option, it should not be to hard to add another click box right next with for example mastodon, to click on it and allow for people to add the mastodon node they wish to post that msg to... this is how keybase is doing it and other people, I understand that mastodon since is federated is not as easy as twitter that is one central place to post, but not impossible to do it as others have done it successfully.

I have not yet check out the discord bot yet, but will love to know if there is any API to connect to the chat system so I can write a golang bot to connect a matrix channel to a hubs room, is this possible? matrix makes it very easy in particular is build to plug diff type of chat systems together, it has bridges with discord,irc,telegram etc etc ... oh almost forgot, I do agree with JT-os will be nice to have some documentation other than the comments in the code, specially for us that want to create bots/bridges in non js languages like GO :)

netpro2k commented 4 years ago

Yep, I am a big fan of Mastodon, but given all the other things we need to work on it's currently not a priority. Ideally some point in the future we will have some extension APIs that would make it easier for people to add these sorts of things to their own Hubs Cloud instances without having to fork. For now I would just fork and add that feature to your own instance.

Re Matrix bot, that would be really awesome, and we have been wanting to do it ourselves since Mozilla switched over to Matrix from IRC this year, but have not gotten to it yet (it will probably be awhile if we do get to it). We don't have a formal bot API but essentially its just a matter of connecting to the phoenix channel for a room and looking at the data. Best way to get started would be to look at the Discord bot code https://github.com/mozillareality/hubs-discord-bot. Most of the complexity there is around sharing discord-auth into hubs rooms, which also requires backend changes, but doing just a bridge should be pretty simple, especially given the Matrix API is more amenable to that. Also, I haven't played with it myself, but one of our users is working on a little bot library which might be helpful, even if just as another point of documentation for the wire protocol https://github.com/zach-capalbo/hubs-client-bot

r3k2 commented 4 years ago

@netpro2k Thanks! I have read the js code for the hubs-client-bot and is as simple as using a web scrapper, he is using puppeteer, I think I can replicate using chromedp for GO, and go from there(no punt intended). I will let you know when I have something working. Is there anything else I should know/look at?

JT-os commented 4 years ago

I and my group are interested in this specific topic. We'll compile some internal docs and when we get something that we can share I'll post it. We'll figure out how at that time. Thanks for being helpful on these issue tickets. It really helps in onboarding as has been mentioned in passing many times. Keep up the good work and help is on the way. : )

r3k2 commented 4 years ago

@netpro2k got started on working on a GO bot library for hubs as of now I have only implemented login and say. When finished people can use this to create their own bots with out having to go into the under layer of chromedp I have to implement more functionality and also figure out why it uses so many resources... @netpro2k is this what you guys are using for the chat system?

Utopiah commented 3 years ago

I have my own PeerTube instance https://video.benetou.fr but somehow fails to get it to work. If I take a random video from another instance https://diode.zone/videos/watch/f8350e25-dd42-487a-986e-319ff0484e3b at least the preview load.

Yet apparently (I admit I forgot how...) few months ago it did work, cf https://twitter.com/utopiah/status/1259402023260377088

I'd be curious @r3k2 if you explored more.

PS: asked on PeerTube forum https://framacolibri.org/t/embedding-failed-but-worked-on-other-instance/11591

Utopiah commented 2 years ago

FWIW using the download option of PeerTube allow the video to be laoded and played. There are no controls though, just volume.