jitsi / jitsi-meet

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
https://jitsi.org/meet
Apache License 2.0
22.93k stars 6.69k forks source link

Add sending files to the conference #5831

Closed ostasevych closed 4 years ago

ostasevych commented 4 years ago

Please, add the functionality to share files (documents, images, video) with participants in the chat during the conference.

phi12ip commented 4 years ago

I'm just looking at the code-base for the first time, so I'm not sure where to put it, or how this is setup yet, but I have been using this app constantly over this quarantine!

Is this reference implementation relevant?

link

// https://www.webrtc-experiment.com/File.js

var progressHelper = {};
var outputPanel = document.body;

var fileHelper = {
    onBegin: function (file) {
        var div = document.createElement('div');
        div.title = file.name;
        div.innerHTML = '<label>0%</label> <progress></progress>';
        outputPanel.insertBefore(div, outputPanel.firstChild);
        progressHelper[file.uuid] = {
            div: div,
            progress: div.querySelector('progress'),
            label: div.querySelector('label')
        };
        progressHelper[file.uuid].progress.max = file.maxChunks;
    },
    onEnd: function (file) {
        progressHelper[file.uuid].div.innerHTML = '<a href="' + file.url + '" target="_blank" download="' + file.name + '"<' + file.name + '</a>';
    },
    onProgress: function (chunk) {
        var helper = progressHelper[chunk.uuid];
        helper.progress.value = chunk.currentPosition || chunk.maxChunks || helper.progress.max;
        updateLabel(helper.progress, helper.label);
    }
};

function updateLabel(progress, label) {
    if (progress.position == -1) return;
    var position = +progress.position.toFixed(2).split('.')[1] || 100;
    label.innerHTML = position + '%';
}

// To Send a File
File.Send({
    file: file,
    channel: peer,
    interval: 100,
    chunkSize: 1000, // 1000 for RTP; or 16k for SCTP
                     // chrome's sending limit is 64k; firefox' receiving limit is 16k!

    onBegin: fileHelper.onBegin,
    onEnd: fileHelper.onEnd,
    onProgress: fileHelper.onProgress
});

// To Receive a File
var fleReceiver = new File.Receiver(fileHelper);
peer.onmessage = function (data) {
    fleReceiver.receive(data);
};
PhilGPk commented 4 years ago

An alternative suggestion: point users to something like Firefox Send? That way, Jitsi can concentrate resources on being really good at conferencing. (If you can run your own Jitsi Instance, Firefox Send should be a doddle.)

ostasevych commented 4 years ago

An alternative suggestion: point users to something like Firefox Send? That way, Jitsi can concentrate resources on being really good at conferencing. (If you can run your own Jitsi Instance, Firefox Send should be a doddle.)

I am not agree, as people use different browsers, while exchange with documents is one of the basic functions specific to conferencing software.

phi12ip commented 4 years ago

@ostasevych , If you can point me to where in library the feature should go, I can work on implementing the feature.

hialvaro commented 4 years ago

@ostasevych

as people use different browsers

Firefox send can be used on any browser, it's just a service offered by mozilla (send.firefox.com)

I see it as a good solution, maybe temporary. It's an easy and very useful service, maybe it could have some kind of integration. This way the server running the conferences doesn't have to deal with the upload/download of the files.

phi12ip commented 4 years ago

@hialvaro peer-to-peer = no server running the conferences

Jitsi-meet:

Jitsi Meet is an open-source (Apache) WebRTC JavaScript application that uses Jitsi Videobridge to provide high quality, secure and scalable video conferences.

And from WebRTC:

With WebRTC, you can add real-time communication capabilities to your application that works on top of an open standard. It supports video, voice, and generic data to be sent between peers, allowing developers to build powerful voice- and video-communication solutions. The technology is available on all modern browsers as well as on native clients for all major platforms. The technologies behind WebRTC are implemented as an open web standard and available as regular JavaScript APIs in all major browsers. For native clients, like Android and iOS applications, a library is available that provides the same functionality. The WebRTC project is open-source and supported by Apple, Google, Microsoft and Mozilla, amongst others. This page is maintained by the Google WebRTC team.

So, I don't requiring users to make an account with Mozilla, and using a browser extension is necessary or the right thing to do.

hialvaro commented 4 years ago

@phi12ip As far as I know, P2P is only used for 1 on 1 video conferences. On group conferences Jitsi Meet uses the Jitsi VideoBridge server (https://jitsi.org/blog/p2p4121/)

From https://jitsi.org/security/:

Jitsi meetings can operate in 2 ways: peer-to-peer (P2P) or via the Jitsi Videobridge (JVB). This is transparent to the user. P2P mode is only used for 1-to-1 meetings.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

liamengland1 commented 4 years ago

.

liamengland1 commented 4 years ago

Bad bot

lazyspider commented 4 years ago

indeed, bad bot.

JohnLines commented 3 years ago

I was talking to a friend about why her group uses Zoom in preference to Jitsi and she said that not being able to share images in the chatbox was an issue. I have recently set up an XMPP chat system using JSXC - https://www.jsxc.org/

I have not tried it extensively yet, but it does work - even with drag and drop - to share images via chat - using the XMPP http upload facility, but hiding this from the user. It is open source, written as a Javascript library, so probably worth looking at how it is done there.

daniel-lucio commented 3 years ago

Remember, jitsi uses prosody on the backend. I think this is more a frontend issue.

JohnLines commented 3 years ago

JSXC is a Front End, also using Prosody (or other XMPP server, such as ejabberd) as the back end.

Jeremynano commented 2 years ago

Would be very usefull !

AdiHamdani commented 1 year ago

I think this feature is very useful for everyone who conducts video chat conferencing

loganPham26 commented 1 year ago

Can i ask if jitsi has implemented this feature yet ? This feature is very useful.

saghul commented 1 year ago

We haven't, and we currently don't plan to do so.

fishfree commented 1 year ago

It's a VERY important and useful feature. Why close it?

saghul commented 1 year ago

Because we don't plan to implement it.

webRTCv1 commented 8 months ago

We use MiroTalk, a versatile peer-to-peer (p2p) and Selective Forwarding Unit (SFU) communication platform. MiroTalk not only supports seamless file transfer but also offers a wide array of additional features for an enhanced communication experience.

BlueOwlet commented 6 months ago

I also think it's an important feature most of the respectable video conferencing specific software includes it. Even if it's only over webrtc protocol the implementation is mostly already what you have done for the video conferencing part. The channels are already created, data transfer is already happening. I'm not familiar with the internals of jitsi but from having to do a file transfer on js once I don't think it's much much much different. This feature would definitely be super good, I'd actually rather have that than the whiteboard and etherpad solutions...

Anyway... I'm just another user commenting here for feedback on the topic. Nothing else. If this feature won't be added natively I also think that it wouldn't be so so difficult to implement using your own skills; but just that it would be really nice to have it as a plugin or something.

Really nice software though. Could be the greatest.