fregante / iphone-inline-video

📱 Make videos playable inline on the iPhone (prevents automatic fullscreen)
https://npm.im/iphone-inline-video
MIT License
2.05k stars 300 forks source link

[Breaking] The script will not work when loaded from nginx because of the ಠ character #100

Closed gabrieli closed 7 years ago

gabrieli commented 7 years ago

I used your package (thanks for making it) as a dependency. When loading and serving the whole package from an nginx server, I get the following error in the console: "Uncaught SyntaxError: Invalid or unexpected token" pointing to var ಠ = Symbol(); which is actually malformed to var ಠ= Symbol().

The nginx is a fresh install following this guide: https://gist.github.com/netpoetica/5879685

It could potentially be nginx not liking that char, and a conf issue, but when this code will be served as a 3rd party, without me having control of the servers serving it.

On node it works fine.

Thanks!

fregante commented 7 years ago

You should serve the minified version which does not contain that character.

Your server should be configured to deliver UTF-8 files only.