wargerm 0.4.25 → 0.4.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -11133,7 +11133,7 @@ function Xgplay(_ref, fRef) {
11133
11133
  var playerRef = useRef(null);
11134
11134
  useEffect(function () {
11135
11135
  if (ref.current) {
11136
- if ((type === null || type === void 0 ? void 0 : type.indexOf('hls')) !== -1) {
11136
+ if ((type === null || type === void 0 ? void 0 : type.indexOf('m3u8')) !== -1) {
11137
11137
  playerRef.current = new HlsJsPlayer(_objectSpread2({
11138
11138
  el: ref.current,
11139
11139
  width: '100%',
@@ -11150,7 +11150,19 @@ function Xgplay(_ref, fRef) {
11150
11150
  height: '100%',
11151
11151
  autoplay: true,
11152
11152
  isLive: true,
11153
- autoplayMuted: true
11153
+ autoplayMuted: true,
11154
+ flvOptionalConfig: {
11155
+ enableWorker: true,
11156
+ enableStashBuffer: false,
11157
+ stashInitialSize: 2048,
11158
+ lazyLoad: true,
11159
+ lazyLoadMaxDuration: 2 * 60,
11160
+ autoCleanupSourceBuffer: true,
11161
+ autoCleanupMaxBackwardDuration: 35 * 60,
11162
+ autoCleanupMinBackwardDuration: 30 * 60,
11163
+ reuseRedirectedURL: true //重用301/302重定向url,用于随后的请求,如查找、重新连接等
11164
+
11165
+ }
11154
11166
  }, config));
11155
11167
  setRef(playerRef.current);
11156
11168
  } else if ((type === null || type === void 0 ? void 0 : type.indexOf('mp4')) !== -1) {
package/dist/index.js CHANGED
@@ -11171,7 +11171,7 @@ function Xgplay(_ref, fRef) {
11171
11171
  var playerRef = React.useRef(null);
11172
11172
  React.useEffect(function () {
11173
11173
  if (ref.current) {
11174
- if ((type === null || type === void 0 ? void 0 : type.indexOf('hls')) !== -1) {
11174
+ if ((type === null || type === void 0 ? void 0 : type.indexOf('m3u8')) !== -1) {
11175
11175
  playerRef.current = new HlsJsPlayer__default['default'](_objectSpread2({
11176
11176
  el: ref.current,
11177
11177
  width: '100%',
@@ -11188,7 +11188,19 @@ function Xgplay(_ref, fRef) {
11188
11188
  height: '100%',
11189
11189
  autoplay: true,
11190
11190
  isLive: true,
11191
- autoplayMuted: true
11191
+ autoplayMuted: true,
11192
+ flvOptionalConfig: {
11193
+ enableWorker: true,
11194
+ enableStashBuffer: false,
11195
+ stashInitialSize: 2048,
11196
+ lazyLoad: true,
11197
+ lazyLoadMaxDuration: 2 * 60,
11198
+ autoCleanupSourceBuffer: true,
11199
+ autoCleanupMaxBackwardDuration: 35 * 60,
11200
+ autoCleanupMinBackwardDuration: 30 * 60,
11201
+ reuseRedirectedURL: true //重用301/302重定向url,用于随后的请求,如查找、重新连接等
11202
+
11203
+ }
11192
11204
  }, config));
11193
11205
  setRef(playerRef.current);
11194
11206
  } else if ((type === null || type === void 0 ? void 0 : type.indexOf('mp4')) !== -1) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "wargerm",
4
- "version": "0.4.25",
4
+ "version": "0.4.26",
5
5
  "scripts": {
6
6
  "dev": "dumi dev",
7
7
  "docs:build": "dumi build",
@@ -81,4 +81,4 @@
81
81
  "react": "^16.12.0",
82
82
  "yorkie": "^2.0.0"
83
83
  }
84
- }
84
+ }