Squash: Fix bugs

pull/2799/head
winlin 3 years ago
parent 5c1556ac74
commit c2b07ad943

@ -81,7 +81,7 @@ jobs:
docker push --all-tags ossrs/droplet
#
docker tag ossrs/lighthouse:$SRS_TAG ossrs/lighthouse:$SRS_MAJOR
docker tag ossrs/lighthouse:$SRS_TAG ossrs/lighthouse:latest
#docker tag ossrs/lighthouse:$SRS_TAG ossrs/lighthouse:latest
docker push --all-tags ossrs/lighthouse
# Aliyun ACR hub
@ -112,38 +112,69 @@ jobs:
docker tag ossrs/lighthouse:$SRS_TAG registry.cn-hangzhou.aliyuncs.com/ossrs/lighthouse:$SRS_VERSION
docker tag ossrs/lighthouse:$SRS_TAG registry.cn-hangzhou.aliyuncs.com/ossrs/lighthouse:v$SRS_MAJOR
docker tag ossrs/lighthouse:$SRS_TAG registry.cn-hangzhou.aliyuncs.com/ossrs/lighthouse:$SRS_MAJOR
docker tag ossrs/lighthouse:$SRS_TAG registry.cn-hangzhou.aliyuncs.com/ossrs/lighthouse:latest
#docker tag ossrs/lighthouse:$SRS_TAG registry.cn-hangzhou.aliyuncs.com/ossrs/lighthouse:latest
docker push --all-tags registry.cn-hangzhou.aliyuncs.com/ossrs/lighthouse
# Tencent TCR hub
# Tencent TCR Singapore hub
# TODO: FIXME: If stable, please set the latest from 4.0 to 5.0
- name: Login Tencent docker hub
- name: Login Tencent Singapore docker hub
uses: docker/login-action@v1
with:
registry: sgccr.ccs.tencentyun.com
username: "${{ secrets.TCR_USERNAME }}"
password: "${{ secrets.TCR_PASSWORD }}"
- name: Push to Tencent Singapore docker hub
run: |
docker tag ossrs/srs:$SRS_TAG sgccr.ccs.tencentyun.com/ossrs/srs:$SRS_TAG
docker tag ossrs/srs:$SRS_TAG sgccr.ccs.tencentyun.com/ossrs/srs:$SRS_VERSION
docker tag ossrs/srs:$SRS_TAG sgccr.ccs.tencentyun.com/ossrs/srs:v$SRS_MAJOR
docker tag ossrs/srs:$SRS_TAG sgccr.ccs.tencentyun.com/ossrs/srs:$SRS_MAJOR
#docker tag ossrs/srs:$SRS_TAG sgccr.ccs.tencentyun.com/ossrs/srs:latest
docker push --all-tags sgccr.ccs.tencentyun.com/ossrs/srs
#
docker tag ossrs/droplet:$SRS_TAG sgccr.ccs.tencentyun.com/ossrs/droplet:$SRS_TAG
docker tag ossrs/droplet:$SRS_TAG sgccr.ccs.tencentyun.com/ossrs/droplet:$SRS_VERSION
docker tag ossrs/droplet:$SRS_TAG sgccr.ccs.tencentyun.com/ossrs/droplet:v$SRS_MAJOR
docker tag ossrs/droplet:$SRS_TAG sgccr.ccs.tencentyun.com/ossrs/droplet:$SRS_MAJOR
#docker tag ossrs/droplet:$SRS_TAG sgccr.ccs.tencentyun.com/ossrs/droplet:latest
docker push --all-tags sgccr.ccs.tencentyun.com/ossrs/droplet
#
docker tag ossrs/lighthouse:$SRS_TAG sgccr.ccs.tencentyun.com/ossrs/lighthouse:$SRS_TAG
docker tag ossrs/lighthouse:$SRS_TAG sgccr.ccs.tencentyun.com/ossrs/lighthouse:$SRS_VERSION
docker tag ossrs/lighthouse:$SRS_TAG sgccr.ccs.tencentyun.com/ossrs/lighthouse:v$SRS_MAJOR
docker tag ossrs/lighthouse:$SRS_TAG sgccr.ccs.tencentyun.com/ossrs/lighthouse:$SRS_MAJOR
#docker tag ossrs/lighthouse:$SRS_TAG sgccr.ccs.tencentyun.com/ossrs/lighthouse:latest
docker push --all-tags sgccr.ccs.tencentyun.com/ossrs/lighthouse
# Tencent TCR Beijing hub
# TODO: FIXME: If stable, please set the latest from 4.0 to 5.0
- name: Login Tencent Beijing docker hub
uses: docker/login-action@v1
with:
registry: ccr.ccs.tencentyun.com
username: "${{ secrets.TCR_USERNAME }}"
password: "${{ secrets.TCR_PASSWORD }}"
- name: Push to Tencent docker hub
- name: Push to Tencent Beijing docker hub
run: |
docker tag ossrs/srs:$SRS_TAG ccr.ccs.tencentyun.com/ossrs/srs:$SRS_TAG
docker tag ossrs/srs:$SRS_TAG ccr.ccs.tencentyun.com/ossrs/srs:$SRS_VERSION
docker tag ossrs/srs:$SRS_TAG ccr.ccs.tencentyun.com/ossrs/srs:v$SRS_MAJOR
docker tag ossrs/srs:$SRS_TAG ccr.ccs.tencentyun.com/ossrs/srs:$SRS_MAJOR
docker tag ossrs/srs:$SRS_TAG ccr.ccs.tencentyun.com/ossrs/srs:latest
#docker tag ossrs/srs:$SRS_TAG ccr.ccs.tencentyun.com/ossrs/srs:latest
docker push --all-tags ccr.ccs.tencentyun.com/ossrs/srs
#
docker tag ossrs/droplet:$SRS_TAG ccr.ccs.tencentyun.com/ossrs/droplet:$SRS_TAG
docker tag ossrs/droplet:$SRS_TAG ccr.ccs.tencentyun.com/ossrs/droplet:$SRS_VERSION
docker tag ossrs/droplet:$SRS_TAG ccr.ccs.tencentyun.com/ossrs/droplet:v$SRS_MAJOR
docker tag ossrs/droplet:$SRS_TAG ccr.ccs.tencentyun.com/ossrs/droplet:$SRS_MAJOR
docker tag ossrs/droplet:$SRS_TAG ccr.ccs.tencentyun.com/ossrs/droplet:latest
#docker tag ossrs/droplet:$SRS_TAG ccr.ccs.tencentyun.com/ossrs/droplet:latest
docker push --all-tags ccr.ccs.tencentyun.com/ossrs/droplet
#
docker tag ossrs/lighthouse:$SRS_TAG ccr.ccs.tencentyun.com/ossrs/lighthouse:$SRS_TAG
docker tag ossrs/lighthouse:$SRS_TAG ccr.ccs.tencentyun.com/ossrs/lighthouse:$SRS_VERSION
docker tag ossrs/lighthouse:$SRS_TAG ccr.ccs.tencentyun.com/ossrs/lighthouse:v$SRS_MAJOR
docker tag ossrs/lighthouse:$SRS_TAG ccr.ccs.tencentyun.com/ossrs/lighthouse:$SRS_MAJOR
docker tag ossrs/lighthouse:$SRS_TAG ccr.ccs.tencentyun.com/ossrs/lighthouse:latest
#docker tag ossrs/lighthouse:$SRS_TAG ccr.ccs.tencentyun.com/ossrs/lighthouse:latest
docker push --all-tags ccr.ccs.tencentyun.com/ossrs/lighthouse
##################################################################################################################

