3

I am trying to run the default receiver application provided on https://developers.google.com/cast/docs/caf_receiver_basic#google_caf_receiver_sdk_google-caf-receiver-sdk. When I attempt to load the receiver in my Chrome 65 it throws errors in the console: r_new.html:4 GET file://www.gstatic.com/cast/sdk/libs/caf_receiver/v3/cast_receiver_framework.js net::ERR_FILE_NOT_FOUND

r_new.html:10 Uncaught ReferenceError: cast is not defined at r_new.html:10 (anonymous) @ r_new.html:10

I am aware of the protocol // agnostic URL. If I change it to https://, it loads the first script and then fails on the rest. This may be a security or developer issue, but I am not sure how to correct it.

UPDATE

After using node http-server (https://www.npmjs.com/package/http-server) and the following instructions https://stackoverflow.com/a/44058453/3997521 to successfully generate a cert for my localhost server on Chrome 65 OSX: http-server -S -C MyCompanyLocalhost.cer -K MyCompanyLocalhost.pvk -o

Notes: Don't forget to install MyCompanyCA.cer as well to match and restart chrome and it will take the cert.

I still get the following error even when the page loads properly with the index.html file:

Uncaught TypeError: Cannot read property 'setTouchInputSupport' of undefined at Object.cast.receiver.platform.setTouchInputSupport (cast_receiver_framework.js:81) at Af (cast_receiver_framework.js:116) at T.start (cast_receiver_framework.js:483) at localhost/:10

UPDATE 2: results for windows same properly provisioned cert

receiver.html:63 Starting receiver application cast_receiver.js:89 [ 0.000s] [cast.receiver.IpcChannel] Opening net websocket cast_receiver.js:89 [ 0.003s] [cast.receiver.CastReceiverManager] Version: 2.0.0.0061 cast_receiver.js:89 [ 0.005s] [cast.receiver.MediaManager] Using default Player receiver.html:68 Starting receiver manager cast_receiver.js:115 Uncaught TypeError: Cannot read property 'setTouchInputSupport' of undefined at te (cast_receiver.js:115) at N.start (cast_receiver.js:97) at receiver.html:82

UPDATE 3: tried on a live server with a real provisioned cert Chrome 66 Windows

cast.receiver.platform.setTouchInputSupport @ cast_receiver_framework.js:81 Af @ cast_receiver_framework.js:116 T.start @ cast_receiver_framework.js:483 (anonymous) @ reciever.html:10

petrosmm
  • 528
  • 9
  • 23

2 Answers2

0

Are you sure you didn't make a typo? Try using localhost. If you do decide to use localhost, then you will need a server running. When your server is running, copy this example:

localhost/myfiles/yourfile.yourcode

kodingkid
  • 1
  • 3
0

I have never seen this error, and in April this error popped up. It looks like google added some codes to check platform. Ref to news goole first change chromecast prevent amazon

This error would block castManager to start ws connection on localhost:8008 In real chromecast, it would be okay without this error.

Huaiyuan
  • 11
  • 2
  • If what you are saying is true, then does that mean the Chromecast receiver demo would still show as discoverable by any devices looking to cast? – petrosmm May 08 '18 at 13:39