| java.lang.Object | ||
| ↳ | org.ocast.core.DataStream | |
| ↳ | org.ocast.core.ApplicationController | |
Provides means to control the web application.
The ApplicationController also gives you access to the MediaController
which provides your application with basic cast control functions.
A reference to the ApplicationController can be obtained using the DeviceManager
class via the getApplicationController method.
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| ApplicationController(DialService dialService, Driver driver) | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| void |
join(Runnable onSuccess, Consumer<Throwable> onFailure)
Joins the web application on the device.
| ||||||||||
| void |
manageStream(DataStream stream)
Used to get control over a user's specific stream
| ||||||||||
| void |
onMessage(JSONObject message)
Subclass must implement this method to manage incoming messages
| ||||||||||
| void |
start(Runnable onSuccess, Consumer<Throwable> onFailure)
Starts the web application on the device.
| ||||||||||
| void |
stop(Runnable onSuccess, Consumer<Throwable> onFailure)
Stops the web application on the device
| ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.ocast.core.DataStream
| |||||||||||
From class
java.lang.Object
| |||||||||||
Joins the web application on the device. Fails if another web application is already running on the device.
| onSuccess | to be called in case of success. |
|---|---|
| onFailure | to be called in case of error |
Used to get control over a user's specific stream
| stream | custom stream to be managed |
|---|
Subclass must implement this method to manage incoming messages
| message | the incoming message |
|---|
Starts the web application on the device. Will restart the web application if it is already running on the device.
| onSuccess | to be called in case of success. |
|---|---|
| onFailure | to be called in case of error |
Stops the web application on the device
| onSuccess | to be called in case of success. |
|---|---|
| onFailure | to be called in case of error |