mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Tools: Sync 3rdparty tools
This commit is contained in:
parent
dea6136238
commit
2783ac7c92
28 changed files with 4631 additions and 616 deletions
24
trunk/3rdparty/signaling/Dockerfile
vendored
Normal file
24
trunk/3rdparty/signaling/Dockerfile
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
|
||||
############################################################
|
||||
# build
|
||||
############################################################
|
||||
FROM registry.cn-hangzhou.aliyuncs.com/ossrs/srs:dev AS build
|
||||
|
||||
COPY . /tmp/signaling
|
||||
RUN cd /tmp/signaling && make
|
||||
RUN cp /tmp/signaling/objs/signaling /usr/local/bin/signaling
|
||||
RUN cp -R /tmp/signaling/www /usr/local/
|
||||
|
||||
############################################################
|
||||
# dist
|
||||
############################################################
|
||||
FROM centos:7 AS dist
|
||||
|
||||
# HTTP/1989
|
||||
EXPOSE 1989
|
||||
# SRS binary, config files and srs-console.
|
||||
COPY --from=build /usr/local/bin/signaling /usr/local/bin/
|
||||
COPY --from=build /usr/local/www /usr/local/www
|
||||
# Default workdir and command.
|
||||
WORKDIR /usr/local
|
||||
CMD ["./bin/signaling"]
|
48
trunk/3rdparty/signaling/README.md
vendored
48
trunk/3rdparty/signaling/README.md
vendored
|
@ -4,21 +4,59 @@ WebRTC signaling for https://github.com/ossrs/srs
|
|||
|
||||
## Usage
|
||||
|
||||
Build and [run SRS](https://github.com/ossrs/srs/tree/4.0release#usage):
|
||||
[Run SRS](https://github.com/ossrs/srs/tree/4.0release#usage) in docker:
|
||||
|
||||
```bash
|
||||
git clone -b 4.0release https://gitee.com/ossrs/srs.git srs &&
|
||||
cd srs/trunk && ./configure && make && ./objs/srs -c conf/rtc.conf
|
||||
docker run --rm --env CANDIDATE=$(ifconfig en0 inet| grep 'inet '|awk '{print $2}') \
|
||||
-p 1935:1935 -p 8080:8080 -p 1985:1985 -p 8000:8000/udp \
|
||||
registry.cn-hangzhou.aliyuncs.com/ossrs/srs:v4.0.95 \
|
||||
objs/srs -c conf/rtc.conf
|
||||
```
|
||||
|
||||
Build and run signaling:
|
||||
> Note: More images and version is [here](https://cr.console.aliyun.com/repository/cn-hangzhou/ossrs/srs/images).
|
||||
|
||||
Run signaling in docker:
|
||||
|
||||
```bash
|
||||
cd srs/trunk/3rdparty/signaling && make && ./objs/signaling
|
||||
docker run --rm -p 1989:1989 registry.cn-hangzhou.aliyuncs.com/ossrs/signaling:v1.0.4
|
||||
```
|
||||
|
||||
> Note: More images and version is [here](https://cr.console.aliyun.com/repository/cn-hangzhou/ossrs/signaling/images).
|
||||
|
||||
Open the H5 demos:
|
||||
|
||||
* [WebRTC: One to One over SFU(SRS)](http://localhost:1989/demos/one2one.html?autostart=true)
|
||||
|
||||
## Build from source
|
||||
|
||||
Build and [run SRS](https://github.com/ossrs/srs/tree/4.0release#usage):
|
||||
|
||||
```bash
|
||||
cd ~/git && git clone -b 4.0release https://gitee.com/ossrs/srs.git srs &&
|
||||
cd ~/git/srs/trunk && ./configure && make && ./objs/srs -c conf/rtc.conf
|
||||
```
|
||||
|
||||
Build and run signaling:
|
||||
|
||||
```bash
|
||||
cd ~/git/srs/trunk/3rdparty/signaling && make && ./objs/signaling
|
||||
```
|
||||
|
||||
Open demos by localhost: http://localhost:1989/demos
|
||||
|
||||
Build and run httpx-static for HTTPS/WSS:
|
||||
|
||||
```bash
|
||||
cd ~/git/srs/trunk/3rdparty/httpx-static && make &&
|
||||
./objs/httpx-static -http 80 -https 443 -ssk server.key -ssc server.crt \
|
||||
-proxy http://127.0.0.1:1989/sig -proxy http://127.0.0.1:1985/rtc \
|
||||
-proxy http://127.0.0.1:8080/
|
||||
```
|
||||
|
||||
Open demos by HTTPS or IP:
|
||||
|
||||
* http://localhost/demos/
|
||||
* https://localhost/demos/
|
||||
* https://192.168.3.6/demos/
|
||||
|
||||
Winlin 2021.05
|
||||
|
|
70
trunk/3rdparty/signaling/auto/release.sh
vendored
Executable file
70
trunk/3rdparty/signaling/auto/release.sh
vendored
Executable file
|
@ -0,0 +1,70 @@
|
|||
#!/bin/bash
|
||||
|
||||
SRS_GIT=$HOME/git/signaling
|
||||
SRS_TAG=
|
||||
|
||||
# linux shell color support.
|
||||
RED="\\033[31m"
|
||||
GREEN="\\033[32m"
|
||||
YELLOW="\\033[33m"
|
||||
BLACK="\\033[0m"
|
||||
|
||||
function NICE() {
|
||||
echo -e "${GREEN}$@${BLACK}"
|
||||
}
|
||||
|
||||
function TRACE() {
|
||||
echo -e "${BLACK}$@${BLACK}"
|
||||
}
|
||||
|
||||
function WARN() {
|
||||
echo -e "${YELLOW}$@${BLACK}"
|
||||
}
|
||||
|
||||
function ERROR() {
|
||||
echo -e "${RED}$@${BLACK}"
|
||||
}
|
||||
|
||||
##################################################################################
|
||||
##################################################################################
|
||||
##################################################################################
|
||||
if [[ -z $SRS_TAG ]]; then
|
||||
SRS_TAG=`(cd $SRS_GIT && git describe --tags --abbrev=0 --exclude release-* 2>/dev/null)`
|
||||
if [[ $? -ne 0 ]]; then
|
||||
echo "Invalid tag $SRS_TAG of $SRS_FILTER in $SRS_GIT"
|
||||
exit -1
|
||||
fi
|
||||
fi
|
||||
|
||||
NICE "Build docker for $SRS_GIT, tag is $SRS_TAG"
|
||||
|
||||
git ci -am "Release $SRS_TAG"
|
||||
|
||||
# For aliyun hub.
|
||||
NICE "aliyun hub release-v$SRS_TAG"
|
||||
|
||||
echo "git push aliyun"
|
||||
git push aliyun
|
||||
|
||||
git tag -d release-v$SRS_TAG 2>/dev/null
|
||||
echo "Cleanup tag $SRS_TAG for aliyun"
|
||||
|
||||
git tag release-v$SRS_TAG; git push -f aliyun release-v$SRS_TAG
|
||||
echo "Create new tag $SRS_TAG for aliyun"
|
||||
echo ""
|
||||
|
||||
NICE "aliyun hub release-vlatest"
|
||||
git tag -d release-vlatest 2>/dev/null
|
||||
echo "Cleanup tag latest for aliyun"
|
||||
|
||||
git tag release-vlatest; git push -f aliyun release-vlatest
|
||||
echo "Create new tag latest for aliyun"
|
||||
|
||||
# For github.com
|
||||
echo "git push origin"
|
||||
git push origin
|
||||
|
||||
echo "git push origin $SRS_TAG"
|
||||
git push origin $SRS_TAG
|
||||
|
||||
NICE "Update github ok"
|
|
@ -7,7 +7,7 @@
|
|||
<body>
|
||||
<h3><a href="https://github.com/ossrs/signaling">Signaling</a> works!</h3>
|
||||
<p>
|
||||
Run demo for <a href="one2one.html">WebRTC: One to One over SFU(SRS)</a><br/>
|
||||
点击进入<a href="one2one.html">SRS一对一通话演示</a>
|
||||
Run demo for <a href="one2one.html?autostart=true">WebRTC: One to One over SFU(SRS)</a><br/>
|
||||
点击进入<a href="one2one.html?autostart=true">SRS一对一通话演示</a>
|
||||
</p>
|
||||
</body>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue