Skip to content

Commit

Permalink
Merge pull request #70 from singchia/feat/example-rtmp
Browse files Browse the repository at this point in the history
example: update diagram in readme
  • Loading branch information
singchia committed Jun 21, 2024
2 parents 2f67382 + efe5455 commit dea5093
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 2 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ examples:
make -C examples
mv examples/iclm/bin/* ./bin/ && rm -rf examples/iclm/bin
mv examples/chatroom/bin/* ./bin/ && rm -rf examples/chatroom/bin
mv examples/rtmp/bin/* ./bin/ && rm -rf examples/rtmp/bin

# clean
.PHONY: clean
Expand Down
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ Frontier需要微服务和边缘节点两方都主动连接到Frontier,Service

### 示例

**聊天室**

目录[examples/chatroom](./examples/chatroom)下有简单的聊天室示例,仅100行代码实现一个的聊天室功能,可以通过

```
Expand All @@ -135,6 +137,19 @@ https://github.com/singchia/frontier/assets/15531166/18b01d96-e30b-450f-9610-917

在这个示例你可以看到上线离线通知,消息Publish等功能。

**直播**

目录[examples/rtmp](./examples/rtmp)下有简单的直播示例,仅80行代码实现一个的直播代理功能,可以通过

```
make examples
```

在bin目录下得到```rtmp_service``````rtmp_edge```可执行程序,运行后,使用[OBS](https://obsproject.com/)连接rtmp_edge即可直播代理:

<img src="./docs/diagram/rtmp.png" width="100%" height="100%">

在这个示例你可以看到Multiplexer和Stream功能。

### 微服务如何使用

Expand Down
Binary file added docs/diagram/rtmp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 7 additions & 2 deletions examples/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ GOHOSTOS?=$(shell go env GOHOSTOS)
GOARCH?=$(shell go env GOARCH)

.PHONY: all
all: iclm chatroom
all: iclm chatroom rtmp

.PHONY: iclm
iclm:
Expand All @@ -12,7 +12,12 @@ iclm:
chatroom:
make -C chatroom

.PHONY: rtmp
rtmp:
make -C rtmp

.PHONY: clean
clean:
make clean -C iclm
make clean -C chatroom
make clean -C chatroom
make clean -C rtmp

0 comments on commit dea5093

Please sign in to comment.