Commit Graph

173 Commits

Author SHA1 Message Date
vlazh 13186bd403 feat: Add 'downloadcompleted' event (#7609)
Closes #7608
2024-11-18 08:41:24 +01:00
vlazh 0fc5316c5a fix: Calculate timeToFirstByte before fire the event 'downloadheadersreceived' (#7605)
Fixes #7604
2024-11-15 15:43:37 +01:00
Álvaro Velad Galván 6716ff00c4 fix: Avoid make HEAD request for image mime type (#7332) 2024-09-17 20:55:16 +02:00
Álvaro Velad Galván f5b78dc88a feat(Ads): Added advanced type to ad requests (#7196) 2024-08-23 12:34:44 +02:00
Wojciech Tyczyński d36ff6553c feat(net): Add minimum bytes for progress events (#7117)
By limiting progress events to only ones with minimal chunk size, we might end up with feeding better default ABR implementation, which should result in more accurate adaptation in case of network throttle.
2024-07-31 05:34:13 -07:00
Álvaro Velad Galván 8bb2d6e11a fix: Exclude fetch polyfill from fetch plugin (#6838)
This fix excludes the use of
https://www.npmjs.com/package/fetch-polyfill because it does not support
a signal to cancel requests in progress.
2024-06-17 11:35:45 +02:00
Wojciech Tyczyński 2f3a1ebf94 feat(DASH): add MPD_PATCH advanced request type (#6787)
Add `shaka.net.NetworkingEngine.AdvancedRequestType.MPD_PATCH` to
distinguish regular MPD requests from MPD Patch requests.
2024-06-11 10:56:14 +02:00
theodab 1cfb53e648 fix(preload): Copy net filters to preload manager (#6709)
Some assets might rely on networking engine filters (request and
response filters) to properly download their assets. However, the
preload manager's need to use a fresh networking engine also caused it
to not use any filters set on the player already. This changes the
process of setting up a preload manager, to make it copy over any
filters defined on the player's networking engine.

Fixes #6698
2024-05-30 12:45:12 +02:00
Álvaro Velad Galván 812163a986 fix: Fix numBytesRemaining when the request is done (#6653) 2024-05-23 04:16:50 +02:00
Álvaro Velad Galván dda713aa71 feat: Optionally force HTTP content URIs (#6649)
This may be necessary on older devices where not all certificates are
present.
2024-05-23 04:16:18 +02:00
Álvaro Velad Galván ed939872e1 feat: Add response URI to BAD_HTTP_STATUS error (#6561)
Closes https://github.com/shaka-project/shaka-player/issues/2969
2024-05-08 20:17:36 +02:00
Álvaro Velad Galván d532bf44c7 feat: Add bytesDownloaded to stats (#6469)
Closes https://github.com/shaka-project/shaka-player/issues/6413
2024-04-23 14:26:58 -07:00
Dave Nicholas 6c4333c565 feat(ABR): Additional request information for ABR Managers (#6313)
This PR makes the following request information available for ABR consideration. Allowing the ABR manager to know about the request latency from the time to first byte and knowing the order order of a packet, as well as the contentType of the request.
2024-03-06 12:15:38 -08:00
Álvaro Velad Galván 48626f2ae0 fix: Change quality only when adding the last partial segment and it is fast switching (#6114) 2024-01-18 08:31:06 +01:00
Rodolphe Breton b45877d17b fix: Improved HEAD request fail test when fallback-ing to GET request (#6044) 2024-01-08 15:23:35 +01:00
Álvaro Velad Galván 1af93e63ff fix: Provide a fallback to GET request when HEAD request fails (#5986)
Fixes https://github.com/shaka-project/shaka-player/issues/5959
2023-12-05 08:19:25 +01:00
Álvaro Velad Galván 42f491f782 feat(DASH): Add support for Content Steering (#5710)
Related to https://github.com/shaka-project/shaka-player/issues/5704
2023-11-09 08:34:09 +01:00
Álvaro Velad Galván c2c8320251 fix(Offline): Fix download of some HLS manifests (#5861) 2023-11-06 20:38:49 +01:00
Álvaro Velad Galván 508e5cfbba feat(DASH): Add initial support for "urn:mpeg:dash:ssr:2023" (#5762) 2023-11-03 14:57:15 +01:00
Álvaro Velad Galván be96fd0a2b feat(net): Add shaka.net.NetworkingUtils (#5756) 2023-10-09 23:08:08 -07:00
Álvaro Velad Galván cf5a72bb51 feat(Ads): Add support for AWS Elemental MediaTailor (#5679) 2023-09-28 09:55:26 +02:00
Joey Parrish 330f04b76f fix: Fix HEAD request exception (#5194)
We should not look for response data in a HEAD request.

Fixes #5164
2023-04-27 07:24:02 +02:00
theodab 51554934be fix(net): Fix HEAD requests in new Chromium (#5180)
This makes it so that we no longer try to download the body of a head
response, in the http fetch plugin. This is necessary due to an upcoming
change to Chromium, where the body object of such responses is null.

Fixes #5164
2023-04-25 15:56:37 -07:00
Casey Occhialini 93baba20a1 fix: stream property of request context obfuscated in production builds (#5118)
Co-authored-by: Dan Sparacio <daniel.sparacio@cbsinteractive.com>
2023-03-23 21:45:40 +01:00
Casey Occhialini fe38e45f4d fix: Adds missing CMCD params to some http requests (#5072)
Fixes #5067
Fixes #5094

Co-authored-by: Dan Sparacio <daniel.sparacio@cbsinteractive.com>
2023-03-15 02:13:16 -07:00
Álvaro Velad Galván 36bcc3775a fix: Fix fetch plugin with old implementations (#5091)
Fixes https://github.com/shaka-project/shaka-player/issues/5088
2023-03-14 19:12:56 +01:00
theodab fbce38af1c feat(net): Added advanced type to filters (#5006)
This adds an optional parameter to request and response filters, of a
new enum called AdvancedRequestType.
This enum describes request types that are subtypes of the basic types.
For example, INIT_SEGMENT is a type of SEGMENT.
This gives users more information about the type of the request, while
maintaining backwards compatibility.

Closes #4966
2023-02-23 11:56:23 -08:00
theodab 6194021a3d feat(hls): Support AES-128 in HLS (#4386)
Expands on the original PR (#3880) by adding support for MP4 and key rotation.

Close #850

Co-authored-by: wjywbs <wjywbs@users.noreply.github.com>
2022-08-12 10:50:32 -07:00
Álvaro Velad Galván bdc5ea767e feat(DRM): add initData and initDataType to license requests (#4039)
Adds initData and initDataType field to all LICENSE-type requests.

Based on comments here: https://github.com/shaka-project/shaka-player/issues/4001#issuecomment-1050655197
2022-03-21 09:49:49 -07:00
Álvaro Velad Galván abe846e1a3 feat(DRM): add drmInfo to license requests (#4030)
Adds drmInfo field to all LICENSE-type requests.

Based on comments here: https://github.com/shaka-project/shaka-player/issues/4001#issuecomment-1050655197
2022-03-16 11:10:33 -07:00
Joey Parrish 1507b1e844 chore: Update URLs after moving projects (#4008) 2022-03-03 14:34:40 -08:00
Joey Parrish f1c1585afb fix: Add explicit release() for FakeEventTarget (#3950)
Before, we would count on all event listeners for FakeEventTargets to
be cleaned up by the object that listens.  Now, FakeEventTarget
implements IReleasable, so that all listeners are removed when owners
call release().

For objects extending FakeEventTarget and also implementing
IDestroyable, the destroy() methods will call out to super.release()
to clean up listeners then.  The owner should use destroy() in those
cases.

Issue #3949 (memory leak in DASH live streams with inband EventStream)
2022-02-15 12:06:26 -08:00
Theodore Abshire dd3748d599 fix: Enforce string-format of event data keys.
Previously, many events were being defined with a data dictionary
that used variable-type keys (e.g. {key: value}). This worked fine
in uncompiled mode, but in compiled mode it lead to those properties
being obfuscated.
This changes the FakeEvent constructor to take a map rather than an
object, so the compiler will force the keys to be strings.

Closes #3710

Change-Id: I67b1a391540a5ee21f0aaf940ae054d26f4c10a4
2021-10-25 12:40:32 -07:00
Pavelas 27015278cd feat(net): Add response HTTP status to Networking engine responses (#3641)
Closes #3640
2021-09-16 11:50:13 -07:00
Álvaro Velad Galván 6a032078e9 Feat: Add blob-url support (#3583)
Issue #1481
2021-08-19 06:04:55 -07:00
Theodore Abshire 7893b7733b Feat(player): Added events for download lifecycle.
This adds two new player events, 'downloadheadersreceived' and
'downloadfailed', to allow users to measure network performance
in greater detail.

Issue #3533

Change-Id: I33a3bd411d815e926d4bea2184e8d3ea69e2bb49
2021-07-29 18:47:24 +00:00
Percy Tse f09616fb41 fix(LL-DASH): Append segment chunk strictly in order (#3405)
An async process handles the appending of partial segments for LL-DASH.  This fixes the caller to wait on the results, so that partial segments are always appended in order.

Fixes #3404
2021-05-17 10:00:28 -07:00
Vincent Valot 9b4502cc5d feat: add serverCertificateUri in DRM advanced config (#3358)
Fixes #1906
2021-05-03 10:53:31 -07:00
Michelle Zhuo 95ba28b5af refactor: Remove IE 11 support
Issue #2339

Change-Id: I80ffa7b04f7afd943aa0f881d2a494dd35def732
2021-04-29 17:47:07 +00:00
Álvaro Velad Galván 463b1b6886 Remove support for IE 11 (#3309)
Issue #2339
2021-04-16 13:59:35 -07:00
Álvaro Velad Galván 863e3455b6 feat: Network stall detection (#3227)
Closes: #1582
2021-03-30 13:35:41 -07:00
Álvaro Velad Galván 40a0b366f6 feat: Change default network request timeout (#3024)
The old default was 0 (effectively infinite, no timeout).  The new default is 30s.

Closes: #1578
2020-12-17 11:02:15 -08:00
Álvaro Velad Galván 207c235b1c feat: Optionally force HTTPS content URIs (#3025)
Closes: #1389
2020-12-17 10:59:15 -08:00
michellezhuo ce7528ea0e build: add goog.requireType for compiler upgrade
Change-Id: Ibdca83fcbc3f8637c09c2cabfeaaea173850a553
2020-10-05 19:57:57 +00:00
Michelle Zhuo 40d0359732 feat(LL-Dash): Parse and append ReadableStream by MP4 boxes
To enable low latency streaming, we need to append chunked data of
ReadableStream by complete MP4 boxes.
Everytime we get chunked data of the ReadableStream, we find the
last complete Mdat box. Append the completed boxes of data, and save
the data of the incomplete box until next time we get the chunked
data.

Issue #1525

Change-Id: I722ff992f397ee2f62bca45db33a0834ef57a270
2020-09-16 13:18:03 -07:00
Michelle Zhuo f67367a81b feat(LL-Dash): Fetch and append ReadableStream
With the low latency streaming mode, we fetch a segment, and get the
response data through a ReadableStream.
For each segment request, we may get multiple chunked data. We handle
and append the chunked data of the ReadableStream via a callback
function in the StreamingEngine.
Once the whole segment gets handled and appended, we move on to the
next segment.

Issue #1525

Change-Id: I7949c87f4e491c928919c2e9dc4dafbebac22c9b
2020-09-16 20:17:02 +00:00
michellezhuo e7965fe219 feat(LL-HLS):Set segment availability duration
When starting playback for HLS live, we have the availability window
same as the delay duration from live edge. Thus, the playback start time
is the same as availability window start, and falls behind the window as
the window keeps move forward.
This may cause the seeked partial segments to be unavailable.

To make our system more robust, we can skip checking if the segment fits
in the availability window. Instead, we can send the request anyway. If
the segment is not available, we can handle the 404 error and try to fetch
the segment again.
This would not require us to calculate the segment availability window
in advance.

Issue #1525

Change-Id: Ib9c0eca8e9db2d93404745d87a5171fcb5fdce20
2020-08-20 19:03:34 +00:00
Joey Parrish 5a0383585f fix: Fix data URI parsing when charset present
Data URIs can have additional parameters other than just the MIME type
and encoding.  While working on TTML fixes, I was debugging by
inserting data URIs as TTML text tracks.  But the data URI encoder I
used was inserting a "charset" parameter into the URI, which was
rejected by Shaka Player.

This fixes the data URI parser to understand these extra parameters.

While researching this fix, I also found that only the base64 encoding
is specified for data URIs.  So now only that specific parameter is
supported as an encoding, and the UNKNOWN_DATA_URI_ENCODING error code
has been retired.

Change-Id: I7022529b0931e80a77a1120fc86c25b42e1fb3d9
2020-08-04 21:48:12 +00:00
Jacob Trimble dc8b007d56 cleanup: Add missing requires.
This is a port of the internal changes: cr/321495405, cr/321592702,
and cr/321594488.

Change-Id: If6a4c4266ed10a70b01442974dbd19329bb5122e
2020-07-16 10:59:49 -07:00
Joey Parrish f539147d48 fix: Correct license headers in compiled output
This fixes all the license headers in the main library, which corrects
the appearance of the main license in the compiled output.

It seems that the `!` in the header forces the compiler to keep it in
the output.  I believe older compiler releases did this purely based
on `@license`.

Issue #2638

Change-Id: I7f0e918caad10c9af689c9d07672b7fe9be7b2f3
2020-06-09 16:05:09 -07:00