karl-rousseau / HybridTvViewer

[WIP] Web extension making Firefox & Chrome emulate iTV webpages instead of downloading them.
MIT License
67 stars 25 forks source link

Dash.js in Chrome can't be loaded #8

Closed maxvb closed 6 years ago

maxvb commented 6 years ago

Hi,

thanks for developing this awesome plugin! It is a great help to us and we hope you will continue developing it.

Unfortunately we encountered one issue in chrome. Apparently chrome does not allow loading external js files and so the Dash.js player can't be loaded. In the chrome console get get this error:

Denying load of chrome-extension://kckknfffmadpohpni/https://cdn.dashjs.org/latest/dash.all.min.js. Resources must be listed in the web_accessible_resources manifest key in order to be loaded by pages outside the extension.

I fixed it for me by placing dash.js in the /js folder and updating all references to it. Of course it also has to be added to the web_accessible_resources in the manifest. However, I have no chrome plugin experience...

It would be great if you could update the plugin's security settings or change to a local version, so it works in chrome out of the box.

Thanks and keep up the good work!

karl-rousseau commented 6 years ago

Hello Maxvb,

Sorry to be late, I had some family tasks and thank you for the info about this issue. I have just fixed the missing URL in the manifest and the CDN external url is now properly checked.

You can test it with the MPEG-DASH (HbbTV 1.2.1) available on this page: http://itv.mit-xperts.com/hbbtvtest/videoformats/

I will try to better package the extension using webpack or another tool like this one. It will then be easier to integrate those external libraries (moreover I don't need the whole code behind them)

Best Regards

maxvb commented 6 years ago

Hi, thank you so much for fixing! Best regards Max