@ -134,6 +134,7 @@ We are grateful to the community for contributing bugfix and improvements, pleas
## Releases
* 2022-02-09, Release [v4.0-b7](https://github.com/ossrs/srs/releases/tag/v4.0-b7), v4.0-b7, 4.0 beta7, v4.0.240, 144437 lines.
* 2022-02-04, Release [v4.0-b6](https://github.com/ossrs/srs/releases/tag/v4.0-b6), v4.0-b6, 4.0 beta6, v4.0.238, 144437 lines.
* 2022-01-30, Release [v4.0-b5](https://github.com/ossrs/srs/releases/tag/v4.0-b5), v4.0-b5, 4.0 beta5, v4.0.236, 144416 lines.
* 2022-01-17, Release [v4.0-b4](https://github.com/ossrs/srs/releases/tag/v4.0-b4), v4.0-b4, 4.0 beta4, v4.0.230, 144393 lines.

@ -32,6 +32,8 @@ The changelog for SRS.
## SRS 4.0 Changelog
* v4.0, 2022-02-09, Mirror docker images in TCR Singapore. v4.0.240
* v4.0, 2022-02-08, Refine the error for WebRTC H5 publisher. v4.0.239
* v4.0, 2022-02-04, Push docker to docker, acr and tcr. v4.0.238
* v4.0, 2022-02-03, Merge [#2888](https://github.com/ossrs/srs/pull/2888): Fix bug when the value of http header is empty. (#2888). v4.0.237
* v4.0, 2022-01-30, Refine docker console, preview by players at the same server. v4.0.236

@ -7,6 +7,14 @@
'use strict';
function SrsError(name, message) {
this.name = name;
this.message = message;
this.stack = (new Error()).stack;
}
SrsError.prototype = Object.create(Error.prototype);
SrsError.prototype.constructor = SrsError;
// Depends on adapter-7.4.0.min.js from https://github.com/webrtc/adapter
// Async-awat-prmise based SRS RTC Publisher.
function SrsRtcPublisherAsync() {
@ -48,7 +56,7 @@ function SrsRtcPublisherAsync() {
self.pc.addTransceiver("video", {direction: "sendonly"});
if (!navigator.mediaDevices && window.location.protocol === 'http:' && window.location.hostname !== 'localhost') {
throw new Error(`Please use HTTPS or localhost to publish, read https://github.com/ossrs/srs/issues/2762#issuecomment-983147576`);
throw new SrsError('HttpsRequiredError', `Please use HTTPS or localhost to publish, read https://github.com/ossrs/srs/issues/2762#issuecomment-983147576`);
}
var stream = await navigator.mediaDevices.getUserMedia(self.constraints);

@ -99,6 +99,25 @@ $(function(){
$('#sessionid').html(session.sessionid);
$('#simulator-drop').attr('href', session.simulator + '?drop=1&username=' + session.sessionid);
}).catch(function (reason) {
// Throw by sdk.
if (reason instanceof SrsError) {
if (reason.name === 'HttpsRequiredError') {
alert(`WebRTC推流必须是HTTPS或者localhost${reason.name} ${reason.message}`);
} else {
alert(`${reason.name} ${reason.message}`);
}
}
// See https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia#exceptions
if (reason instanceof DOMException) {
if (reason.name === 'NotFoundError') {
alert(`找不到麦克风和摄像头设备getUserMedia ${reason.name} ${reason.message}`);
} else if (reason.name === 'NotAllowedError') {
alert(`你禁止了网页访问摄像头和麦克风getUserMedia ${reason.name} ${reason.message}`);
} else if (['AbortError', 'NotAllowedError', 'NotFoundError', 'NotReadableError', 'OverconstrainedError', 'SecurityError', 'TypeError'].includes(reason.name)) {
alert(`getUserMedia ${reason.name} ${reason.message}`);
}
}
sdk.close();
$('#rtc_media_player').hide();
console.error(reason);

@ -9,6 +9,6 @@
#define VERSION_MAJOR 4
#define VERSION_MINOR 0
#define VERSION_REVISION 238
#define VERSION_REVISION 240
#endif

Loading…
Cancel
Save