AI-generated Key Takeaways
-
The SessionTransferCallback is an abstract class used to monitor the transfer of a Cast session between different endpoints.
-
It includes nested classes for specifying the reason for transfer failure and the type of endpoint transfer.
-
The callback provides methods to indicate when a transfer is in progress, has successfully completed, or has failed.
-
Constants are provided for different transfer failure reasons and transfer types.
Callbacks to monitor the transfer of the Cast session to another endpoint.
Nested Class Summary
| @interface | SessionTransferCallback.TransferFailedReason | The failure reason of transferring to the new endpoint. | |
| @interface | SessionTransferCallback.TransferType | The transfer type of switching endpoints. | |
Constant Summary
| int | TRANSFER_FAILED_REASON_STORE_SESSION_STATE | |
| int | TRANSFER_FAILED_REASON_TRANSFER_TIMEOUT | |
| int | TRANSFER_TYPE_FROM_REMOTE_TO_LOCAL | |
| int | TRANSFER_TYPE_UNKNOWN |
Public Constructor Summary
Public Method Summary
| void |
onTransferFailed(int transferType, int reason)
Called when transferring the Cast session to a different endpoint has failed.
|
| void |
onTransferred(int transferType, SessionState sessionState)
Called when the Cast session is transferred to a different endpoint.
|
| void |
onTransferring(int transferType)
Called when the Cast session is transferring to a different endpoint.
|
Inherited Method Summary
Constants
public static final int TRANSFER_FAILED_REASON_STORE_SESSION_STATE
public static final int TRANSFER_FAILED_REASON_TRANSFER_TIMEOUT
public static final int TRANSFER_TYPE_FROM_REMOTE_TO_LOCAL
public static final int TRANSFER_TYPE_UNKNOWN
Public Constructors
public SessionTransferCallback ()
Public Methods
public void onTransferFailed (int transferType, int reason)
Called when transferring the Cast session to a different endpoint has failed.
Parameters
| transferType | the type of endpoint transfer |
|---|---|
| reason | the reason of the failed transfer |
public void onTransferred (int transferType, SessionState sessionState)
Called when the Cast session is transferred to a different endpoint.
Parameters
| transferType | the type of endpoint transfer |
|---|---|
| sessionState | the SessionState
for resuming the playback |
public void onTransferring (int transferType)
Called when the Cast session is transferring to a different endpoint.
Parameters
| transferType | the type of endpoint transfer |
|---|