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
23.09k stars 6.71k forks source link

Control local volume of each stream in a Jitsi Meet call #5858

Closed theronic closed 4 years ago

theronic commented 4 years ago

I want to control the relative local volume of each participant.

I'd like to be able to do:

api.executeCommand('setLocalVolume', "user123", 70); // set that user's local volume to 70%

And also retrieve a user's local volume:

let volume = api.executeCommand('setLocalVolume', "user123"); // or perhaps with a callback

Describe alternatives you've considered

I've looked in the Jitsi Meet API docs and don't see any volume control events.

nulele commented 4 years ago

Yes! And could be useful for hiding/showing the video streaming too.

maxmijn commented 4 years ago

This would be very useful!

nulele commented 4 years ago

Correct me if I'm wrong but isn't this already possibile with this (https://github.com/jitsi/lib-jitsi-meet/blob/master/doc/API.md) set of API? If yes, is it possibile to use this set of API toghether with the external API (https://github.com/jitsi/jitsi-meet/blob/master/doc/api.md)?

albeethekid commented 4 years ago

It is possible from the web, by clicking the vertically oriented tripled dots on a given participants tile (see screenshot) However, the IOS SDK does not seem to expose this, which is quite disappointing. Can anyone offer any advice on how to expose this feature to the SDK for iOS?

Screen Shot 2020-04-23 at 1 05 55 PM
FaizanZahid commented 4 years ago

@nulele i see this option also on https://meet.jit.si/mymeeting

however, i m using jitsi using the external iframe API, how do i turn on this option so that all participants can lower or raise volumes for other participants?

My code looks something like this,,


<script>

if ((typeof(JitsiMeetExternalAPI) !== "undefined") && (JitsiMeetExternalAPI === JitsiMeetExternalAPI)){

            var domain = "mydomain.com";
            var options = {
                roomName: "community3",
                configOverwrite: {
                     startWithVideoMuted:true
               },
                interfaceConfigOverwrite: {
                    filmStripOnly: true,
                    VERTICAL_FILMSTRIP: false,
                    MOBILE_APP_PROMO:false,
   TOOLBAR_BUTTONS: [
        'microphone', 'closedcaptions', 'desktop', 'fullscreen',
        'fodeviceselection',  'profile', 'chat', 'recording',
        'livestreaming', 'etherpad', 'sharedvideo',  'raisehand',
       'filmstrip', 'invite', 'feedback', 'stats',  'shortcuts',
        'tileview'
    ],
                }
            }
            var api = new JitsiMeetExternalAPI(domain, options);
api.executeCommand('displayName',this.app.user.username);
if (this.app.user.username == "Guest") {
        api.executeCommand('avatarUrl', "https://i.pravatar.cc/300"+"?v="+Math.random());
    } else {
        api.executeCommand('avatarUrl', this.app.user.picture);
    }

} else {
location.reload();
}

My iframe looks like this, but i dont see the 3 dots to lower or raise volume of each participant, what am i doing wrong?

image

Fuji1405116 commented 4 years ago

I checked and that “remote video menu” option (3 dots) is already available by default without any “configOverwrite” and “interfaceConfigOverwrite” in the iframe api. @FaizanZahid I even just tried your above code by simply removing “filmStripOnly: true” and “3 dots” option was there… I don’t know why “filmStripOnly: true” make that option vanish but by simply removing it you can achieve that. May be there are other options too. If you want fully customized control over every component you have to use lib-jitsi-meet https://github.com/jitsi/lib-jitsi-meet/blob/master/doc/API.md and have to manually do everything. Thanx

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.

laijinmei commented 1 year ago

i could not do the same thing in lib-jitsi-meet API (low level),i want to control local volume of each stream too

saghul commented 1 year ago

You need to do that in the <audio> element that is playing the stream.

mimiyue282193 commented 10 months ago

let participantID = api.getParticipantsInfo()[0].participantId; console.log(participantID); api.executeCommand('setParticipantVolume', participantID, 0.5);

I coded like this and it worked fine.