mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
WHIP: Support DELETE resource for Larix Broadcaster. v5.0.148 v6.0.36 (#3427)
* WHIP: Support DELETE resource. * Support push by Larix. * FLV: Disable stash buffer for realtime. * WHEP: Fix muted issue. ------- Co-authored-by: chundonglinlin <chundonglinlin@163.com> Co-authored-by: panda <542638787@qq.com>
This commit is contained in:
parent
dfef94411f
commit
5cc794b22d
8 changed files with 98 additions and 61 deletions
|
@ -190,22 +190,6 @@
|
|||
return;
|
||||
}
|
||||
|
||||
// Start play HTTP-FLV.
|
||||
if (r.stream.indexOf('.flv') > 0) {
|
||||
if (!mpegts.getFeatureList().mseLivePlayback) {
|
||||
hide_for_error();
|
||||
return;
|
||||
}
|
||||
|
||||
show_for_ok();
|
||||
|
||||
flvPlayer = mpegts.createPlayer({type: 'flv', url: r.url, isLive: true});
|
||||
flvPlayer.attachMediaElement(document.getElementById('video_player'));
|
||||
flvPlayer.load();
|
||||
flvPlayer.play();
|
||||
return;
|
||||
}
|
||||
|
||||
// Start play HTTP-TS.
|
||||
if (r.stream.indexOf('.ts') > 0) {
|
||||
if (!mpegts.getFeatureList().mseLivePlayback) {
|
||||
|
@ -215,7 +199,7 @@
|
|||
|
||||
show_for_ok();
|
||||
|
||||
tsPlayer = mpegts.createPlayer({type: 'mpegts', url: r.url, isLive: true});
|
||||
tsPlayer = mpegts.createPlayer({type: 'mpegts', url: r.url, isLive: true, enableStashBuffer: false});
|
||||
tsPlayer.attachMediaElement(document.getElementById('video_player'));
|
||||
tsPlayer.load();
|
||||
tsPlayer.play();
|
||||
|
@ -246,6 +230,27 @@
|
|||
return;
|
||||
}
|
||||
|
||||
// Start play HTTP-FLV.
|
||||
let isFlv = r.stream.indexOf('.flv') > 0;
|
||||
// Compatible with NGINX-HTTP-FLV module, see https://github.com/winshining/nginx-http-flv-module and the stream
|
||||
// url without .flv, such as:
|
||||
// http://localhost:8080/live?app=live&stream=livestream
|
||||
isFlv = isFlv || r.stream && r.url.indexOf('http') === 0;
|
||||
if (isFlv) {
|
||||
if (!mpegts.getFeatureList().mseLivePlayback) {
|
||||
hide_for_error();
|
||||
return;
|
||||
}
|
||||
|
||||
show_for_video_ok();
|
||||
|
||||
flvPlayer = mpegts.createPlayer({type: 'flv', url: r.url, isLive: true, enableStashBuffer: false});
|
||||
flvPlayer.attachMediaElement(document.getElementById('video_player'));
|
||||
flvPlayer.load();
|
||||
flvPlayer.play();
|
||||
return;
|
||||
}
|
||||
|
||||
console.error('不支持的URL', r.url, r);
|
||||
$('#video_player').hide();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue