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 …
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)
and
[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…
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.
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 my fault
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
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?
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.
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 ) trash …