Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V3 group calls #1125

Merged
merged 20 commits into from
May 10, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ extends:
globals:
$: true
_: true
adapter: true
amplify: true
cryptobox: true
CryptoJS: true
Expand Down
3 changes: 2 additions & 1 deletion app/page/template/_dist/app.htm
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,10 @@
<script src="/script/calling/enum/CallAction.js"></script>
<script src="/script/calling/enum/CallState.js"></script>
<script src="/script/calling/enum/CallStateEventCause.js"></script>
<script src="/script/calling/enum/CallStateGroups.js"></script>
<script src="/script/calling/enum/CallStateGroup.js"></script>
<script src="/script/calling/enum/ECallMessageType.js"></script>
<script src="/script/calling/enum/ParticipantState.js"></script>
<script src="/script/calling/enum/PropertyState.js"></script>
<script src="/script/calling/enum/Protocol.js"></script>
<script src="/script/calling/enum/SDPNegotiationMode.js"></script>
<script src="/script/calling/enum/SDPSource.js"></script>
Expand Down
22 changes: 11 additions & 11 deletions app/page/template/list/conversations.htm
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
<user-avatar class="user-avatar-xs" params="user: call().participants()[0].user"></user-avatar>
<!-- /ko -->
<!-- /ko -->
<!-- ko if: is_group() && call().state() != z.calling.enum.CallState.ONGOING -->
<user-avatar class="user-avatar-xs" params="user: call().creator()"></user-avatar>
<!-- ko if: is_group() && call().state() != z.calling.enum.CALL_STATE.ONGOING -->
<user-avatar class="user-avatar-xs" params="user: call().creating_user"></user-avatar>
<!-- /ko -->
<!-- /ko -->
<!-- ko if: is_group() && (call().state() === z.calling.enum.CallState.ONGOING && !call().self_user_joined()) || call().is_declined() -->
<!-- ko if: is_group() && (call().state() === z.calling.enum.CALL_STATE.ONGOING && !call().self_user_joined()) || call().is_declined() -->
<svg class="svg-theme" width="18" height="18" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg">
<circle class="fill-theme" opacity=".16" cx="9" cy="9" r="9"></circle>
<circle class="fill-theme" cx="9" cy="9" r="3"></circle>
Expand All @@ -24,7 +24,7 @@
</div>
<div class="calls-controls">

<!-- ko if: is_group() && call().state() === z.calling.enum.CallState.ONGOING && call().self_user_joined() -->
<!-- ko if: is_group() && call().state() === z.calling.enum.CALL_STATE.ONGOING && call().self_user_joined() -->
<div class="calls-controls-row calls-controls-row-participants"
data-bind="click: $parent.click_on_conversation">
<!-- ko foreach: call().participants() -->
Expand All @@ -41,27 +41,27 @@
text: display_name()"
data-uie-name="item-call"></div>
<!-- ko ifnot: call().is_declined() -->
<!-- ko if: call().state() === z.calling.enum.CallState.CONNECTING -->
<!-- ko if: call().state() === z.calling.enum.CALL_STATE.CONNECTING -->
<span class="label-xs" data-bind="l10n_text: z.string.call_state_connecting" data-uie-name="call-label-connecting"></span>
<!-- /ko -->
<!-- ko if: call().state() === z.calling.enum.CallState.OUTGOING -->
<!-- ko if: call().state() === z.calling.enum.CALL_STATE.OUTGOING -->
<span class="label-xs" data-bind="l10n_text: z.string.call_state_outgoing" data-uie-name="call-label-outgoing"></span>
<!-- /ko -->
<!-- ko if: call().state() === z.calling.enum.CallState.INCOMING -->
<!-- ko if: call().state() === z.calling.enum.CALL_STATE.INCOMING -->
<span class="label-xs" data-bind="l10n_text: z.string.call_state_incoming" data-uie-name="call-label-incoming"></span>
<!-- /ko -->
<!-- ko if: call().state() === z.calling.enum.CallState.ONGOING && call().self_user_joined() -->
<!-- ko if: call().state() === z.calling.enum.CALL_STATE.ONGOING && call().self_user_joined() -->
<span class="label-xs" data-bind="text: z.util.format_seconds(call().duration_time())" data-uie-name="call-duration"></span>
<!-- /ko -->
<!-- /ko -->
<!-- ko if: (call().state() === z.calling.enum.CallState.ONGOING && !call().self_user_joined()) || call().is_declined() -->
<!-- ko if: (call().state() === z.calling.enum.CALL_STATE.ONGOING && !call().self_user_joined()) || call().is_declined() -->
<div class="button button-pill button-fluid button-outline button-small"
data-uie-name="do-call-controls-call-join"
data-bind="click: $parent.on_accept_call, l10n_text: z.string.call_join"></div>
<!-- /ko -->
</div>

<!-- ko if: call().state() === z.calling.enum.CallState.INCOMING && !call().is_declined() -->
<!-- ko if: call().state() === z.calling.enum.CALL_STATE.INCOMING && !call().is_declined() -->
<div class="calls-controls-row">
<div class="button button-pill button-full button-small button-theme-red"
data-uie-name="do-call-controls-call-decline"
Expand Down Expand Up @@ -100,7 +100,7 @@
</div>
</div>

<!-- ko if: call().state() === z.calling.enum.CallState.ONGOING -->
<!-- ko if: call().state() === z.calling.enum.CALL_STATE.ONGOING -->
<!-- ko if: $parent.show_toggle_screen() -->
<div class="calls-controls-action calls-controls-action-screensharing">
<div class="up">
Expand Down
2 changes: 1 addition & 1 deletion app/page/template/list/preferences.htm
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<div class="left-column icon-options"></div>
<div class="center-column" data-bind="l10n_text: z.string.preferences_options"></div>
</li>
<!-- ko if: z.calling.CallingRepository.supports_calling() -->
<!-- ko if: z.calling.CallingRepository.supports_calling -->
<li class="left-list-item left-list-item-clickable" data-bind="click: click_on_av, css: {'text-theme': selected_av}" data-uie-name="go-audio-video">
<div class="left-column icon-av"></div>
<div class="center-column" data-bind="l10n_text: z.string.preferences_av"></div>
Expand Down
9 changes: 5 additions & 4 deletions app/script/audio/AudioRepository.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,11 @@ window.z.audio.AudioRepository = class AudioRepository {
*/
_subscribe_to_events() {
amplify.subscribe(z.event.WebApp.EVENT.NOTIFICATION_HANDLING_STATE, this, (handling_notifications) => {
const new_muted_state = handling_notifications !== z.event.NOTIFICATION_HANDLING_STATE.WEB_SOCKET;
if (this.muted !== new_muted_state) {
this.muted = new_muted_state;
this.logger.info(`Set muted state to '${this.muted}'`);
const updated_muted_state_muted_state = handling_notifications !== z.event.NOTIFICATION_HANDLING_STATE.WEB_SOCKET;

if (this.muted !== updated_muted_state_muted_state) {
this.muted = updated_muted_state_muted_state;
this.logger.debug(`Set muted state to '${this.muted}'`);
}
});

Expand Down
262 changes: 0 additions & 262 deletions app/script/calling/CallingRepository.coffee

This file was deleted.

Loading