CaaS
CaaS (Cast as a Service) will handle the CastContext. It is recommend to access cast-related operations via CaaS. CaaS provides setup function to initialize media route button, and cast function to load content to google cast device.
Functions
Setup CaaSSessionManagerListener and CaaSRemoteClientCallback. Remember to call removeListener or may cause memory leak and other errors.
Cast content to receiver, and setup mini controller. This function will not cast the content if already casted.
Cast multiple contents to receiver at once. This function will not cast the start content if already casted or invalided index.
Finish current casting session
Show the google cast is connected or not.
Remove CaaSSessionManageListener and CaaSRemoteClientCallback. If called addListener, remember to call this function to prevent from memory leak.