Skip to content

Commit

Permalink
fixed:httpflv/ws ignoreAudio problem
Browse files Browse the repository at this point in the history
  • Loading branch information
numberwolf committed Nov 25, 2021
1 parent 8930940 commit 6b7167d
Show file tree
Hide file tree
Showing 17 changed files with 26 additions and 22 deletions.
2 changes: 2 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,8 @@ ffmpeg -ss 20 -t 10 -i ./res/xinxiaomen.mp4 \

| 更新日志 | 内容 |
| ---- | ---- |
| 时间 | 2021/11/25 - 夜 |
| - | 0.修复 httpflv/ws直播 ignoreAudio配置失效问题 |
| 时间 | 2021/11/23 - 夜 |
| - | 0.修复 https://github.com/numberwolf/h265web.js/issues/90 |
| 时间 | 2021/11/21 - 凌晨 |
Expand Down
2 changes: 2 additions & 0 deletions README_EN.MD
Original file line number Diff line number Diff line change
Expand Up @@ -906,6 +906,8 @@ ffmpeg -ss 20 -t 10 -i ./res/xinxiaomen.mp4 \

| Update | Content |
| ---- | ---- |
| Time | 2021/11/25 - Night |
| - | 0.Fixed httpflv/ws LIVE ignoreAudio problem |
| Time | 2021/11/23 - Night |
| - | 0.Fixed https://github.com/numberwolf/h265web.js/issues/90 |
| Time | 2021/11/21 - In the small hours |
Expand Down

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* Github: https://github.com/numberwolf/h265web.js
*
**********************************************************/
require('./h265webjs-v20211123');
require('./h265webjs-v20211125');
export default class h265webjs {
static createPlayer(videoURL, config) {
return window.new265webjs(videoURL, config);
Expand Down
6 changes: 3 additions & 3 deletions example/dist/dist-play.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion example/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* Github: https://github.com/numberwolf/h265web.js
*
**********************************************************/
require('./h265webjs-v20211123');
require('./h265webjs-v20211125');
export default class h265webjs {
static createPlayer(videoURL, config) {
return window.new265webjs(videoURL, config);
Expand Down

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion example_normal/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* Github: https://github.com/numberwolf/h265web.js
*
**********************************************************/
require('./h265webjs-v20211123');
require('./h265webjs-v20211125');
export default class h265webjs {
static createPlayer(videoURL, config) {
return window.new265webjs(videoURL, config);
Expand Down
5 changes: 3 additions & 2 deletions example_normal/example.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ window.onload = function() {
// var url = "ws://127.0.0.1/live/test.live.ts";

/******** HTTP FLV/TS/HLS ********/
// var url = "http://127.0.0.1/live/test.flv";
var url = "http://127.0.0.1/live/test.flv";
// var url = "http://127.0.0.1/live/test.live.ts";
// var url = "http://127.0.0.1/live/test/hls.m3u8";
var config = {
Expand All @@ -87,7 +87,8 @@ window.onload = function() {
token : token,
extInfo : {
coreProbePart : 0.4,
probeSize : 8192
probeSize : 8192,
ignoreAudio : 0
}
}; // config
let playerId = config.player;
Expand Down
2 changes: 1 addition & 1 deletion example_normal/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<link rel="stylesheet" type="text/css" href='player-view/css/progress.css'>
<script src="dist/missile.js"></script> <!-- IMPORTANT -->
<!--<script src="dist/missile-256mb-v20211104.js"></script>--> <!-- wasm for 265mb memory(with grow) -->
<script src="dist/h265webjs-v20211123.js"></script> <!-- IMPORTANT -->
<script src="dist/h265webjs-v20211125.js"></script> <!-- IMPORTANT -->
<script src="example.js"></script> <!-- IMPORTANT -->
<style>
</style>
Expand Down
5 changes: 3 additions & 2 deletions src/src/decoder/c-httplive-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,10 @@ class CHttpLiveCoreModule { // export default
playerId: config.playerId || def.DEFAILT_WEBGL_PLAY_ID,
token: config.token || null,
probeSize: config.probeSize || 4096,
ignoreAudio : config.ignoreAudio || 0
}; // end this.config

alert("this.config.probeSize" + this.config.probeSize);
alert("this.config.probeSize" + this.config.probeSize + " ignoreAudio:" + this.config.ignoreAudio);

this.mediaInfo = {
noFPS : false,
Expand Down Expand Up @@ -340,7 +341,7 @@ class CHttpLiveCoreModule { // export default
}
} // end set canvas size

if (audioIdx >= 0 && this.mediaInfo.noFPS === false) {
if (audioIdx >= 0 && this.mediaInfo.noFPS === false && this.config.ignoreAudio < 1) {
if (undefined !== this.audioWAudio && null !== this.audioWAudio) {
this.audioWAudio.stop();
this.audioWAudio = null;
Expand Down
6 changes: 4 additions & 2 deletions src/src/decoder/c-wslive-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,10 @@ class CWsLiveCoreModule { // export default
playerId: config.playerId || def.DEFAILT_WEBGL_PLAY_ID,
token: config.token || null,
probeSize: config.probeSize || 4096,
ignoreAudio : config.ignoreAudio || 0
}; // end this.config

alert("this.config.probeSize" + this.config.probeSize);
alert("this.config.probeSize" + this.config.probeSize + " ignoreAudio:" + this.config.ignoreAudio);

this.mediaInfo = {
noFPS : false,
Expand Down Expand Up @@ -340,7 +341,8 @@ class CWsLiveCoreModule { // export default
}
} // end set canvas size

if (audioIdx >= 0 && this.mediaInfo.noFPS === false) {
if (audioIdx >= 0 && this.mediaInfo.noFPS === false && this.config.ignoreAudio < 1)
{
if (undefined !== this.audioWAudio && null !== this.audioWAudio) {
this.audioWAudio.stop();
this.audioWAudio = null;
Expand Down
2 changes: 0 additions & 2 deletions src/src/decoder/missile-256mb.js

This file was deleted.

2 changes: 0 additions & 2 deletions src/src/decoder/missile-512mb.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* Github: https://github.com/numberwolf/h265web.js
*
**********************************************************/
require('./h265webjs-v20211123');
require('./h265webjs-v20211125');
export default class h265webjs {
static createPlayer(videoURL, config) {
return window.new265webjs(videoURL, config);
Expand Down
2 changes: 1 addition & 1 deletion src/version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
# * Github: https://github.com/numberwolf/h265web.js
# *
# **********************************************************/
VERSION='v20211123' # output version + index.js
VERSION='v20211125' # output version + index.js

0 comments on commit 6b7167d

Please sign in to comment.