Panoramica
Una sottoclasse GCKCastChannel per le operazioni di controllo multimediale.
Qualsiasi operazione che si applica a uno stream attualmente attivo (riproduzione, pausa, ricerca, interruzione e così via) richiede uno stato multimediale valido (ovvero non nullo), altrimenti restituirà kGCKInvalidRequestID e non invierà la richiesta. Lo stato dei contenuti multimediali viene richiesto automaticamente quando il canale si connette, è incluso in una risposta di caricamento riuscito e può anche essere aggiornato in qualsiasi momento. Lo stato dei contenuti multimediali può anche diventare nullo in qualsiasi momento, ad esempio se il canale viene temporaneamente disconnesso. Quando utilizzi questo canale, le modifiche dello stato dei contenuti multimediali devono essere monitorate tramite il callback mediaControlChannelDidUpdateStatus: (GCKMediaControlChannelDelegate-p) e i metodi che agiscono sugli stream devono essere chiamati solo quando lo stato dei contenuti multimediali non è nullo.
Se una richiesta viene avviata correttamente, il metodo corrispondente restituisce l'ID richiesta assegnato. Se la richiesta non viene avviata, il metodo restituisce kGCKInvalidRequestID e imposta la proprietà lastError per indicare il motivo dell'errore. Se una richiesta viene avviata correttamente, ma alla fine non va a buon fine, viene richiamato il callback mediaControlChannel:requestDidFailWithID:error: (GCKMediaControlChannelDelegate-p) per indicare l'errore.
Per il protocollo del delegato, consulta la pagina GCKMediaControlChannelDelegate.
- Deprecated:
- Utilizza la proprietà GCKRemoteMediaClient di GCKCastSession per controllare la riproduzione dei contenuti multimediali.
Eredita GCKCastChannel.
Riepilogo del metodo dell'istanza | |
(instancetype) | - init |
Inizializzatore designato. Altro… | |
(NSInteger) | - loadMedia: |
Carica e avvia la riproduzione di un nuovo elemento multimediale. Altro… | |
(NSInteger) | - loadMedia:autoplay: |
Carica e avvia facoltativamente la riproduzione di un nuovo elemento multimediale. Altro… | |
(NSInteger) | - loadMedia:autoplay:playPosition: |
Carica e avvia facoltativamente la riproduzione di un nuovo elemento multimediale. Altro… | |
(NSInteger) | - loadMedia:autoplay:playPosition:customData: |
Carica e avvia facoltativamente la riproduzione di un nuovo elemento multimediale. Altro… | |
(NSInteger) | - loadMedia:autoplay:playPosition:activeTrackIDs: |
Carica e avvia facoltativamente la riproduzione di un nuovo elemento multimediale. Altro… | |
(NSInteger) | - loadMedia:autoplay:playPosition:activeTrackIDs:customData: |
Carica e avvia facoltativamente la riproduzione di un nuovo elemento multimediale. Altro… | |
(NSInteger) | - setActiveTrackIDs: |
Imposta le tracce attive. Altro… | |
(NSInteger) | - setTextTrackStyle: |
Imposta lo stile della traccia di testo. Altro… | |
(NSInteger) | - pause |
Mette in pausa la riproduzione dell'elemento multimediale corrente. Altro… | |
(NSInteger) | - pauseWithCustomData: |
Mette in pausa la riproduzione dell'elemento multimediale corrente. Altro… | |
(NSInteger) | - stop |
Interrompe la riproduzione dell'elemento multimediale corrente. Altro… | |
(NSInteger) | - stopWithCustomData: |
Interrompe la riproduzione dell'elemento multimediale corrente. Altro… | |
(NSInteger) | - play |
Avvia (o riprende) la riproduzione dell'elemento multimediale corrente. Altro… | |
(NSInteger) | - playWithCustomData: |
Avvia (o riprende) la riproduzione dell'elemento multimediale corrente. Altro… | |
(NSInteger) | - seekToTimeInterval: |
Cerca una nuova posizione all'interno dell'elemento multimediale corrente. Altro… | |
(NSInteger) | - seekToTimeInterval:resumeState: |
Cerca una nuova posizione all'interno dell'elemento multimediale corrente. Altro… | |
(NSInteger) | - seekToTimeInterval:resumeState:customData: |
Cerca una nuova posizione all'interno dell'elemento multimediale corrente. Altro… | |
(NSInteger) | - queueLoadItems:startIndex:repeatMode: |
Carica e avvia facoltativamente la riproduzione di una nuova coda di contenuti multimediali. Altro… | |
(NSInteger) | - queueLoadItems:startIndex:repeatMode:customData: |
Carica e avvia facoltativamente la riproduzione di una nuova coda di contenuti multimediali. Altro… | |
(NSInteger) | - queueLoadItems:startIndex:playPosition:repeatMode:customData: |
Carica e avvia facoltativamente la riproduzione di una nuova coda di contenuti multimediali. Altro… | |
(NSInteger) | - queueInsertItems:beforeItemWithID: |
Inserisce un elenco di nuovi contenuti multimediali nella coda. Altro… | |
(NSInteger) | - queueInsertItems:beforeItemWithID:customData: |
Inserisce un elenco di nuovi contenuti multimediali nella coda. Altro… | |
(NSInteger) | - queueInsertItem:beforeItemWithID: |
Un metodo pratico che inserisce un singolo elemento nella coda. Altro… | |
(NSInteger) | - queueInsertAndPlayItem:beforeItemWithID: |
Un metodo pratico che inserisce un singolo elemento nella coda e lo rende l'elemento corrente. Altro… | |
(NSInteger) | - queueInsertAndPlayItem:beforeItemWithID:playPosition:customData: |
Un metodo pratico che inserisce un singolo elemento nella coda e lo rende l'elemento corrente. Altro… | |
(NSInteger) | - queueUpdateItems: |
Aggiorna la coda. Altro… | |
(NSInteger) | - queueUpdateItems:customData: |
Aggiorna la coda. Altro… | |
(NSInteger) | - queueRemoveItemsWithIDs: |
Rimuove un elenco di elementi multimediali dalla coda. Altro… | |
(NSInteger) | - queueRemoveItemsWithIDs:customData: |
Rimuove un elenco di elementi multimediali dalla coda. Altro… | |
(NSInteger) | - queueRemoveItemWithID: |
Un metodo pratico che rimuove un singolo elemento dalla coda. Altro… | |
(NSInteger) | - queueReorderItemsWithIDs:insertBeforeItemWithID: |
Riordina un elenco di elementi multimediali nella coda. Altro… | |
(NSInteger) | - queueReorderItemsWithIDs:insertBeforeItemWithID:customData: |
Riordina un elenco di elementi multimediali nella coda. Altro… | |
(NSInteger) | - queueMoveItemWithID:beforeItemWithID: |
Un metodo pratico che sposta un singolo elemento nella coda. Altro… | |
(NSInteger) | - queueJumpToItemWithID: |
Salta all'elemento con l'ID specificato nella coda. Altro… | |
(NSInteger) | - queueJumpToItemWithID:customData: |
Salta all'elemento con l'ID specificato nella coda. Altro… | |
(NSInteger) | - queueJumpToItemWithID:playPosition:customData: |
Salta all'elemento con l'ID specificato nella coda. Altro… | |
(NSInteger) | - queueNextItem |
Passa all'elemento successivo nella coda. Altro… | |
(NSInteger) | - queuePreviousItem |
Passa all'elemento precedente della coda. Altro… | |
(NSInteger) | - queueSetRepeatMode: |
Imposta la modalità di ripetizione della coda. Altro… | |
(NSInteger) | - setStreamVolume: |
Imposta il volume dello stream. Altro… | |
(NSInteger) | - setStreamVolume:customData: |
Imposta il volume dello stream. Altro… | |
(NSInteger) | - setStreamMuted: |
Imposta se lo stream è disattivato. Altro… | |
(NSInteger) | - setStreamMuted:customData: |
Imposta se lo stream è disattivato. Altro… | |
(NSInteger) | - requestStatus |
Richiede al destinatario informazioni aggiornate sullo stato dei contenuti multimediali. Altro… | |
(NSTimeInterval) | - approximateStreamPosition |
Restituisce la posizione approssimativa dello stream calcolata in base alle ultime informazioni sullo stream ricevute e al tempo reale trascorso dall'aggiornamento. Altro… | |
(BOOL) | - cancelRequestWithID: |
Annulla una richiesta in corso. Altro… | |
(instancetype) | - initWithNamespace: |
Inizializzatore designato. Altro… | |
(void) | - didReceiveTextMessage: |
Chiamato quando è stato ricevuto un messaggio su questo canale. Altro… | |
(BOOL) | - sendTextMessage: |
Invia un messaggio su questo canale. Altro… | |
(BOOL) | - sendTextMessage:error: |
Invia un messaggio su questo canale. Altro… | |
(NSInteger) | - generateRequestID |
Genera un ID richiesta per un nuovo messaggio. Altro… | |
(NSNumber *__nullable) | - generateRequestNumber |
Un metodo pratico che racchiude il risultato di generateRequestID in un NSNumber. Altro… | |
(void) | - didConnect |
Chiamato quando questo canale è stato connesso, a indicare che ora è possibile scambiare messaggi con il dispositivo Cast su questo canale. Altro… | |
(void) | - didDisconnect |
Chiamato quando questo canale è stato disconnesso, a indicare che non è più possibile scambiare messaggi con il dispositivo di trasmissione su questo canale. Altro… | |
Riepilogo della proprietà | |
GCKMediaStatus * | mediaStatus |
Lo stato dei contenuti multimediali attualmente caricati, se presenti; in caso contrario, nil . Altro… | |
NSTimeInterval | timeSinceLastMediaStatusUpdate |
Il tempo trascorso dall'ultimo aggiornamento dello stato dei contenuti multimediali ricevuto. Altro… | |
GCKError * | lastError |
I dettagli dell'errore dell'ultima richiesta, se presenti, o nil se l'ultima richiesta è andata a buon fine. Altro… | |
id< GCKMediaControlChannelDelegate > | delegate |
Il delegato per la ricezione di notifiche relative alle modifiche dello stato del canale. Altro… | |
NSString * | protocolNamespace |
Lo spazio dei nomi del canale. Altro… | |
BOOL | isConnected |
Un flag che indica se questo canale è attualmente connesso. Altro… | |
GCKDeviceManager * | deviceManager |
Il gestore del dispositivo con cui è registrato questo canale, se presente. Altro… | |
Dettagli metodo
- (instancetype) init |
Inizializzatore designato.
Implementa GCKCastChannel.
- (NSInteger) loadMedia: | (GCKMediaInformation *) | mediaInfo |
Carica e avvia la riproduzione di un nuovo elemento multimediale.
- Parameters
-
mediaInfo An object describing the media item to load.
- Resi
- L'ID richiesta o kGCKInvalidRequestID se il messaggio non è stato inviato.
- (NSInteger) loadMedia: | (GCKMediaInformation *) | mediaInfo | |
autoplay: | (BOOL) | autoplay | |
Carica e avvia facoltativamente la riproduzione di un nuovo elemento multimediale.
- Parameters
-
mediaInfo An object describing the media item to load. autoplay Whether playback should start immediately.
- Resi
- L'ID richiesta o kGCKInvalidRequestID se il messaggio non è stato inviato.
- (NSInteger) loadMedia: | (GCKMediaInformation *) | mediaInfo | |
autoplay: | (BOOL) | autoplay | |
playPosition: | (NSTimeInterval) | playPosition | |
Carica e avvia facoltativamente la riproduzione di un nuovo elemento multimediale.
- Parameters
-
mediaInfo An object describing the media item to load. autoplay Whether playback should start immediately. playPosition The initial playback position.
- Resi
- L'ID richiesta o kGCKInvalidRequestID se il messaggio non è stato inviato.
- (NSInteger) loadMedia: | (GCKMediaInformation *) | mediaInfo | |
autoplay: | (BOOL) | autoplay | |
playPosition: | (NSTimeInterval) | playPosition | |
customData: | (id __nullable) | customData | |
Carica e avvia facoltativamente la riproduzione di un nuovo elemento multimediale.
- Parameters
-
mediaInfo An object describing the media item to load. autoplay Whether playback should start immediately. playPosition The initial playback position. customData Custom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil
.
- Resi
- L'ID richiesta o kGCKInvalidRequestID se il messaggio non è stato inviato.
- (NSInteger) loadMedia: | (GCKMediaInformation *) | mediaInfo | |
autoplay: | (BOOL) | autoplay | |
playPosition: | (NSTimeInterval) | playPosition | |
activeTrackIDs: | (NSArray< NSNumber * > *__nullable) | activeTrackIDs | |
Carica e avvia facoltativamente la riproduzione di un nuovo elemento multimediale.
- Parameters
-
mediaInfo An object describing the media item to load. autoplay Whether playback should start immediately. playPosition The initial playback position. activeTrackIDs An array of integers specifying the active tracks. May be nil
.
- Resi
- L'ID richiesta o kGCKInvalidRequestID se il messaggio non è stato inviato.
- (NSInteger) loadMedia: | (GCKMediaInformation *) | mediaInfo | |
autoplay: | (BOOL) | autoplay | |
playPosition: | (NSTimeInterval) | playPosition | |
activeTrackIDs: | (NSArray< NSNumber * > *__nullable) | activeTrackIDs | |
customData: | (id __nullable) | customData | |
Carica e avvia facoltativamente la riproduzione di un nuovo elemento multimediale.
- Parameters
-
mediaInfo An object describing the media item to load. autoplay Whether playback should start immediately. playPosition The initial playback position. activeTrackIDs An array of integers specifying the active tracks. May be nil
.customData Custom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil
.
- Resi
- L'ID richiesta o kGCKInvalidRequestID se il messaggio non è stato inviato.
- (NSInteger) setActiveTrackIDs: | (NSArray< NSNumber * > *__nullable) | activeTrackIDs |
Imposta le tracce attive.
La richiesta non andrà a buon fine se non è presente uno stato multimediale corrente.
- Parameters
-
activeTrackIDs An array of integers specifying the active tracks.
- Resi
- L'ID richiesta o kGCKInvalidRequestID se il messaggio non è stato inviato. Può essere
nil
o un array vuoto per impostare le tracce attive sull'elenco vuoto.
- (NSInteger) setTextTrackStyle: | (GCKMediaTextTrackStyle *__nullable) | textTrackStyle |
Imposta lo stile della traccia di testo.
La richiesta non andrà a buon fine se non è presente uno stato multimediale corrente.
- Parameters
-
textTrackStyle The text track style. The style will not be changed if this is nil
.
- Resi
- L'ID richiesta o kGCKInvalidRequestID se il messaggio non è stato inviato.
- (NSInteger) pause |
Mette in pausa la riproduzione dell'elemento multimediale corrente.
La richiesta non andrà a buon fine se non è presente uno stato multimediale corrente.
- Resi
- L'ID richiesta o kGCKInvalidRequestID se il messaggio non è stato inviato.
- (NSInteger) pauseWithCustomData: | (id __nullable) | customData |
Mette in pausa la riproduzione dell'elemento multimediale corrente.
La richiesta non andrà a buon fine se non è presente uno stato multimediale corrente.
- Parameters
-
customData Custom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil
.
- Resi
- L'ID richiesta o kGCKInvalidRequestID se il messaggio non è stato inviato.
- (NSInteger) stop |
Interrompe la riproduzione dell'elemento multimediale corrente.
La richiesta non andrà a buon fine se non è presente uno stato multimediale corrente. Se è attualmente caricata una coda, questa viene rimossa.
- Resi
- L'ID richiesta o kGCKInvalidRequestID se il messaggio non è stato inviato.
- (NSInteger) stopWithCustomData: | (id __nullable) | customData |
Interrompe la riproduzione dell'elemento multimediale corrente.
La richiesta non andrà a buon fine se non è presente uno stato multimediale corrente. Se è attualmente caricata una coda, questa viene rimossa.
- Parameters
-
customData Custom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil
.
- Resi
- L'ID richiesta o kGCKInvalidRequestID se il messaggio non è stato inviato.
- (NSInteger) play |
Avvia (o riprende) la riproduzione dell'elemento multimediale corrente.
La riproduzione inizia sempre dall'inizio dello stream. La richiesta non andrà a buon fine se non è presente uno stato multimediale corrente.
- Resi
- L'ID richiesta o kGCKInvalidRequestID se il messaggio non è stato inviato.
- (NSInteger) playWithCustomData: | (id __nullable) | customData |
Avvia (o riprende) la riproduzione dell'elemento multimediale corrente.
La riproduzione inizia sempre dall'inizio dello stream. La richiesta non andrà a buon fine se non è presente uno stato multimediale corrente.
- Parameters
-
customData Custom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil
.
- Resi
- L'ID richiesta o kGCKInvalidRequestID se il messaggio non è stato inviato.
- (NSInteger) seekToTimeInterval: | (NSTimeInterval) | position |
Cerca una nuova posizione all'interno dell'elemento multimediale corrente.
La richiesta non andrà a buon fine se non è presente uno stato multimediale corrente.
- Parameters
-
position The new position from the beginning of the stream.
- Resi
- L'ID richiesta o kGCKInvalidRequestID se il messaggio non è stato inviato.
- (NSInteger) seekToTimeInterval: | (NSTimeInterval) | position | |
resumeState: | (GCKMediaControlChannelResumeState) | resumeState | |
Cerca una nuova posizione all'interno dell'elemento multimediale corrente.
La richiesta non andrà a buon fine se non è presente uno stato multimediale corrente.
- Parameters
-
position The new position interval from the beginning of the stream. resumeState The action to take after the seek operation has finished.
- Resi
- L'ID richiesta o kGCKInvalidRequestID se il messaggio non è stato inviato.
- (NSInteger) seekToTimeInterval: | (NSTimeInterval) | position | |
resumeState: | (GCKMediaControlChannelResumeState) | resumeState | |
customData: | (id __nullable) | customData | |
Cerca una nuova posizione all'interno dell'elemento multimediale corrente.
La richiesta non andrà a buon fine se non è presente uno stato multimediale corrente.
- Parameters
-
position The new position from the beginning of the stream. resumeState The action to take after the seek operation has finished. customData Custom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil
.
- Resi
- L'ID richiesta o kGCKInvalidRequestID se il messaggio non è stato inviato.
- (NSInteger) queueLoadItems: | (NSArray< GCKMediaQueueItem * > *) | queueItems | |
startIndex: | (NSUInteger) | startIndex | |
repeatMode: | (GCKMediaRepeatMode) | repeatMode | |
Carica e avvia facoltativamente la riproduzione di una nuova coda di contenuti multimediali.
- Parameters
-
queueItems An array of GCKMediaQueueItem instances to load. Must not be nil
or empty.startIndex The index of the item in the items array that should be played first. repeatMode The repeat mode for playing the queue.
- Resi
- L'ID richiesta per questa richiesta o kGCKInvalidRequestID se il messaggio non è stato inviato o se uno dei parametri non è valido.
- (NSInteger) queueLoadItems: | (NSArray< GCKMediaQueueItem * > *) | queueItems | |
startIndex: | (NSUInteger) | startIndex | |
repeatMode: | (GCKMediaRepeatMode) | repeatMode | |
customData: | (id __nullable) | customData | |
Carica e avvia facoltativamente la riproduzione di una nuova coda di contenuti multimediali.
- Parameters
-
queueItems An array of GCKMediaQueueItem instances to load. Must not be nil
or empty.startIndex The index of the item in the items array that should be played first. repeatMode The repeat mode for playing the queue. customData Custom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil
.
- Resi
- L'ID richiesta per questa richiesta o kGCKInvalidRequestID se il messaggio non è stato inviato o se uno dei parametri non è valido.
- (NSInteger) queueLoadItems: | (NSArray< GCKMediaQueueItem * > *) | queueItems | |
startIndex: | (NSUInteger) | startIndex | |
playPosition: | (NSTimeInterval) | playPosition | |
repeatMode: | (GCKMediaRepeatMode) | repeatMode | |
customData: | (id __nullable) | customData | |
Carica e avvia facoltativamente la riproduzione di una nuova coda di contenuti multimediali.
- Parameters
-
queueItems An array of GCKMediaQueueItem instances to load. Must not be nil
or empty.startIndex The index of the item in the items array that should be played first. playPosition The initial playback position for the item when it is first played, relative to the beginning of the stream. This value is ignored when the same item is played again, for example when the queue repeats, or the item is later jumped to. In those cases the item's startTime is used. repeatMode The repeat mode for playing the queue. customData Custom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil
.
- Resi
- L'ID richiesta per questa richiesta o kGCKInvalidRequestID se il messaggio non è stato inviato o se uno dei parametri non è valido.
- (NSInteger) queueInsertItems: | (NSArray< GCKMediaQueueItem * > *) | queueItems | |
beforeItemWithID: | (NSUInteger) | beforeItemID | |
Inserisce un elenco di nuovi contenuti multimediali nella coda.
- Parameters
-
queueItems An array of GCKMediaQueueItem instances to insert. Must not be nil
or empty.beforeItemID The ID of the item that will be located immediately after the inserted list. If the value is kGCKMediaQueueInvalidItemID, the inserted list will be appended to the end of the queue.
- Resi
- L'ID richiesta per questa richiesta o kGCKInvalidRequestID se il messaggio non è stato inviato o se uno dei parametri non è valido.
- (NSInteger) queueInsertItems: | (NSArray< GCKMediaQueueItem * > *) | queueItems | |
beforeItemWithID: | (NSUInteger) | beforeItemID | |
customData: | (id __nullable) | customData | |
Inserisce un elenco di nuovi contenuti multimediali nella coda.
- Parameters
-
queueItems An array of GCKMediaQueueItem instances to insert. Must not be nil
or empty.beforeItemID ID of the item that will be located immediately after the inserted list. If the value is kGCKMediaQueueInvalidItemID, the inserted list will be appended to the end of the queue. customData Custom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil
.
- Resi
- L'ID richiesta per questa richiesta o kGCKInvalidRequestID se il messaggio non è stato inviato o se uno dei parametri non è valido.
- (NSInteger) queueInsertItem: | (GCKMediaQueueItem *) | item | |
beforeItemWithID: | (NSUInteger) | beforeItemID | |
Un metodo pratico che inserisce un singolo elemento nella coda.
- Parameters
-
item The item to insert. beforeItemID The ID of the item that will be located immediately after the inserted item. If the value is kGCKMediaQueueInvalidItemID, or does not refer to any item currently in the queue, the inserted item will be appended to the end of the queue.
- Resi
- L'ID richiesta per questa richiesta o kGCKInvalidRequestID se il messaggio non è stato inviato o se uno dei parametri non è valido.
- (NSInteger) queueInsertAndPlayItem: | (GCKMediaQueueItem *) | item | |
beforeItemWithID: | (NSUInteger) | beforeItemID | |
Un metodo pratico che inserisce un singolo elemento nella coda e lo rende l'elemento corrente.
- Parameters
-
item The item to insert. beforeItemID The ID of the item that will be located immediately after the inserted item. If the value is kGCKMediaQueueInvalidItemID, or does not refer to any item currently in the queue, the inserted item will be appended to the end of the queue.
- Resi
- L'ID richiesta per questa richiesta o kGCKInvalidRequestID se il messaggio non è stato inviato o se uno dei parametri non è valido.
- (NSInteger) queueInsertAndPlayItem: | (GCKMediaQueueItem *) | item | |
beforeItemWithID: | (NSUInteger) | beforeItemID | |
playPosition: | (NSTimeInterval) | playPosition | |
customData: | (id __nullable) | customData | |
Un metodo pratico che inserisce un singolo elemento nella coda e lo rende l'elemento corrente.
- Parameters
-
item The item to insert. beforeItemID The ID of the item that will be located immediately after the inserted item. If the value is kGCKMediaQueueInvalidItemID, or does not refer to any item currently in the queue, the inserted item will be appended to the end of the queue. playPosition The initial playback position for the item when it is first played, relative to the beginning of the stream. This value is ignored when the same item is played again, for example when the queue repeats, or the item is later jumped to. In those cases the item's startTime is used. customData Custom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil
.
- Resi
- L'ID richiesta per questa richiesta o kGCKInvalidRequestID se il messaggio non è stato inviato o se uno dei parametri non è valido.
- (NSInteger) queueUpdateItems: | (NSArray< GCKMediaQueueItem * > *) | queueItems |
Aggiorna la coda.
- Parameters
-
queueItems The list of updated items.
- Resi
- L'ID richiesta per questa richiesta o kGCKInvalidRequestID se il messaggio non è stato inviato o se uno dei parametri non è valido.
- (NSInteger) queueUpdateItems: | (NSArray< GCKMediaQueueItem * > *) | queueItems | |
customData: | (id __nullable) | customData | |
Aggiorna la coda.
- Parameters
-
queueItems The list of updated items. customData Custom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil
.
- Resi
- L'ID richiesta per questa richiesta o kGCKInvalidRequestID se il messaggio non è stato inviato o se uno dei parametri non è valido.
- (NSInteger) queueRemoveItemsWithIDs: | (NSArray< NSNumber * > *) | itemIDs |
Rimuove un elenco di elementi multimediali dalla coda.
Se la coda si svuota, la sessione multimediale corrente verrà interrotta.
- Parameters
-
itemIDs An array of media item IDs identifying the items to remove. Must not be nil
or empty.
- Resi
- L'ID richiesta per questa richiesta o kGCKInvalidRequestID se il messaggio non è stato inviato o se uno dei parametri non è valido.
- (NSInteger) queueRemoveItemsWithIDs: | (NSArray< NSNumber * > *) | itemIDs | |
customData: | (id __nullable) | customData | |
Rimuove un elenco di elementi multimediali dalla coda.
Se la coda si svuota, la sessione multimediale corrente verrà interrotta.
- Parameters
-
itemIDs An array of media item IDs identifying the items to remove. Must not be nil
or empty.customData Custom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil
.
- Resi
- L'ID richiesta per questa richiesta o kGCKInvalidRequestID se il messaggio non è stato inviato o se uno dei parametri non è valido.
- (NSInteger) queueRemoveItemWithID: | (NSUInteger) | itemID |
Un metodo pratico che rimuove un singolo elemento dalla coda.
- Parameters
-
itemID The ID of the item to remove.
- Resi
- L'ID richiesta per questa richiesta o kGCKInvalidRequestID se il messaggio non è stato inviato o se uno dei parametri non è valido.
- (NSInteger) queueReorderItemsWithIDs: | (NSArray< NSNumber * > *) | queueItemIDs | |
insertBeforeItemWithID: | (NSUInteger) | beforeItemID | |
Riordina un elenco di elementi multimediali nella coda.
- Parameters
-
queueItemIDs An array of media item IDs identifying the items to reorder. Must not be nil
or empty.beforeItemID ID of the item that will be located immediately after the reordered list. If the value is kGCKMediaQueueInvalidItemID, or does not refer to any item currently in the queue, the reordered list will be appended at the end of the queue.
- Resi
- L'ID richiesta per questa richiesta o kGCKInvalidRequestID se il messaggio non è stato inviato o se uno dei parametri non è valido.
- (NSInteger) queueReorderItemsWithIDs: | (NSArray< NSNumber * > *) | queueItemIDs | |
insertBeforeItemWithID: | (NSUInteger) | beforeItemID | |
customData: | (id __nullable) | customData | |
Riordina un elenco di elementi multimediali nella coda.
- Parameters
-
queueItemIDs An array of media item IDs identifying the items to reorder. Must not be nil
or empty.beforeItemID The ID of the item that will be located immediately after the reordered list. If the value is kGCKMediaQueueInvalidItemID, or does not refer to any item currently in the queue, the reordered list will be moved to the end of the queue. customData Custom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil
.
- Resi
- L'ID richiesta per questa richiesta o kGCKInvalidRequestID se il messaggio non è stato inviato o se uno dei parametri non è valido.
- (NSInteger) queueMoveItemWithID: | (NSUInteger) | itemID | |
beforeItemWithID: | (NSUInteger) | beforeItemID | |
Un metodo pratico che sposta un singolo elemento nella coda.
- Parameters
-
itemID The ID of the item to move. beforeItemID The ID of the item that will be located immediately after the reordered list. If the value is kGCKMediaQueueInvalidItemID, or does not refer to any item currently in the queue, the item will be moved to the end of the queue.
- Resi
- L'ID richiesta per questa richiesta o kGCKInvalidRequestID se il messaggio non è stato inviato o se uno dei parametri non è valido.
- (NSInteger) queueJumpToItemWithID: | (NSUInteger) | itemID |
Salta all'elemento con l'ID specificato nella coda.
- Parameters
-
itemID The ID of the item to jump to.
- Resi
- L'ID richiesta per questa richiesta o kGCKInvalidRequestID se il messaggio non è stato inviato.
- (NSInteger) queueJumpToItemWithID: | (NSUInteger) | itemID | |
customData: | (id __nullable) | customData | |
Salta all'elemento con l'ID specificato nella coda.
- Parameters
-
itemID The ID of the item to jump to. customData Custom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil
.
- Resi
- L'ID richiesta per questa richiesta o kGCKInvalidRequestID se il messaggio non è stato inviato.
- (NSInteger) queueJumpToItemWithID: | (NSUInteger) | itemID | |
playPosition: | (NSTimeInterval) | playPosition | |
customData: | (id __nullable) | customData | |
Salta all'elemento con l'ID specificato nella coda.
- Parameters
-
itemID The ID of the item to jump to. playPosition The initial playback position for the item when it is first played, relative to the beginning of the stream. This value is ignored when the same item is played again, for example when the queue repeats, or the item is later jumped to. In those cases the item's startTime is used. customData Custom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil
.
- Resi
- L'ID richiesta per questa richiesta o kGCKInvalidRequestID se il messaggio non è stato inviato.
- (NSInteger) queueNextItem |
Passa all'elemento successivo nella coda.
- Resi
- L'ID richiesta per questa richiesta o kGCKInvalidRequestID se il messaggio non è stato inviato.
- (NSInteger) queuePreviousItem |
Passa all'elemento precedente della coda.
- Resi
- L'ID richiesta per questa richiesta o kGCKInvalidRequestID se il messaggio non è stato inviato.
- (NSInteger) queueSetRepeatMode: | (GCKMediaRepeatMode) | repeatMode |
Imposta la modalità di ripetizione della coda.
- Parameters
-
repeatMode The new repeat mode.
- Resi
- L'ID richiesta per questa richiesta o kGCKInvalidRequestID se il messaggio non è stato inviato o se uno dei parametri non è valido.
- (NSInteger) setStreamVolume: | (float) | volume |
Imposta il volume dello stream.
La richiesta non andrà a buon fine se non è presente una sessione multimediale corrente.
- Parameters
-
volume The new volume, in the range [0.0 - 1.0].
- Resi
- L'ID richiesta o kGCKInvalidRequestID se il messaggio non è stato inviato.
- (NSInteger) setStreamVolume: | (float) | volume | |
customData: | (id __nullable) | customData | |
Imposta il volume dello stream.
La richiesta non andrà a buon fine se non è presente una sessione multimediale corrente.
- Parameters
-
volume The new volume, in the range [0.0 - 1.0]. customData Custom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil
.
- Resi
- L'ID richiesta o kGCKInvalidRequestID se il messaggio non è stato inviato.
- (NSInteger) setStreamMuted: | (BOOL) | muted |
Imposta se lo stream è disattivato.
La richiesta non andrà a buon fine se non è presente una sessione multimediale corrente.
- Parameters
-
muted Whether the stream should be muted or unmuted.
- Resi
- L'ID richiesta o kGCKInvalidRequestID se il messaggio non è stato inviato.
- (NSInteger) setStreamMuted: | (BOOL) | muted | |
customData: | (id __nullable) | customData | |
Imposta se lo stream è disattivato.
La richiesta non andrà a buon fine se non è presente una sessione multimediale corrente.
- Parameters
-
muted Whether the stream should be muted or unmuted. customData Custom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil
.
- Resi
- L'ID richiesta o kGCKInvalidRequestID se il messaggio non è stato inviato.
- (NSInteger) requestStatus |
Richiede al destinatario informazioni aggiornate sullo stato dei contenuti multimediali.
- Resi
- L'ID richiesta o kGCKInvalidRequestID se il messaggio non è stato inviato.
- (NSTimeInterval) approximateStreamPosition |
Restituisce la posizione approssimativa dello stream calcolata in base alle ultime informazioni sullo stream ricevute e al tempo reale trascorso dall'aggiornamento.
Restituisce 0 se il canale non è connesso o se al momento non sono caricati contenuti multimediali.
- (BOOL) cancelRequestWithID: | (NSInteger) | requestID |
Annulla una richiesta in corso.
L'annullamento di una richiesta non ne impedisce l'esecuzione; indica semplicemente che l'applicazione chiamante non è più interessata ai risultati della richiesta, pertanto qualsiasi stato associato al monitoraggio della richiesta verrà cancellato.
- Parameters
-
requestID The ID of the request to cancel.
- Resi
YES
se la richiesta è stata annullata oNO
se non viene monitorata alcuna richiesta con l'ID specificato.
- (instancetype) initWithNamespace: | (NSString *) | protocolNamespace |
Inizializzatore designato.
Costruisce un nuovo GCKCastChannel con lo spazio dei nomi specificato.
- Parameters
-
protocolNamespace The namespace.
Implementato in GCKGenericChannel.
- (void) didReceiveTextMessage: | (NSString *) | message |
Chiamato quando è stato ricevuto un messaggio su questo canale.
L'implementazione predefinita è un'operazione nulla.
- Parameters
-
message The message.
- (BOOL) sendTextMessage: | (NSString *) | message |
Invia un messaggio su questo canale.
- Parameters
-
message The message.
- Resi
YES
in caso di esito positivo oNO
se il messaggio non è stato inviato (perché il canale non è connesso o perché il buffer di invio è troppo pieno al momento).
- Deprecated:
- Utilizza sendTextMessage:error:, che fornisce informazioni dettagliate sugli errori.
- (BOOL) sendTextMessage: | (NSString *) | message | |
error: | (GCKError *__nullable *__nullable) | error | |
Invia un messaggio su questo canale.
- Parameters
-
message The message. error A pointer at which to store the error result. May be nil
.
- Resi
YES
in caso di esito positivo oNO
se il messaggio non è stato inviato.
- (NSInteger) generateRequestID |
Genera un ID richiesta per un nuovo messaggio.
- Resi
- L'ID generato o kGCKInvalidRequestID se il canale non è attualmente collegato.
- (NSNumber * __nullable) generateRequestNumber |
Un metodo pratico che racchiude il risultato di generateRequestID in un NSNumber.
- Resi
- L'ID generato o
nil
se il canale non è attualmente collegato.
- (void) didConnect |
Chiamato quando questo canale è stato connesso, a indicare che ora è possibile scambiare messaggi con il dispositivo Cast su questo canale.
L'implementazione predefinita è un'operazione nulla.
- (void) didDisconnect |
Chiamato quando questo canale è stato disconnesso, a indicare che non è più possibile scambiare messaggi con il dispositivo di trasmissione su questo canale.
L'implementazione predefinita è un'operazione nulla.
Dettaglio proprietà
|
readnonatomicstrong |
Lo stato dei contenuti multimediali attualmente caricati, se presenti; in caso contrario, nil
.
|
readnonatomicassign |
Il tempo trascorso dall'ultimo aggiornamento dello stato dei contenuti multimediali ricevuto.
Se è in corso una richiesta di stato, questo valore sarà 0.
|
readnonatomiccopy |
I dettagli dell'errore dell'ultima richiesta, se presenti, o nil
se l'ultima richiesta è andata a buon fine.
|
readwritenonatomicweak |
Il delegato per la ricezione di notifiche relative alle modifiche dello stato del canale.
|
readnonatomiccopyinherited |
Lo spazio dei nomi del canale.
|
readnonatomicassigninherited |
Un flag che indica se questo canale è attualmente connesso.
|
readnonatomicweakinherited |
Il gestore del dispositivo con cui è registrato questo canale, se presente.
- Deprecated:
- Se questo canale non è stato registrato con la classe GCKDeviceManager deprecata, questo valore sarà
nil
.