-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from seymourtang/main
feat(cloudRecording):add web recording support to cloud recording service
- Loading branch information
Showing
25 changed files
with
640 additions
and
95 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# This workflow will build a golang project | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go | ||
|
||
name: Go | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.18' | ||
|
||
- name: Test | ||
run: go test -v ./... | ||
|
||
- name: Build | ||
run: go build -v ./... |
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 |
---|---|---|
|
@@ -20,3 +20,5 @@ go.work | |
.idea | ||
.vscode | ||
.DS_Store | ||
|
||
**/.env |
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
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,10 @@ | ||
package core | ||
|
||
func Contains(S []string, E string) bool { | ||
for _, s := range S { | ||
if s == E { | ||
return true | ||
} | ||
} | ||
return false | ||
} |
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,37 @@ | ||
## CloudRecording Example | ||
|
||
> 这是 Agora Cloud Recording 的一个示例项目,使用了 Agora Cloud Recording RESTful API,实现了频道录制的功能。本示例支持合流录制、单流录制和页面录制三种模式。 | ||
### 运行示例项目 | ||
|
||
#### 前提条件 | ||
|
||
在当前目录创建一个 `.env` 文件,填入以下内容: | ||
|
||
```bash | ||
APP_ID=<Your App ID> | ||
BASIC_AUTH_USERNAME=<Your Basic Auth Username> | ||
BASIC_AUTH_PASSWORD=<Your Basic Auth Password> | ||
CNAME=<Your Channel Name> | ||
TOKEN=<Your Token> | ||
UID=<Your UID> | ||
STORAGE_CONFIG_VENDOR=<Your Storage Vendor> | ||
STORAGE_CONFIG_REGION=<Your Storage Region> | ||
STORAGE_CONFIG_BUCKET=<Your Storage Bucket> | ||
STORAGE_CONFIG_ACCESS_KEY=<Your Storage Access Key> | ||
STORAGE_CONFIG_SECRET_KEY=<Your Storage Secret Key> | ||
``` | ||
相关的参数可以通过可在 [CloudRecording 服务说明](../../services/cloudrecording/README.md) 查看 | ||
|
||
#### 执行 | ||
|
||
通过下面的命令来运行示例项目: | ||
|
||
```bash | ||
go run main.go -mode=<mode> | ||
``` | ||
|
||
其中 `<mode>` 表示运行的云录制模式,以下是 mode 数值对应的录制模式: | ||
* 1: MixRecording 合流录制 | ||
* 2: IndividualRecording 单流录制 | ||
* 3: WebRecording 页面录制 |
Oops, something went wrong.