-
Notifications
You must be signed in to change notification settings - Fork 299
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
261 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package org.jitsi.jigasi.mute; | ||
|
||
public interface ForceMute | ||
{ | ||
void requestAudioMute(boolean muted); | ||
|
||
void setAllowedToSpeak(boolean allowedToSpeak); | ||
} |
27 changes: 27 additions & 0 deletions
27
src/main/java/org/jitsi/jigasi/mute/ForceMuteDisabled.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package org.jitsi.jigasi.mute; | ||
|
||
import org.jitsi.jigasi.JvbConference; | ||
|
||
public class ForceMuteDisabled | ||
implements ForceMute | ||
{ | ||
|
||
private JvbConference conference; | ||
|
||
public ForceMuteDisabled(JvbConference jvbConference) | ||
{ | ||
this.conference = jvbConference; | ||
} | ||
|
||
@Override | ||
public void requestAudioMute(boolean muted) | ||
{ | ||
this.conference.requestAudioMute(muted); | ||
} | ||
|
||
@Override | ||
public void setAllowedToSpeak(boolean allowedToSpeak) | ||
{ | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package org.jitsi.jigasi.mute; | ||
|
||
import org.jitsi.jigasi.JvbConference; | ||
|
||
public class ForceMuteEnabled | ||
implements ForceMute | ||
{ | ||
private JvbConference conference; | ||
|
||
private boolean allowedToSpeak; | ||
|
||
public ForceMuteEnabled(JvbConference jvbConference) | ||
{ | ||
this.conference = jvbConference; | ||
this.allowedToSpeak = false; | ||
} | ||
|
||
@Override | ||
public void requestAudioMute(boolean muted) | ||
{ | ||
if (muted == false) | ||
{ | ||
if (this.allowedToSpeak == false) | ||
{ | ||
// | ||
|
||
return; | ||
} | ||
} | ||
|
||
this.conference.requestAudioMute(muted); | ||
} | ||
|
||
@Override | ||
public void setAllowedToSpeak(boolean allowedToSpeak) | ||
{ | ||
this.allowedToSpeak = allowedToSpeak; | ||
} | ||
} |