Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefer Fetch API over XHR #829

Closed
joeyparrish opened this issue May 25, 2017 · 6 comments
Closed

Prefer Fetch API over XHR #829

joeyparrish opened this issue May 25, 2017 · 6 comments
Assignees
Labels
status: archived Archived and locked; will not be updated type: enhancement New feature or request
Milestone

Comments

@joeyparrish
Copy link
Member

We should prefer the Fetch API whenever possible. It looks like that's everywhere but IE 11 right now:
http://caniuse.com/#feat=fetch

@joeyparrish joeyparrish added the type: enhancement New feature or request label May 25, 2017
@joeyparrish joeyparrish added this to the v2.2.0 milestone May 25, 2017
@theodab theodab self-assigned this Jun 2, 2017
@joeyparrish joeyparrish modified the milestones: v2.2.0, v2.3.0 Jun 6, 2017
@joeyparrish
Copy link
Member Author

Note: @theodab has discovered that Fetch is missing timeout/abort functionality that would bring it to parity with XHR. This means we will not always be able to use Fetch.

See whatwg/fetch#20 and whatwg/fetch#447.

@theodab
Copy link
Collaborator

theodab commented Sep 8, 2017

As an update...
It looks like they have finally settled on a design for aborting fetches.
The AbortController has been implemented but not flighted on Edge, Mozilla has an implementation in 55+ nightly, and Chrome is planning on adding it soon. So it might not be too long till we can use Fetch.

@joeyparrish
Copy link
Member Author

Thanks for the update!

@joeyparrish joeyparrish modified the milestones: v2.3.0, v2.4.0 Oct 3, 2017
shaka-bot pushed a commit that referenced this issue Nov 3, 2017
This modified the networking engine to store every plugin it is given
for a scheme, and adds a priority system to pick which of the plugins
to use.

Issue #829

Change-Id: I21a8a534383f2be898160d609d77efecfc2b684b
@joeyparrish joeyparrish modified the milestones: v2.4.0, Backlog Dec 4, 2017
shaka-bot pushed a commit that referenced this issue Jan 29, 2018
This adds a general interface for abortable operations, and a specific
implementation of that interface for use internally.  This should
simplify the transition to abortable network requests and others.

Issue #829

Change-Id: Icf54e23028f7454640f5ec76ca97d8a8ed5915ed
shaka-bot pushed a commit that referenced this issue Jan 29, 2018
This uses AbortableOperation in all networking, from the scheme
plugins all the way to the request interface.

This also updates all default scheme plugins, docs, and sample code.

Backward compatibility is provided for scheme plugins and the
request API in NetworkingEngine.  This compatibility will be
removed in v2.5.

Two cancelation-related tests have been disabled in
player_integration until the new abort interface has been adopted
in the manifest parsers.

Issue #829

Change-Id: I91c8e6efe97798d111e8ddca5655cddc1f6bcbf3
shaka-bot pushed a commit that referenced this issue Jan 29, 2018
Issue #829

Change-Id: I07f29274227af8bd9abc8e907784557ed85c4552
shaka-bot pushed a commit that referenced this issue Jan 29, 2018
This adds OperationManager to HLS and DASH parsers to allow them to
abort and clean up network operations when stopped.  We now re-enable
the player integration tests that were written to prove the previous
polling-based cancelation model.

Issue #829

Change-Id: Id09df6e3f2f40eef614d9e597d35f43a50e1673e
shaka-bot pushed a commit that referenced this issue Jan 29, 2018
This is a regression test for an implementation bug we caught before
it was released.  It took a little longer to get the regression test
working, so this was deferred to a later commit.

Issue #829

Change-Id: I272ebe0e6fa2f0ac462c3a3d236250242f7d7192
@theodab
Copy link
Collaborator

theodab commented Feb 8, 2018

We now have a fetch request scheme plugin. Note that, because this requires both the fetch API and the AbortController API, as of this moment it will only be used on Firefox and Edge.

@joeyparrish
Copy link
Member Author

Chrome implementation bug: https://bugs.chromium.org/p/chromium/issues/detail?id=750599

It looks like some or all of the implementation of AbortController landed in Chrome early this week. I haven't talked to Chrome team to confirm, but I expect it would launch in Chrome 66, due out in late April.

@shaka-project shaka-project locked and limited conversation to collaborators Apr 9, 2018
@joeyparrish
Copy link
Member Author

This feature will be out in v2.4 this week.

@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants