Skip to content

Commit

Permalink
感冒lia......
Browse files Browse the repository at this point in the history
  • Loading branch information
numberwolf committed Nov 16, 2021
1 parent da1baca commit 3a0a58e
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 28 deletions.
14 changes: 8 additions & 6 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<a href="README.MD">中文</a> | <a href="README_EN.MD">English</a>

<hr>
<img src="./resource/[email protected]" width="300px" />
<img src="./resource/[email protected]" height="250px" />
<a href="./resource/demo.png">
<img src="./resource/demo.png" height="300px" />
<img src="./resource/demo.png" height="220px" />
</a>
<hr>
一个可支持HEVC/H.265编码播放360P、480P、540P、720P、1080P的HEVC播放器
Expand All @@ -21,7 +21,7 @@
| HLS(LIVE) | MP4(VOD) | FLV(VOD) | MPEG2 TS(VOD) |
| <img src="resource/icon-hls.png" height="100"> | <img src="resource/icon-mp4.png" height="100"> | <img src="resource/icon-flv.png" height="100"> | <img src="resource/icon-ts.png" height="100"> |
| M3u8(VOD) | HTTP FLV(LIVE) | G711A | HDR10(BT2020) |
| <img src="resource/icon-m3u8.png" height="100"> | <img src="resource/icon-httpflv.png" height="100"> | @TODO | @TODO Support - <br>Before 2021/10/31 |
| <img src="resource/icon-m3u8.png" height="100"> | <img src="resource/icon-httpflv.png" height="100"> | @TODO - <br>我最近感冒了,暂缓 | @TODO Support - <br>我最近感冒了,暂缓 |

<br>

Expand All @@ -45,6 +45,8 @@

## 目录

- [更新日志](#更新日志)

- [0-说明](#0-说明)

- [当前能力](#当前能力)
Expand Down Expand Up @@ -123,8 +125,6 @@

- [FFmpeg转码265编码的视频](#ffmpeg转码265编码的视频)

- [更新日志](#更新日志)

<hr>

### 0 说明 ###
Expand Down Expand Up @@ -895,10 +895,12 @@ ffmpeg -ss 20 -t 10 -i ./res/xinxiaomen.mp4 \

<br>

### 更新日志 ###
# 更新日志 #

| 更新日志 | 内容 |
| ---- | ---- |
| 时间 | 2021/11/16 - 晚 |
| - | 0.视频流首次请求无数据返回则进行重试5次 |
| 时间 | 2021/11/15 - 晚 |
| - | 0.HTTP-FLV直播断流retry重试 7s一次 |
| 时间 | 2021/11/14 - 晚 |
Expand Down
14 changes: 8 additions & 6 deletions README_EN.MD
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<a href="README.MD">中文</a> | <a href="README_EN.MD">English</a>

<hr>
<img src="./resource/[email protected]" width="300px" />
<img src="./resource/[email protected]" height="250px" />
<a href="./resource/demo.png">
<img src="./resource/demo.png" height="300px" />
<img src="./resource/demo.png" height="220px" />
</a>
<hr>

Expand All @@ -21,7 +21,7 @@ A hevc/h.265 web player, easy to play 1080P. `~^_^~ For love` if <a href="https:
| HLS(LIVE) | MP4(VOD) | FLV(VOD) | MPEG2 TS(VOD) |
| <img src="resource/icon-hls.png" height="100"> | <img src="resource/icon-mp4.png" height="100"> | <img src="resource/icon-flv.png" height="100"> | <img src="resource/icon-ts.png" height="100"> |
| M3u8(VOD) | HTTP FLV(LIVE) | G711A | HDR10(BT2020) |
| <img src="resource/icon-m3u8.png" height="100"> | <img src="resource/icon-httpflv.png" height="100"> | @TODO | @TODO Support - <br>Before 2021/10/31 |
| <img src="resource/icon-m3u8.png" height="100"> | <img src="resource/icon-httpflv.png" height="100"> | @TODO - <br> I get cold recently, so I am not sure upgrade on which time | @TODO Support - <br> I get cold recently, so I am not sure upgrade on which time |

| h265web.js | mpeg.js `(ts demuxer)` | h265web.js's H.265 decoder | LICENSE |
| ---- | ---- | ---- | ---- |
Expand All @@ -45,6 +45,8 @@ Notice:

## Index

- [Update Log](#upldatelog)

- [0、README](#0readme)

- [Support what?](#supported)
Expand Down Expand Up @@ -123,8 +125,6 @@ Notice:

- [Transcode and get HEVC/H.265 media file by ffmpeg](#transcodeandget265codecfilebyffmpeg)

- [Update Log](#upldatelog)

<hr>

### 0、README ###
Expand Down Expand Up @@ -885,10 +885,12 @@ ffmpeg -ss 20 -t 10 -i ./res/xinxiaomen.mp4 \

<br>

### UpldateLog ###
# UpldateLog #

| Update | Content |
| ---- | ---- |
| Time | 2021/11/16 - Evening |
| - | 0.First request, if no response and timeout, then retry 5 times |
| Time | 2021/11/15 - Evening |
| - | 0.HTTP-FLV auto retry when timeout with out packet.(7s) |
| Time | 2021/11/14 - Evening |
Expand Down
2 changes: 1 addition & 1 deletion dist/h265webjs-v20211116.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion example/dist/dist-play.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion example/dist/h265webjs-v20211116.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion example_normal/dist/h265webjs-v20211116.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/src/consts.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ module.exports = {
PLAYER_CORE_TYPE_DEFAULT: 0, // 默认播放器
PLAYER_CORE_TYPE_CNATIVE: 1, // 包括demuxer decoder全部走C FFmpeg Native的

FETCH_FIRST_MAX_TIMES: 5,
FETCH_HTTP_FLV_TIMEOUT_MS: 7 * 1000,

V_CODEC_NAME_HEVC : 265,
Expand Down
25 changes: 13 additions & 12 deletions src/src/h265webjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -1378,25 +1378,26 @@ class H265webjsModule {
let fetchGetResp = false;
let fetchFin = false;
let fileSize = 0;
// setTimeout(function() {
// if (fetchGetResp === false) {
// console.warn("start retry");
// controller.abort();
// }
// }, def.FETCH_HTTP_FLV_TIMEOUT_MS);
// let controller = new AbortController();
// let signal = controller.signal;

let fetchFuncInner = function() {
let fetchFuncInner = function(times) {
setTimeout(function() {
if (fetchGetResp === false) {
console.warn("start retry");

controller.abort();
controller = null;
signal = null;

if (times >= def.FETCH_FIRST_MAX_TIMES) {
console.warn("stop retry", times);
return;
}

console.warn("start retry", times);

controller = new AbortController();
signal = controller.signal;
fetchFuncInner();
let newTimes = times + 1;
fetchFuncInner(newTimes);
}
}, def.FETCH_HTTP_FLV_TIMEOUT_MS);

Expand Down Expand Up @@ -1471,7 +1472,7 @@ class H265webjsModule {
}); // end fetch
}; // end fetchFuncInner

fetchFuncInner();
fetchFuncInner(0);

} // _cDemuxDecoderEntry

Expand Down

0 comments on commit 3a0a58e

Please sign in to comment.