Skip to content

Commit

Permalink
Merge branch 'release/2020.5.0' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuki Ito committed Dec 7, 2020
2 parents 69691e4 + cdeb412 commit aa80ba7
Show file tree
Hide file tree
Showing 49 changed files with 15,626 additions and 3,851 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: test

on:
push:
paths-ignore:
- '**.md'
- 'LICENSE'
- 'NOTICE'

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node: ['10', '12', '14', '15']
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn install
- run: yarn bootstrap
- run: yarn lint
- run: yarn test
- name: Slack Notification
if: failure()
uses: rtCamp/[email protected]
env:
SLACK_CHANNEL: sora-sdk
SLACK_COLOR: danger
SLACK_TITLE: Failure test
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
node_modules
npm-debug.log
wasm.wasm
packages/e2ee/dist
packages/e2ee/_worker
18 changes: 18 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,24 @@
- FIX
- バグ修正

## 2020.5.0
- [UPDATE] clientId option に空文字列を渡せるように修正する
- @yuitowest
- [CHANGE] オプションの e2ee を boolean のみに変更する
- @yuitowest
- [UPDATE] sora-e2ee パッケージを内包するように変更する
- lerna を使って複数 package を管理するようにする
- sdk package を作成して既存コードを sdk package 内へ移動する
- e2ee package を作成して sora-e2ee コードを移植する
- go-wasm package を作成して wasm_exec.js コードを内包する
- @yuitowest
- [CHANGE] simulcastQuality を simulcastRid に変更する
- @voluntas
- [CHANGE] simulcast を bool のみに変更する
- @voluntas
- [CHANGE] simulcast_rid を追加する
- @voluntas

## 2020.4.2

- [FIX] metadata に直接 undefined を渡せるように修正する
Expand Down
26 changes: 26 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# 開発

**この資料は SDK 開発者向けです**

## 開発環境

- npm
- v6.9.0 以上
- yarn
- v1.16.0 以上
- yarn install
- これで事前に利用するライブラリをインストールする

## 開発準備

- `yarn install` を実行
- `yarn bootstrap` を実行して packages 以下の各パッケージで依存関係をインストール
- `yarn start` でローカルサーバを起動する

## 開発
sora-js-sdk のトップディレクトリでコマンドを実行することによりビルドやフォーマットを行う
- `yarn build` packages 以下をビルドする
- `yarn lint` packages 以下のコードに lint を実行する
- `yarn fmt` packages 以下のコードに formatter を実行する
- `yarn test` packages 以下のテストを実行する

33 changes: 33 additions & 0 deletions NOTICE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
## https://golang.org/

- https://github.com/golang/go/blob/master/misc/wasm/wasm_exec.js

```
Copyright (c) 2009 The Go Authors. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
```
49 changes: 22 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ In other languages, we won't be able to deal with them. Thank you for your under

## システム条件

- WebRTC SFU Sora 2020.1 以降
- WebRTC SFU Sora 2020.2 以降
- TypeScript 3.8 以降

## サンプル
Expand Down Expand Up @@ -57,7 +57,7 @@ In other languages, we won't be able to deal with them. Thank you for your under

詳細については以下をご確認ください。

[shiguredo/sora\-e2ee: WebRTC SFU Sora 向け JavaScript E2EE ライブラリ](https://github.com/shiguredo/sora-e2ee)
[WebRTC SFU Sora 向け E2EE ライブラリ](https://github.com/shiguredo/sora-e2ee)

## API 一覧

Expand Down Expand Up @@ -95,10 +95,10 @@ var sora = Sora.connection('ws://127.0.0.1/signaling');
| * multistream | boolean | | マルチストリーム有効/無効 |
| * spotlight | integer | | 最大話者数 |
| * simulcast | boolean | | サイマルキャスト有効/無効 |
| * simulcastQuality | string | | サイマルキャストクオリティ(low/middle/high) |
| * simulcastRid | string | | サイマルキャストRID (r0/r1/r2) |
| * clientId | string | | クライアントID |
| * timeout | integer | | タイムアウト時間(ms) |
| * e2ee | string | | e2ee のマスターシークレット |
| * e2ee | boolean | | E2EE 有効/無効 |
| * signalingNotifyMetadata | json | | signaling notify 用の metadata |


Expand Down Expand Up @@ -172,7 +172,7 @@ sendrecv.on('disconnect', function(e) {
| * simulcast | boolean | | サイマルキャスト有効/無効 |
| * clientId | string | | クライアントID |
| * timeout | integer | | タイムアウト時間(ms) |
| * e2ee | string | | e2ee のマスターシークレット |
| * e2ee | boolean | | E2EE 有効/無効 |
| * signalingNotifyMetadata | json | | signaling notify 用の metadata |


Expand Down Expand Up @@ -245,11 +245,11 @@ sendonly.on('disconnect', function(e) {
| * multistream | boolean | | マルチストリーム有効/無効 |
| * spotlight | integer | | 最大話者数 |
| * simulcast | boolean | | サイマルキャスト有効/無効 |
| * simulcastQuality | string | | サイマルキャストクオリティ(low/middle/high) |
| * simulcastRid | string | | サイマルキャストRID(r0/r1/r2) |
| * clientId | string | | クライアントID |
| * timeout | integer | | タイムアウト時間(ms) |
| * e2ee | string | | e2ee のマスターシークレット |
| * signalingNotifyMetadata | json | | signaling notify 用の metadata |
| * e2ee | boolean | | E2EE 有効/無効 |
| * signalingNotifyMetadata | json | | signaling notify 用の metadata |


- connect()
Expand Down Expand Up @@ -296,27 +296,22 @@ recvonly.on('disconnect', function(e) {
});
```

## 開発者向け
```
$ git clone https://github.com/shiguredo/sora-js-sdk.git
$ cd sora-js-sdk
$ yarn install
```
## ライセンス

### ビルド
```
$ yarn build
```
Apache License 2.0

### 開発時
```
$ yarn watch
$ yarn server
```
Copyright 2017-2020, Shiguredo Inc.
### リリース
```
$ yarn lint
$ yarn test
$ yarn release
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```
20 changes: 16 additions & 4 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,25 @@
- yarn install
- これで事前に利用するライブラリをインストールする



## リリース手順

- git flow release start <tag> で開始する
- CHANGES.md にタグを打つバージョンで書き込む
- package.json の version をタグを打つバージョンに変更する
- yarn release を実行する
- Lint が実行されるので通ることを確認する
- バイナリができるのでそれをコミットする
- yarn lint を実行する
- yarn test を実行する
- yarn release:minor を実行する
- minor バージョンが更新されていることを確認する
- 差分をコミットする
- git flow release finish <tag> で終了する
- git push -u origin develop master --tags

## canary リリース手順

- yarn lint を実行する
- yarn test を実行する
- yarn release:canary を実行する
- canary バージョンが更新されていることを確認する
- コミットメッセージをバージョンにして差分をコミットする(例. git commit -m "2020.1.0-canary.0")
- git push -u origin develop --tags
5 changes: 4 additions & 1 deletion dist/base.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Callbacks, ConnectionOptions, Json, SignalingOfferMessage, SignalingUpdateMessage } from "./types";
import SoraE2EE from "sora-e2ee";
import SoraE2EE from "@sora/e2ee";
export default class ConnectionBase {
role: string;
channelId: string;
Expand All @@ -20,6 +20,7 @@ export default class ConnectionBase {
constructor(signalingUrl: string, role: string, channelId: string, metadata: Json, options: ConnectionOptions, debug: boolean);
on(kind: keyof Callbacks, callback: Function): void;
disconnect(): Promise<[void, void, void]>;
protected setupE2EE(): void;
protected startE2EE(): void;
protected signaling(offer: RTCSessionDescriptionInit): Promise<SignalingOfferMessage>;
protected createOffer(): Promise<RTCSessionDescriptionInit>;
Expand All @@ -35,4 +36,6 @@ export default class ConnectionBase {
private update;
private setSenderParameters;
private getStats;
get e2eeSelfFingerprint(): string | undefined;
get e2eeRemoteFingerprints(): Record<string, string> | undefined;
}
5 changes: 3 additions & 2 deletions dist/sora.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import ConnectionBase from "./base";
import ConnectionPublisher from "./publisher";
import ConnectionSubscriber from "./subscriber";
import { AudioCodecType, Callbacks, ConnectionOptions, Json, Role, SimulcastQuality, VideoCodecType } from "./types";
import { AudioCodecType, Callbacks, ConnectionOptions, Json, Role, SimulcastRid, VideoCodecType } from "./types";
declare class SoraConnection {
signalingUrl: string;
debug: boolean;
Expand All @@ -13,8 +13,9 @@ declare class SoraConnection {
recvonly(channelId: string, metadata?: Json, options?: ConnectionOptions): ConnectionSubscriber;
}
declare const _default: {
initE2EE: (wasmUrl: string) => Promise<void>;
connection: (signalingUrl: string, debug?: boolean) => SoraConnection;
version: () => string;
};
export default _default;
export type { AudioCodecType, Callbacks, ConnectionBase, ConnectionOptions, ConnectionPublisher, ConnectionSubscriber, Role, SimulcastQuality, SoraConnection, VideoCodecType, };
export type { AudioCodecType, Callbacks, ConnectionBase, ConnectionOptions, ConnectionPublisher, ConnectionSubscriber, Role, SimulcastRid, SoraConnection, VideoCodecType, };
Loading

0 comments on commit aa80ba7

Please sign in to comment.