Comments (3)
var fetchPromise = utils.fetch('playlist.rss');
fetchPromise.then(handleRSS);
from jwplayer.
Fetch API Streaming Response Sample (Available in Chrome 43+)
https://googlechrome.github.io/samples/fetch-api/fetch-response-stream.html
fetch(url).then(function (res) {
var contentLength = res.headers.get('Content-Length');
var reader = res.body.getReader();
// Might need to read() multiple times to get all chunks?
reader.read().then(function (result) {
if (result.done) {
// handle complete
return;
}
// handle progress
var chunk = result.value;
soFar += chunk.byteLength;
});
// OR cancel fetch
reader.cancel();
})
.catch(function (e) {
// handle error
});
XHR pseudo-streaming xhr.addEventListener('progress', ...)
could be a fallback for text only content.
from jwplayer.
Ajax refactor is complete. Fetch util could use more work but isn't required for anything at this point.
from jwplayer.
Related Issues (20)
- Update documentation about removing grunt
- İos video quality change problem HOT 5
- JW Player Web: Accessing hlsjs provider or listening to hls.js events HOT 4
- "Remote WebView debugging is enabled" reported by MobSf
- Embedded JW Player causes CLS (only when it autoplays)
- JW Player Web 8.26.7 (8.27.0 tested as well) iOS 16.5 cropping responsive player HOT 6
- I want the video to fit the screen perfectly how can I do it? HOT 2
- how to make fullscreen icon disable HOT 2
- Ready event called before plugin div is inserted
- Force use hls.js on safari?
- Web Player: impossible to know when chapters' cues are added
- Implement a mechanism to offset/sync captions
- Allow pausing playback in 'complete' event
- Video and Audio selector buttons
- JwPlayer 8 does not display the correct quality
- 403 jwplayer6/ping.gif
- Right Click menu might overflow viewport
- Error when using sources: Cannot add property default, object is not extensible HOT 1
- Web Player: controls hidden when cast is available
- [Mac:Chrome] player controls are hidden backside of video in drm stream
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jwplayer.