Does videoexport anyhow tunnel crossorigin XMLHttpRequest?

hi @jonathan @all :slight_smile: ,

i’ve got a hypefile with XMLHttpRequests. content is generated from json-files. if i preview it locally on a browser i get a crossorigin-message and it fails … as expected. exporting same file as video from within hype all the content is generated ¿¿¿

is this expected behaviour¿ or somehow related to our network¿
would be a interesting feature if it’s relyable … say producing dynamically generated videos e.g. for facebook …

edit: stitched together an example: (1.6 MB)

export this file to video and you’ll get the content … well, at least here :slight_smile:

I do not the the error on preview ? it maybe to do with I get two other errors,

[Log] Error in getJson: TypeError: Jetzt.getUTCDay is not a function. (In ‘Jetzt.getUTCDay()’, ‘Jetzt.getUTCDay’ is undefined) (HYPE-526.thin.min.js, line 14)


[Log] Error in placeArticles: ReferenceError: Can’t find variable: tmpArray (HYPE-526.thin.min.js, line 14).

So I may not be getting every thing in the display or video export…

I am seeing the same as @MarkHunte.

Also, let me know which browser you are using (the security policies slightly differ between them) and by preview locally, I assume you mean via Hype’s preview? If you are exporting and viewing as a file XMLHTTPRequest will definitely not work.

@MarkHunte @jonathan

thx for having a look. i updated the file in the post above, hope it’ll work now;-)

Guess my aim is not that clear :slight_smile: my fault :slight_smile:
I simply discovered the following:
my file has got a xmlHTTPRequest to an absolute url (https:/mydomain…/myfile.json)
normally! this should only work when uploaded to the server having the same domain.
so if i use the hypepreview on let’s say firefox no content will be loaded -> ok :slight_smile:

But!! if i use hypes videoexport the whole content will load so the video is fine.

My question:
why does it load? and is this common and relyable?

Best weekend :slight_smile:


Funny that it does work within Hype - probably the way our webview is setup makes it more relaxed about the security policies. All other browsers restrict it, which is the appropriate policy.

If the Hype document won’t be on the same server as your JSON data, you can look into JSONP as a workaround.

Could it be the webview is set to allow https.

If I put the editions.json file on my server which is http I do not get the domain error. ( Using Hype preview )

Obviously I get other errors as i do not have the other files :smile:

thx :slight_smile:

yes i know about jsonp, but it’s not necessary … just wondered about the videoexport

I get the same with the video export. All the content. Before your edit.

hi @DBear,

i found the videoexportfeature by accident and stitched together something not properly working as example … the function to get a acceptable date was (or still is :slight_smile: ) trash …

… gotcha :wink: