Error loading external js library


Im including the google cast external javascript library. When I run with ionic serve it works good, but when I run the app in the phone, the library is not loaded. Debugging can see that :

The “http” is replaced by “file”!
I tried to include the libraries with that code:

script src="//"></script
script src=“”></script
script src=“”></script

and with type=“text/javascript” added; but all codes replaces http by file, and the library is not loaded.

Any suggestions?