Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mangui committed Mar 27, 2018
1 parent b7d29d4 commit b5fa8ae
Show file tree
Hide file tree
Showing 14 changed files with 81,780 additions and 78,434 deletions.
4,727 changes: 2,604 additions & 2,123 deletions docs/html/ast/source/controller/level-controller.js.json

Large diffs are not rendered by default.

139,939 changes: 70,124 additions & 69,815 deletions docs/html/ast/source/controller/stream-controller.js.json

Large diffs are not rendered by default.

13,711 changes: 7,825 additions & 5,886 deletions docs/html/ast/source/loader/playlist-loader.js.json

Large diffs are not rendered by default.

1,355 changes: 977 additions & 378 deletions docs/html/ast/source/utils/discontinuities.js.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -1917,7 +1917,7 @@ <h3 data-ice="anchor" id="instance-get-nextLoadLevel">
<span class="right-info">


<span data-ice="source"><span><a href="file/src/controller/level-controller.js.html#lineNumber391">source</a></span></span>
<span data-ice="source"><span><a href="file/src/controller/level-controller.js.html#lineNumber392">source</a></span></span>
</span>
</h3>

Expand Down Expand Up @@ -1960,7 +1960,7 @@ <h3 data-ice="anchor" id="instance-set-nextLoadLevel">
<span class="right-info">


<span data-ice="source"><span><a href="file/src/controller/level-controller.js.html#lineNumber398">source</a></span></span>
<span data-ice="source"><span><a href="file/src/controller/level-controller.js.html#lineNumber399">source</a></span></span>
</span>
</h3>

Expand Down Expand Up @@ -2309,7 +2309,7 @@ <h3 data-ice="anchor" id="instance-method-loadLevel">
<span class="right-info">


<span data-ice="source"><span><a href="file/src/controller/level-controller.js.html#lineNumber379">source</a></span></span>
<span data-ice="source"><span><a href="file/src/controller/level-controller.js.html#lineNumber380">source</a></span></span>
</span>
</h3>

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ <h1 data-ice="name">PlaylistLoader</h1>



<span class="code" data-ice="name"><span><a href="class/src/loader/playlist-loader.js~PlaylistLoader.html#instance-method-_handleNetworkError">_handleNetworkError</a></span></span><span class="code" data-ice="signature">(context: <span>*</span>, networkDetails: <span>*</span>)</span>
<span class="code" data-ice="name"><span><a href="class/src/loader/playlist-loader.js~PlaylistLoader.html#instance-method-_handleNetworkError">_handleNetworkError</a></span></span><span class="code" data-ice="signature">(context: <span>*</span>, networkDetails: <span>*</span>, timeout: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></span>)</span>
</p>
</div>
<div>
Expand Down Expand Up @@ -2669,7 +2669,7 @@ <h3 data-ice="anchor" id="instance-method-_handleNetworkError">



<span class="code" data-ice="name">_handleNetworkError</span><span class="code" data-ice="signature">(context: <span>*</span>, networkDetails: <span>*</span>)</span>
<span class="code" data-ice="name">_handleNetworkError</span><span class="code" data-ice="signature">(context: <span>*</span>, networkDetails: <span>*</span>, timeout: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></span>)</span>
<span class="right-info">


Expand Down Expand Up @@ -2704,6 +2704,13 @@ <h4 data-ice="title">Params:</h4>
<td data-ice="appendix"></td>
<td data-ice="description"></td>
</tr>
<tr data-ice="property" data-depth="0">
<td data-ice="name" class="code" data-depth="0">timeout</td>
<td data-ice="type" class="code"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></span></td>
<td data-ice="appendix"><ul><li>optional</li>
<li>default: false</li></ul></td>
<td data-ice="description"></td>
</tr>
</tbody>
</table>
</div>
Expand Down
126 changes: 63 additions & 63 deletions docs/html/coverage.json
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,9 @@
232,
334,
345,
379,
391,
398
380,
392,
399
]
},
"src/controller/stream-controller.js": {
Expand Down Expand Up @@ -330,69 +330,69 @@
371,
394,
437,
501,
513,
537,
546,
550,
554,
564,
574,
582,
590,
601,
621,
633,
636,
645,
723,
733,
735,
502,
514,
538,
547,
551,
555,
565,
575,
583,
591,
602,
622,
634,
637,
646,
724,
734,
736,
737,
746,
750,
771,
776,
823,
832,
838,
843,
847,
860,
864,
871,
904,
940,
947,
961,
996,
738,
747,
751,
772,
777,
824,
833,
839,
844,
848,
861,
865,
872,
905,
941,
948,
962,
997,
1014,
1083,
1156,
1170,
1180,
1201,
1205,
1220,
1229,
1242,
1253,
1264,
1272,
1292,
1347,
1358,
1393,
1396,
1459,
1470,
1484,
1488,
1493,
1497,
1498
998,
1015,
1084,
1157,
1171,
1181,
1202,
1206,
1221,
1230,
1243,
1254,
1265,
1273,
1293,
1348,
1359,
1394,
1397,
1460,
1471,
1485,
1489,
1494,
1498,
1499
]
},
"src/controller/subtitle-stream-controller.js": {
Expand Down
9 changes: 5 additions & 4 deletions docs/html/file/src/controller/level-controller.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,8 @@
let newDetails = data.details;
// if current playlist is a live playlist, arm a timer to reload it
if (newDetails.live) {
let reloadInterval = 1000 * (newDetails.averagetargetduration ? newDetails.averagetargetduration : newDetails.targetduration),
const targetdurationMs = 1000 * (newDetails.averagetargetduration ? newDetails.averagetargetduration : newDetails.targetduration);
let reloadInterval = targetdurationMs,
curDetails = curLevel.details;
if (curDetails &amp;&amp; newDetails.endSN === curDetails.endSN) {
// follow HLS Spec, If the client reloads a Playlist file and finds that it has not
Expand All @@ -496,9 +497,9 @@
}
// decrement reloadInterval with level loading delay
reloadInterval -= performance.now() - data.stats.trequest;
// in any case, don&apos;t reload more than every second
reloadInterval = Math.max(1000, Math.round(reloadInterval));
logger.log(`live playlist, reload in ${reloadInterval} ms`);
// in any case, don&apos;t reload more than half of target duration
reloadInterval = Math.max(targetdurationMs / 2, Math.round(reloadInterval));
logger.log(`live playlist, reload in ${Math.round(reloadInterval)} ms`);
this.timer = setTimeout(() =&gt; this.loadLevel(), reloadInterval);
} else {
this.cleanTimer();
Expand Down
3 changes: 2 additions & 1 deletion docs/html/file/src/controller/stream-controller.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,8 @@
if (!levelDetails.programDateTime) { // Uses buffer and sequence number to calculate switch segment (required if using EXT-X-DISCONTINUITY-SEQUENCE)
foundFrag = this._findFragmentBySN(fragPrevious, fragments, bufferEnd, end);
} else { // Relies on PDT in order to switch bitrates (Support EXT-X-DISCONTINUITY without EXT-X-DISCONTINUITY-SEQUENCE)
foundFrag = this._findFragmentByPDT(fragments, (bufferEnd * 1000) + (levelDetails.programDateTime ? Date.parse(levelDetails.programDateTime) : 0));
// compute PDT of bufferEnd: PDT(bufferEnd) = 1000*bufferEnd + PDT(start) = 1000*bufferEnd + PDT(level) - level sliding
foundFrag = this._findFragmentByPDT(fragments, (bufferEnd * 1000) + (levelDetails.programDateTime ? Date.parse(levelDetails.programDateTime) : 0) - 1000 * start);
}
} else {
// reach end of playlist
Expand Down
14 changes: 7 additions & 7 deletions docs/html/file/src/loader/playlist-loader.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,8 @@
return;
}

// Check if chunk-list or master
if (string.indexOf(&apos;#EXTINF:&apos;) &gt; 0)
// Check if chunk-list or master. handle empty chunk list case (first EXTINF not signaled, but TARGETDURATION present)
if (string.indexOf(&apos;#EXTINF:&apos;) &gt; 0 || string.indexOf(&apos;#EXT-X-TARGETDURATION:&apos;) &gt; 0)
this._handleTrackOrLevelPlaylist(response, stats, context, networkDetails);
else
this._handleMasterPlaylist(response, stats, context, networkDetails);
Expand All @@ -398,7 +398,7 @@
}

loadtimeout (stats, context, networkDetails = null) {
this._handleNetworkError(context, networkDetails);
this._handleNetworkError(context, networkDetails, true);
}

_handleMasterPlaylist (response, stats, context, networkDetails) {
Expand Down Expand Up @@ -539,23 +539,23 @@
});
}

_handleNetworkError (context, networkDetails) {
_handleNetworkError (context, networkDetails, timeout = false) {
let details;
let fatal;

const loader = this.getInternalLoader(context);

switch (context.type) {
case ContextType.MANIFEST:
details = ErrorDetails.MANIFEST_LOAD_TIMEOUT;
details = (timeout ? ErrorDetails.MANIFEST_LOAD_TIMEOUT : ErrorDetails.MANIFEST_LOAD_ERROR);
fatal = true;
break;
case ContextType.LEVEL:
details = ErrorDetails.LEVEL_LOAD_TIMEOUT;
details = (timeout ? ErrorDetails.LEVEL_LOAD_TIMEOUT : ErrorDetails.LEVEL_LOAD_ERROR);
fatal = false;
break;
case ContextType.AUDIO_TRACK:
details = ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT;
details = (timeout ? ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT : ErrorDetails.AUDIO_TRACK_LOAD_ERROR);
fatal = false;
break;
default:
Expand Down
2 changes: 1 addition & 1 deletion docs/html/file/src/utils/discontinuities.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@
}
}
// try to align using programDateTime attribute (if available)
if (details.PTSKnown === false &amp;&amp; lastLevel &amp;&amp; lastLevel.details) {
if (details.PTSKnown === false &amp;&amp; lastLevel &amp;&amp; lastLevel.details &amp;&amp; lastLevel.details.fragments &amp;&amp; lastLevel.details.fragments.length) {
// if last level sliding is 1000 and its first frag PROGRAM-DATE-TIME is 2017-08-20 1:10:00 AM
// and if new details first frag PROGRAM DATE-TIME is 2017-08-20 1:10:08 AM
// then we can deduce that playlist B sliding is 1000+8 = 1008s
Expand Down
Loading

0 comments on commit b5fa8ae

Please sign in to comment.