rx-player 3.30.1-dev.2023032301 → 3.30.1-dev.2023032800
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/CHANGELOG.md +8 -2
- package/VERSION +1 -1
- package/dist/_esm5.processed/config.d.ts +2 -0
- package/dist/_esm5.processed/core/adaptive/adaptive_representation_selector.js +4 -2
- package/dist/_esm5.processed/core/adaptive/buffer_based_chooser.js +4 -4
- package/dist/_esm5.processed/core/adaptive/network_analyzer.js +8 -5
- package/dist/_esm5.processed/core/api/public_api.js +2 -2
- package/dist/_esm5.processed/core/init/media_source_content_initializer.js +6 -4
- package/dist/_esm5.processed/core/init/utils/content_time_boundaries_observer.d.ts +28 -1
- package/dist/_esm5.processed/core/init/utils/content_time_boundaries_observer.js +22 -9
- package/dist/_esm5.processed/core/init/utils/media_source_duration_updater.d.ts +58 -0
- package/dist/_esm5.processed/core/init/utils/{media_duration_updater.js → media_source_duration_updater.js} +71 -85
- package/dist/_esm5.processed/core/stream/orchestrator/stream_orchestrator.js +3 -3
- package/dist/_esm5.processed/default_config.d.ts +25 -0
- package/dist/_esm5.processed/default_config.js +27 -2
- package/dist/_esm5.processed/utils/is_null_or_undefined.d.ts +1 -1
- package/dist/_esm5.processed/utils/is_null_or_undefined.js +1 -1
- package/dist/rx-player.js +156 -115
- package/dist/rx-player.min.js +1 -1
- package/package.json +1 -1
- package/sonar-project.properties +1 -1
- package/src/core/adaptive/adaptive_representation_selector.ts +6 -2
- package/src/core/adaptive/buffer_based_chooser.ts +4 -4
- package/src/core/adaptive/network_analyzer.ts +9 -4
- package/src/core/api/public_api.ts +2 -2
- package/src/core/init/media_source_content_initializer.ts +7 -4
- package/src/core/init/utils/content_time_boundaries_observer.ts +46 -10
- package/src/core/init/utils/{media_duration_updater.ts → media_source_duration_updater.ts} +87 -111
- package/src/core/stream/orchestrator/stream_orchestrator.ts +4 -4
- package/src/default_config.ts +29 -2
- package/src/utils/is_null_or_undefined.ts +1 -1
- package/dist/_esm5.processed/core/init/utils/media_duration_updater.d.ts +0 -56
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2015 CANAL+ Group
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import Manifest from "../../../manifest";
|
|
17
|
-
/**
|
|
18
|
-
* Keep the MediaSource's duration up-to-date with what is being played.
|
|
19
|
-
* @class MediaDurationUpdater
|
|
20
|
-
*/
|
|
21
|
-
export default class MediaDurationUpdater {
|
|
22
|
-
private _canceller;
|
|
23
|
-
/**
|
|
24
|
-
* The last known audio Adaptation (i.e. track) chosen for the last Period.
|
|
25
|
-
* Useful to determinate the duration of the current content.
|
|
26
|
-
* `undefined` if the audio track for the last Period has never been known yet.
|
|
27
|
-
* `null` if there are no chosen audio Adaptation.
|
|
28
|
-
*/
|
|
29
|
-
private _currentKnownDuration;
|
|
30
|
-
/**
|
|
31
|
-
* Create a new `MediaDurationUpdater` that will keep the given MediaSource's
|
|
32
|
-
* duration as soon as possible.
|
|
33
|
-
* This duration will be updated until the `stop` method is called.
|
|
34
|
-
* @param {Object} manifest - The Manifest currently played.
|
|
35
|
-
* For another content, you will have to create another `MediaDurationUpdater`.
|
|
36
|
-
* @param {MediaSource} mediaSource - The MediaSource on which the content is
|
|
37
|
-
* pushed.
|
|
38
|
-
*/
|
|
39
|
-
constructor(manifest: Manifest, mediaSource: MediaSource);
|
|
40
|
-
/**
|
|
41
|
-
* By default, the `MediaDurationUpdater` only set a safe estimate for the
|
|
42
|
-
* MediaSource's duration.
|
|
43
|
-
* A more precize duration can be set by communicating to it a more precize
|
|
44
|
-
* media duration through `updateKnownDuration`.
|
|
45
|
-
* If the duration becomes unknown, `undefined` can be given to it so the
|
|
46
|
-
* `MediaDurationUpdater` goes back to a safe estimate.
|
|
47
|
-
* @param {number | undefined} newDuration
|
|
48
|
-
*/
|
|
49
|
-
updateKnownDuration(newDuration: number | undefined): void;
|
|
50
|
-
/**
|
|
51
|
-
* Stop the `MediaDurationUpdater` from updating and free its resources.
|
|
52
|
-
* Once stopped, it is not possible to start it again, beside creating another
|
|
53
|
-
* `MediaDurationUpdater`.
|
|
54
|
-
*/
|
|
55
|
-
stop(): void;
|
|
56
|
-
}
|