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

When loading a list of video files, firefox circular preloader crashes #37

Open
Qaaj opened this issue Dec 30, 2014 · 4 comments
Open

Comments

@Qaaj
Copy link

Qaaj commented Dec 30, 2014

Hi!

I'm trying to load a list of files, a couple of images and mostly videos (mp4 or webm). It's about 20 videos and loading in chrome is not a problem. There's a problem in firefox though, after loading about 17% of the assets, the preloader goes completely haywire (I'm using the circular loader example, just changed the files in the JSON file). It displays negative numbers like -5452592952 or so and then firefox crashes (windows + mac).

I thought this might be because my filesize in the JSON was too low and it caused an error in the calculations or something, so I made all video files 5% bigger in the JSON just to be sure but that didn't work. Any idea what might be causing this?

Here's how my JSON looks: http://pastebin.com/ta4KsXRA

Thanks a lot in advance!

@Qaaj
Copy link
Author

Qaaj commented Dec 30, 2014

Here's where it goes wrong:

File Loaded:../img/hovers/desk.png
jquery....ader.js (regel 121)
_bytesTotal = 60990
jquery....ader.js (regel 121)
_bytesLoaded = 9500
jquery....ader.js (regel 121)
Percentage: 16%
jquery....ader.js (regel 121)
File Loaded:../img/BA1_idle.jpg
jquery....ader.js (regel 121)
_bytesTotal = 60990
jquery....ader.js (regel 121)
_bytesLoaded = 9900
jquery....ader.js (regel 121)
Percentage: 16%
jquery....ader.js (regel 121)
File Loaded:../img/BA1_desk_idle.jpg
jquery....ader.js (regel 121)
_bytesTotal = 60990
jquery....ader.js (regel 121)
_bytesLoaded = 10340
jquery....ader.js (regel 121)
Percentage: 17%
jquery....ader.js (regel 121)
loading in progress file:../mov/exitposter.webm
jquery....ader.js (regel 121)
_bytesTotal = 60990
jquery....ader.js (regel 121)
_bytesLoaded = 10531.93857965451
jquery....ader.js (regel 121)
Percentage: 17%
jquery....ader.js (regel 121)
loading in progress file:../mov/exitshelf_mineral.webm
jquery....ader.js (regel 121)
_bytesTotal = 60990
jquery....ader.js (regel 121)
_bytesLoaded = -80422964.50812086

@Qaaj
Copy link
Author

Qaaj commented Dec 30, 2014

It seems that for webm in firefox, the value for this.buffered.end(0) is sometimes a big negative number.. hope that helps.

@Qaaj
Copy link
Author

Qaaj commented Dec 30, 2014

I managed to fix it by changing

bytesTmpLoaded = (size / this.duration) * this.buffered.end(0);

to

bytesTmpLoaded = size;

this gives it a less smooth loading progress but avoids the weird numbers and crashes. Maybe something to look into (webm + FF + buffered.end(0) don't play nice)

@jussi-kalliokoski
Copy link
Owner

Hmm, first of all, I'd file a bug against Firefox. Can you give me bit more specifics as to how big the files are in total and such?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants