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

get conformance tests from telecom server (#357) #427

Merged
merged 2 commits into from
Jan 23, 2025
Merged

get conformance tests from telecom server (#357) #427

merged 2 commits into from
Jan 23, 2025

Conversation

aureliendavid
Copy link
Member

see #357 (comment)

Since I'm not a regular contributor to mp4box.js I'm doing this as a PR in case there are some objections to doing changing this.

@stefwalter
Copy link

It looks like this change is a step in the right direction. However, now when I try to run the test suite locally, I get the the following errors in my browser:

Access to XMLHttpRequest at 'https://download.tsi.telecom-paristech.fr/gpac/mp4box.js/mp4/h264bl.mp4' from origin 'http://0.0.0.0:8000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

I am running the test suite as: http://0.0.0.0:8000/test/qunit.html

I think in order to solve this we may need to add an Access-Control-Allow-Origin: * header to the gpac/mp4box.js/mp4 directory on download.tsi.telecom-paristech.fr WDYT?

@aureliendavid
Copy link
Member Author

I added the cors headers, can you retest now?

@stefwalter
Copy link

Yes that does the trick. I also needed to do this in order to get the tests to pass locally:

diff --git a/test/qunit-helper.js b/test/qunit-helper.js
index 0a90d64..2d8a7b8 100644
--- a/test/qunit-helper.js
+++ b/test/qunit-helper.js
@@ -1,5 +1,5 @@
 Log.setLogLevel(Log.error);
-var TIMEOUT_MS = 10000;
+var TIMEOUT_MS = 30000;
 var mediaTestBaseUrl = 'https://download.tsi.telecom-paristech.fr/gpac/mp4box.js/';
 
 function getFileRange(url, start, end, callback) {

Many tests routinely take more than 10000 milliseconds, and a couple > 20000 milliseconds. Obviously once the media files are in the browser's cache, the requests all result in a HTTP 304 Not Modified, and the tests run quickly.

@aureliendavid
Copy link
Member Author

thanks for testing, I added the bigger timeout to the PR

@rbouqueau
Copy link
Member

LGTM. Is it ready to merge?

@DenizUgur
Copy link
Member

I think this is okay, I was thinking about using FileFormatConformance for the tests but until then this should be enough.

@DenizUgur DenizUgur merged commit c48605a into master Jan 23, 2025
3 checks passed
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

Successfully merging this pull request may close these issues.

4 participants