Skip to content
This repository has been archived by the owner on Aug 25, 2021. It is now read-only.

Commit

Permalink
Use ApplyTracks for the mute/unmute mechanism (#81, #73)
Browse files Browse the repository at this point in the history
- add 'medea-reactive' crate
- write basic Command::ApplyTracks and Event::TracksApplied implementation
- rewrite Sender and MediaTrack to react on mute state change
- rewrite Room::mute_audio-like functions to return Promise that resolves in Sender becoming muted
- send Command::ApplyTracks on Room::mute-like functions
- impl processing of Event::TracksApplied for muting MediaTracks

Additionally:
- update Travis CI spec to dpl v2
- fix 'medea-jason' rustdoc warnings
- upgrade Chrome to 80.0 version and Firefox to 73.0.1 version for E2E tests
  • Loading branch information
evdokimovs authored Feb 20, 2020
1 parent 84a1352 commit 0d0cc44
Show file tree
Hide file tree
Showing 47 changed files with 2,949 additions and 544 deletions.
12 changes: 7 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
language: rust
os: linux

install:
- rustc -vV
Expand Down Expand Up @@ -56,7 +57,6 @@ jobs:
user=$QUAYIO_USER pass-stdin=yes
deploy:
provider: script
skip_cleanup: true
script: make docker.push IMAGE=medea registry=quay.io
TAGS=build-${TRAVIS_BUILD_ID}
on:
Expand All @@ -79,6 +79,11 @@ jobs:
rust: stable
script: make test.unit crate=medea-macro

- name: unit medea-reactive (stable)
stage: test
rust: stable
script: make test.unit crate=medea-reactive

- name: unit medea-coturn-telnet-client (stable)
stage: test
rust: stable
Expand Down Expand Up @@ -137,7 +142,6 @@ jobs:
- echo "Releasing $MEDEA_CRATE_NAME to crates.io..."
deploy:
provider: script
skip_cleanup: true
script: make release.crates crate=$MEDEA_CRATE_NAME publish=yes
on:
tags: true
Expand All @@ -155,7 +159,6 @@ jobs:
- curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
deploy:
provider: script
skip_cleanup: true
script: make release.npm crate=$MEDEA_CRATE_NAME publish=yes
on:
tags: true
Expand All @@ -170,8 +173,7 @@ jobs:
- echo "Releasing $MEDEA_CRATE_NAME to GitHub..."
deploy:
provider: releases
skip_cleanup: true
api_key: $GH_TOKEN
token: $GH_TOKEN
name: $TRAVIS_TAG
on:
tags: true
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ All user visible changes to this project will be documented in this file. This p
- Filter `SetIceCandidate` messages without `candidate` ([#50](/../../pull/50));
- Send reason of closing WebSocket connection as [Close](https://tools.ietf.org/html/rfc4566#section-5.14) frame's description ([#58](/../../pull/58));
- Send `Event::RpcSettingsUpdated` when `Member` connects ([#75]);
- Send relay mode in `Event::PeerCreated` which is used for configuring client's `RtcIceTransportPolicy` ([#79](/../../pull/79)).
- Send relay mode in `Event::PeerCreated` which is used for configuring client's `RtcIceTransportPolicy` ([#79](/../../pull/79));
- Send `Command::UpdateTracks` on `Event::TracksUpdated` ([#81](/../../pull/81)).
- [Coturn] integration:
- [Coturn] sessions destroying ([#84]).
- Configuration:
Expand Down
59 changes: 34 additions & 25 deletions Cargo.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ include = ["/src/", "/Cargo.*", "/CHANGELOG.md", "/LICENSE.md", "/README.md"]
members = [
"crates/medea-coturn-telnet-client",
"crates/medea-macro",
"crates/medea-reactive",
"jason",
"mock/control-api",
"proto/client-api",
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ RUN apt-get update \

# Prepare Cargo workspace for building dependencies only.
COPY crates/medea-macro/Cargo.toml /app/crates/medea-macro/
COPY crates/medea-reactive/Cargo.toml /app/crates/medea-reactive/
COPY crates/medea-coturn-telnet-client/Cargo.toml \
/app/crates/medea-coturn-telnet-client/
COPY mock/control-api/Cargo.toml /app/mock/control-api/
Expand All @@ -40,6 +41,8 @@ COPY jason/Cargo.toml /app/jason/
COPY Cargo.toml Cargo.lock /app/
WORKDIR /app/
RUN mkdir -p crates/medea-macro/src/ && touch crates/medea-macro/src/lib.rs \
&& mkdir -p crates/medea-reactive/src/ \
&& touch crates/medea-reactive/src/lib.rs \
&& mkdir -p crates/medea-coturn-telnet-client/src/ \
&& touch crates/medea-coturn-telnet-client/src/lib.rs \
&& mkdir -p mock/control-api/src/ && touch mock/control-api/src/lib.rs \
Expand Down
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ DEMO_IMAGE_NAME := instrumentisto/medea-demo
CONTROL_MOCK_IMAGE_NAME := instrumentisto/medea-control-api-mock

RUST_VER := 1.41
CHROME_VERSION := 79.0
FIREFOX_VERSION := 72.0
CHROME_VERSION := 80.0
FIREFOX_VERSION := 73.0.1

crate-dir = .
ifeq ($(crate),medea-jason)
Expand All @@ -40,6 +40,9 @@ endif
ifeq ($(crate),medea-macro)
crate-dir = crates/medea-macro
endif
ifeq ($(crate),medea-reactive)
crate-dir = "crates/medea-reactive"
endif
ifeq ($(crate),medea-coturn-telnet-client)
crate-dir = crates/medea-coturn-telnet-client
endif
Expand Down Expand Up @@ -347,6 +350,7 @@ webdriver-env = $(if $(call eq,$(browser),firefox),GECKO,CHROME)DRIVER_REMOTE
test.unit:
ifeq ($(test-unit-crate),@all)
@make test.unit crate=medea-macro
@make test.unit crate=medea-reactive
@make test.unit crate=medea-coturn-telnet-client
@make test.unit crate=medea-client-api-proto
@make test.unit crate=medea-control-api-proto
Expand Down
2 changes: 1 addition & 1 deletion crates/medea-coturn-telnet-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ medea-coturn-telnet-client

Copyright © 2020 Instrumentisto Team, https://github.com/instrumentisto

This software is subject to the terms of the [Blue Oak Model License 1.0.0](https://github.com/instrumentisto/medea/blob/master/crates/medea-coturn-telnet-client/LICENSE.md). If a copy of the [BlueOak-1.0.0](https://spdx.org/licenses/BlueOak-1.0.0.html) license was not distributed with this file, You can obtain one at https://blueoakcouncil.org/license/1.0.0 .
This software is subject to the terms of the [Blue Oak Model License 1.0.0](https://github.com/instrumentisto/medea/blob/master/crates/medea-coturn-telnet-client/LICENSE.md). If a copy of the [BlueOak-1.0.0](https://spdx.org/licenses/BlueOak-1.0.0.html) license was not distributed with this file, You can obtain one at <https://blueoakcouncil.org/license/1.0.0>.



Expand Down
24 changes: 24 additions & 0 deletions crates/medea-reactive/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
`medea-reactive` changelog
==========================

All user visible changes to this project will be documented in this file. This project uses [Semantic Versioning 2.0.0].




## TBD [0.1.0] · 2020-??-??
[0.1.0]: /../../tree/medea-reactive-0.1.0/crates/medea-reactive

### Added

- `ObservableField` and `ObservableCell` containers ([#81]);
- `Observable` type alias ([#81]);
- `OnObservableFieldModification`, `Subscribable` and `Whenable` traits ([#81]).

[#81]: /../../pull/81





[Semantic Versioning 2.0.0]: https://semver.org
20 changes: 20 additions & 0 deletions crates/medea-reactive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[package]
name = "medea-reactive"
version = "0.1.0-dev"
edition = "2018"
description = "Reactive mutable data containers"
authors = ["Instrumentisto Team <[email protected]>"]
license = "BlueOak-1.0.0"
documentation = "https://docs.rs/medea-reactive"
homepage = "https://github.com/instrumentisto/medea/tree/master/crates/medea-reactive"
repository = "https://github.com/instrumentisto/medea/tree/master/crates/medea-reactive"
readme = "README.md"
keywords = ["medea", "reactive", "reactivity", "observable"]
categories = ["asynchronous", "data-structures"]

[dependencies]
futures = "0.3"

[dev-dependencies.tokio]
version = "0.2"
features = ["macros", "rt-core", "rt-util", "test-util", "time"]
56 changes: 56 additions & 0 deletions crates/medea-reactive/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
Blue Oak Model License
======================

Version 1.0.0

## Purpose

This license gives everyone as much permission to work with
this software as possible, while protecting contributors
from liability.

## Acceptance

In order to receive this license, you must agree to its
rules. The rules of this license are both obligations
under that agreement and conditions to your license.
You must not do anything with this software that triggers
a rule that you cannot or will not follow.

## Copyright

Each contributor licenses you to do everything with this
software that would otherwise infringe that contributor's
copyright in it.

## Notices

You must ensure that everyone who gets a copy of
any part of this software from you, with or without
changes, also gets the text of this license or a link to
<https://blueoakcouncil.org/license/1.0.0>.

## Excuse

If anyone notifies you in writing that you have not
complied with [Notices](#notices), you can keep your
license by taking all practical steps to comply within 30
days after the notice. If you do not do so, your license
ends immediately.

## Patent

Each contributor licenses you to do everything with this
software that would otherwise infringe any patent claims
they can license or become able to license.

## Reliability

No contributor can revoke this license.

## No Liability

***As far as the law allows, this software comes as is,
without any warranty or condition, and no contributor
will be liable to anyone for any damages related to this
software or this license, under any kind of legal claim.***
21 changes: 21 additions & 0 deletions crates/medea-reactive/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
medea-reactive
==============

[![Crates.io](https://img.shields.io/crates/v/medea-reactive)](https://crates.io/crates/medea-reactive)
![Crates.io license](https://img.shields.io/crates/l/medea-reactive)
![Unsafe forbidden](https://img.shields.io/badge/unsafe-forbidden-success.svg)
[![Rust docs](https://docs.rs/medea-coturn-telnet-client/badge.svg)](https://docs.rs/medea-reactive)

[API Docs](https://docs.rs/medea-reactive) |
[Changelog](https://github.com/instrumentisto/medea/blob/master/crates/medea-reactive/CHANGELOG.md)

Reactive mutable data containers.




## License

Copyright © 2020 Instrumentisto Team, https://github.com/instrumentisto

This software is subject to the terms of the [Blue Oak Model License 1.0.0](https://github.com/instrumentisto/medea/blob/crates/medea-reactive/LICENSE.md). If a copy of the [BlueOak-1.0.0](https://spdx.org/licenses/BlueOak-1.0.0.html) license was not distributed with this file, You can obtain one at <https://blueoakcouncil.org/license/1.0.0>.
Loading

0 comments on commit 0d0cc44

Please sign in to comment.