Start a new topic

Cannot rename viblast.js

When viblast.js is included with other code, or simply renamed (e.g. viblast-123.js) it fails to work properly. A request to 'http://localhost:3000/worker.html?viblast.remuxer.js' can also be seen (which does not happen when the viblast javascript is named viblast.js.

This is a pain for us as we like to compress all of our javascript into a single file.

Hi Theo,

Viblast uses the location of viblast.js to locate other resources it requires - viblast.remuxer.js, viblast.crypto.js. The resource has to be named viblast.js because there is no reliable way to locate the script src.

The reason why you see requests to 'http://localhost:3000/worker.html?viblast.remuxer.js' is the fact that viblast cannot determinate the domain of the viblast.js resource (because the resource has a different arbitrary name) and it assumes that it comes from a different domain than the domain of the current page and attempts to proxy the webworker (viblast.remuxer.js) through an iframe in order to circumvent restrictions imposed by the browser.

I hope this helps.

Would it be possible to package the remuxer and crypto into the same file so that there is no requirement to locate them? Or would it be possible to inject this configuration in some other form (data tag etc.)?

With Rails applications the asset pipeline is used, and I have to stick in some pretty nasty code to strip the digest added to a filename that is required for cache busting purposes.

Is there any update on this? It's not great having a library dictate how to serve Javascript.

Hi Theo,

It is very difficult for us at this point to pack the remuxer in the same file. 

As for the other possibility - We use the viblast.js path to determine where the remuxer and crypto.js are located. It is certainly possible to add a param to specify the path, but this requires some customization on our side. I think this will be a usable feature and we will add it to our road map.

Best regards,

Nikolay Dimitrov

We also need the feature to specify, where the remuxer.js is (or other dependency files are). We need it for our deployment process with require.js etc.

Best regards,

Benedict Endemann

Hi there,

As of Viblast Player release v.6.22 we introduced a support for a parameter to configure the location of viblast.remuxer.js. You can read about this parameter in our documentation and download the latest version here.

Login to post a comment