@flashphoner/websdk 2.0.250 → 2.0.252

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.
@@ -1,4 +1,4 @@
1
- Web SDK - 2.0.250
1
+ Web SDK - 2.0.252
2
2
 
3
3
  [Download builds](https://docs.flashphoner.com/display/WEBSDK2EN/Web+SDK+release+notes)
4
4
 
@@ -94,25 +94,77 @@ const playBtnClick = function() {
94
94
 
95
95
 
96
96
  const getHlsConfig = function(llHlsEnabled) {
97
+ // Timings for manifest download
98
+ let manifestLoadPolicy = {
99
+ default: {
100
+ maxTimeToFirstByteMs: Infinity,
101
+ maxLoadTimeMs: 20000,
102
+ timeoutRetry: {
103
+ maxNumRetry: 2,
104
+ retryDelayMs: 0,
105
+ maxRetryDelayMs: 0,
106
+ },
107
+ errorRetry: {
108
+ maxNumRetry: 1,
109
+ retryDelayMs: 1000,
110
+ maxRetryDelayMs: 8000,
111
+ },
112
+ }
113
+ };
114
+ // Timings for playlist download
115
+ let playlistLoadPolicy = {
116
+ default: {
117
+ maxTimeToFirstByteMs: Infinity,
118
+ maxLoadTimeMs: 20000,
119
+ timeoutRetry: {
120
+ maxNumRetry: 2,
121
+ retryDelayMs: 0,
122
+ maxRetryDelayMs: 0,
123
+ },
124
+ errorRetry: {
125
+ maxNumRetry: 2,
126
+ retryDelayMs: 1000,
127
+ maxRetryDelayMs: 8000,
128
+ },
129
+ }
130
+ };
131
+ // Timings for segment download
132
+ let fragLoadPolicy = {
133
+ default: {
134
+ maxTimeToFirstByteMs: Infinity,
135
+ maxLoadTimeMs: 20000,
136
+ timeoutRetry: {
137
+ maxNumRetry: 4,
138
+ retryDelayMs: 0,
139
+ maxRetryDelayMs: 0,
140
+ },
141
+ errorRetry: {
142
+ maxNumRetry: 6,
143
+ retryDelayMs: 1000,
144
+ maxRetryDelayMs: 8000,
145
+ },
146
+ }
147
+ };
97
148
  let config = {
98
149
  lowLatencyMode: false,
99
150
  enableWorker: true,
100
- backBufferLength: 90,
101
- manifestLoadingTimeOut: 15000
151
+ manifestLoadPolicy: manifestLoadPolicy,
152
+ playlistLoadPolicy: playlistLoadPolicy,
153
+ fragLoadPolicy: fragLoadPolicy
102
154
  };
103
155
  console.log("Low Latency HLS: " + llHlsEnabled)
104
156
  if(llHlsEnabled) {
105
157
  // Here we configure HLS.JS for lower latency
106
158
  config = {
107
- lowLatencyMode: llHlsEnabled,
108
- enableWorker: true,
109
- backBufferLength: 90,
110
- liveBackBufferLength: 0,
111
- liveSyncDuration: 0.5,
112
- liveMaxLatencyDuration: 5,
113
- liveDurationInfinity: true,
114
- highBufferWatchdogPeriod: 1,
115
- manifestLoadingTimeOut: 15000
159
+ lowLatencyMode: llHlsEnabled,
160
+ enableWorker: true,
161
+ liveSyncDuration: 0.5,
162
+ liveMaxLatencyDuration: 5,
163
+ liveDurationInfinity: true,
164
+ highBufferWatchdogPeriod: 1,
165
+ manifestLoadPolicy: manifestLoadPolicy,
166
+ playlistLoadPolicy: playlistLoadPolicy,
167
+ fragLoadPolicy: fragLoadPolicy
116
168
  };
117
169
  }
118
170
  return config;