Reputation: 4782
There are several sender apps that will use the same receiver, there is the need to generate/output some use stats and error reporting.
Can we implement an ajax POST/PUT in the receiver? This would be preferable as it centralizes all the logic in one end, avoiding duplication of code. Plus it's the receiver state that need to be sent to the service.
Upvotes: 1
Views: 552
Reputation: 7132
A Receiver is just an HTML5 app (HTML / Javascript / CSS). You can generally do whatever you like. Everyone's life is better if your custom receiver includes our recommended include, //www.gstatic.com/cast/sdk/libs/receiver/2.0.0/cast_receiver.js
and follows basic protocol. Once thats done, you can do what ever you want.
We anticipated that many developers will want to start activities using their sender, but get the next actions from a server. Server Queue's, and other uses are clearly desirable.
So, to answer your question, YES, you can implement POST / PUT in the receiver. You should be able to include any standard analytics, or logging systems you wish.
Upvotes: 5