סקירה כללית
מחלקת משנה GCKCastChannel לפעולות של שליטה במדיה.
כל הפעולות שחלות על סטרימינג פעיל (הפעלה, השהיה, חיפוש, עצירה וכו') דורשות סטטוס מדיה תקין (כלומר, לא nil), אחרת הן יחזירו kGCKInvalidRequestID ולא ישלחו את הבקשה. סטטוס המדיה נשלח אוטומטית כשמתבצע חיבור לערוץ, הוא נכלל בתגובה להשלמת טעינה מוצלחת, ואפשר גם לעדכן אותו בכל שלב. הסטטוס של המדיה יכול גם להפוך ל-nil בכל שלב. זה יקרה אם הערוץ ינותק באופן זמני, למשל. כשמשתמשים בערוץ הזה, צריך לעקוב אחרי שינויים בסטטוס המדיה באמצעות הקריאה החוזרת mediaControlChannelDidUpdateStatus: (GCKMediaControlChannelDelegate-p), וצריך להפעיל שיטות שפועלות על סטרימינג רק כשהסטטוס של המדיה הוא non-nil.
אם בקשה מתחילה בהצלחה, השיטה המתאימה מחזירה את מזהה הבקשה שהוקצה לבקשה הזו. אם הבקשה לא מצליחה להתחיל, השיטה מחזירה את הערך kGCKInvalidRequestID ומגדירה את המאפיין lastError כדי לציין את הסיבה לכישלון. אם בקשה מופעלת בהצלחה אבל בסופו של דבר נכשלת, יופעל ה-callback mediaControlChannel:requestDidFailWithID:error: (GCKMediaControlChannelDelegate-p) כדי לציין את הכישלון.
מידע על פרוטוקול ההרשאה מופיע במאמר GCKMediaControlChannelDelegate.
- Deprecated:
- משתמשים במאפיין GCKRemoteMediaClient של GCKCastSession כדי לשלוט בהפעלת המדיה.
התקבלה בירושה מ-GCKCastChannel.
סיכום שיטות המופע | |
(instancetype) | - init |
מאותחל ייעודי. עוד... | |
(NSInteger) | - loadMedia: |
טוען ומתחיל הפעלה של פריט מדיה חדש. עוד... | |
(NSInteger) | - loadMedia:autoplay: |
טעינה של פריט מדיה חדש והתחלת ההפעלה שלו (אופציונלי). עוד... | |
(NSInteger) | - loadMedia:autoplay:playPosition: |
טעינה של פריט מדיה חדש והתחלת ההפעלה שלו (אופציונלי). עוד... | |
(NSInteger) | - loadMedia:autoplay:playPosition:customData: |
טעינה של פריט מדיה חדש והתחלת ההפעלה שלו (אופציונלי). עוד... | |
(NSInteger) | - loadMedia:autoplay:playPosition:activeTrackIDs: |
טעינה של פריט מדיה חדש והתחלת ההפעלה שלו (אופציונלי). עוד... | |
(NSInteger) | - loadMedia:autoplay:playPosition:activeTrackIDs:customData: |
טעינה של פריט מדיה חדש והתחלת ההפעלה שלו (אופציונלי). עוד... | |
(NSInteger) | - setActiveTrackIDs: |
הגדרת המסלולים הפעילים. עוד... | |
(NSInteger) | - setTextTrackStyle: |
הגדרת הסגנון של רצועת הטקסט. עוד... | |
(NSInteger) | - pause |
השהיית ההפעלה של פריט המדיה הנוכחי. עוד... | |
(NSInteger) | - pauseWithCustomData: |
השהיית ההפעלה של פריט המדיה הנוכחי. עוד... | |
(NSInteger) | - stop |
הפסקת ההפעלה של פריט המדיה הנוכחי. עוד... | |
(NSInteger) | - stopWithCustomData: |
הפסקת ההפעלה של פריט המדיה הנוכחי. עוד... | |
(NSInteger) | - play |
מתחיל (או ממשיך) את ההפעלה של פריט המדיה הנוכחי. עוד... | |
(NSInteger) | - playWithCustomData: |
מתחיל (או ממשיך) את ההפעלה של פריט המדיה הנוכחי. עוד... | |
(NSInteger) | - seekToTimeInterval: |
מעבר למיקום חדש בפריט המדיה הנוכחי. עוד... | |
(NSInteger) | - seekToTimeInterval:resumeState: |
מעבר למיקום חדש בפריט המדיה הנוכחי. עוד... | |
(NSInteger) | - seekToTimeInterval:resumeState:customData: |
מעבר למיקום חדש בפריט המדיה הנוכחי. עוד... | |
(NSInteger) | - queueLoadItems:startIndex:repeatMode: |
טעינה והתחלה אופציונלית של הפעלה של תור חדש של פריטי מדיה. עוד... | |
(NSInteger) | - queueLoadItems:startIndex:repeatMode:customData: |
טעינה והתחלה אופציונלית של הפעלה של תור חדש של פריטי מדיה. עוד... | |
(NSInteger) | - queueLoadItems:startIndex:playPosition:repeatMode:customData: |
טעינה והתחלה אופציונלית של הפעלה של תור חדש של פריטי מדיה. עוד... | |
(NSInteger) | - queueInsertItems:beforeItemWithID: |
הוספת רשימה של פריטי מדיה חדשים לתור. עוד... | |
(NSInteger) | - queueInsertItems:beforeItemWithID:customData: |
הוספת רשימה של פריטי מדיה חדשים לתור. עוד... | |
(NSInteger) | - queueInsertItem:beforeItemWithID: |
שיטה נוחה להוספת פריט יחיד לתור. עוד... | |
(NSInteger) | - queueInsertAndPlayItem:beforeItemWithID: |
שיטה נוחה להוספת פריט יחיד לתור ולהגדרתו כפריט הנוכחי. עוד... | |
(NSInteger) | - queueInsertAndPlayItem:beforeItemWithID:playPosition:customData: |
שיטה נוחה להוספת פריט יחיד לתור ולהגדרתו כפריט הנוכחי. עוד... | |
(NSInteger) | - queueUpdateItems: |
עדכון התור. עוד... | |
(NSInteger) | - queueUpdateItems:customData: |
עדכון התור. עוד... | |
(NSInteger) | - queueRemoveItemsWithIDs: |
הסרת רשימה של פריטי מדיה מהתור. עוד... | |
(NSInteger) | - queueRemoveItemsWithIDs:customData: |
הסרת רשימה של פריטי מדיה מהתור. עוד... | |
(NSInteger) | - queueRemoveItemWithID: |
שיטה נוחה להסרת פריט יחיד מהתור. עוד... | |
(NSInteger) | - queueReorderItemsWithIDs:insertBeforeItemWithID: |
שינוי הסדר של פריטי מדיה בתור. עוד... | |
(NSInteger) | - queueReorderItemsWithIDs:insertBeforeItemWithID:customData: |
לשנות את הסדר של פריטי מדיה ברשימת ההמתנה. עוד... | |
(NSInteger) | - queueMoveItemWithID:beforeItemWithID: |
שיטה נוחה להעברת פריט יחיד בתור. עוד... | |
(NSInteger) | - queueJumpToItemWithID: |
מעבר לפריט עם המזהה שצוין בתור. עוד... | |
(NSInteger) | - queueJumpToItemWithID:customData: |
מעבר לפריט עם המזהה שצוין בתור. עוד... | |
(NSInteger) | - queueJumpToItemWithID:playPosition:customData: |
מעבר לפריט עם המזהה שצוין בתור. עוד... | |
(NSInteger) | - queueNextItem |
מעבר לפריט הבא בתור. עוד... | |
(NSInteger) | - queuePreviousItem |
מעבר לפריט הקודם בתור. עוד... | |
(NSInteger) | - queueSetRepeatMode: |
הגדרת מצב החזרה של התור. עוד... | |
(NSInteger) | - setStreamVolume: |
הגדרת עוצמת הקול של הזרם. עוד... | |
(NSInteger) | - setStreamVolume:customData: |
הגדרת עוצמת הקול של הזרם. עוד... | |
(NSInteger) | - setStreamMuted: |
קובעת אם השידור מושתק. עוד... | |
(NSInteger) | - setStreamMuted:customData: |
קובעת אם השידור מושתק. עוד... | |
(NSInteger) | - requestStatus |
שולח בקשה לקבלת מידע עדכני על סטטוס המדיה מהמקבל. עוד... | |
(NSTimeInterval) | - approximateStreamPosition |
הפונקציה מחזירה את המיקום המשוער בשידור, כפי שמחושב על סמך נתוני השידור האחרונים שהתקבלו ומשך הזמן שחלף מאז העדכון הזה. עוד... | |
(BOOL) | - cancelRequestWithID: |
ביטול בקשה בתהליך. עוד... | |
(instancetype) | - initWithNamespace: |
מאותחל ייעודי. עוד... | |
(void) | - didReceiveTextMessage: |
הפונקציה מופעלת כשמתקבלת הודעת טקסט בערוץ הזה. עוד... | |
(BOOL) | - sendTextMessage: |
שליחת הודעת טקסט בערוץ הזה. עוד... | |
(BOOL) | - sendTextMessage:error: |
שליחת הודעת טקסט בערוץ הזה. עוד... | |
(NSInteger) | - generateRequestID |
יוצר מזהה בקשה להודעה חדשה. עוד... | |
(NSNumber *__nullable) | - generateRequestNumber |
שיטת נוחות שעוטפת את התוצאה של generateRequestID ב-NSNumber. עוד... | |
(void) | - didConnect |
הפונקציה נקראת כשהערוץ הזה מחובר, כדי לציין שעכשיו אפשר להעביר הודעות למכשיר Cast דרך הערוץ הזה. עוד... | |
(void) | - didDisconnect |
הפונקציה הזו מופעלת כשהערוץ הזה מנותק, כדי לציין שלא ניתן יותר להעביר הודעות עם מכשיר Cast דרך הערוץ הזה. עוד... | |
סיכום הנכס | |
GCKMediaStatus * | mediaStatus |
סטטוס המדיה של המדיה שנטענה כרגע, אם יש כזו. אחרת, nil . עוד... | |
NSTimeInterval | timeSinceLastMediaStatusUpdate |
כמות הזמן שחלפה מאז העדכון האחרון של סטטוס המדיה. עוד... | |
GCKError * | lastError |
פרטי השגיאה מהבקשה האחרונה, אם יש כאלה, או nil אם הבקשה האחרונה הושלמה בהצלחה. עוד... | |
id< GCKMediaControlChannelDelegate > | delegate |
הנציג לקבלת התראות על שינויים במצב הערוץ. עוד... | |
NSString * | protocolNamespace |
מרחב השמות של הערוץ. עוד... | |
BOOL | isConnected |
סימון שמציין אם הערוץ מקושר כרגע. עוד... | |
GCKDeviceManager * | deviceManager |
מנהל המכשירים שבו הערוץ הזה רשום, אם יש כזה. עוד... | |
פרטי השיטה
- (instancetype) init |
מאותחל ייעודי.
מטמיע את GCKCastChannel.
- (NSInteger) loadMedia: | (GCKMediaInformation *) | mediaInfo |
טוען ומתחיל הפעלה של פריט מדיה חדש.
- Parameters
-
mediaInfo An object describing the media item to load.
- החזרות
- מזהה הבקשה, או kGCKInvalidRequestID אם לא ניתן היה לשלוח את ההודעה.
- (NSInteger) loadMedia: | (GCKMediaInformation *) | mediaInfo | |
autoplay: | (BOOL) | autoplay | |
טעינה של פריט מדיה חדש והתחלת ההפעלה שלו (אופציונלי).
- Parameters
-
mediaInfo An object describing the media item to load. autoplay Whether playback should start immediately.
- החזרות
- מזהה הבקשה, או kGCKInvalidRequestID אם לא ניתן היה לשלוח את ההודעה.
- (NSInteger) loadMedia: | (GCKMediaInformation *) | mediaInfo | |
autoplay: | (BOOL) | autoplay | |
playPosition: | (NSTimeInterval) | playPosition | |
טעינה של פריט מדיה חדש והתחלת ההפעלה שלו (אופציונלי).
- Parameters
-
mediaInfo An object describing the media item to load. autoplay Whether playback should start immediately. playPosition The initial playback position.
- החזרות
- מזהה הבקשה, או kGCKInvalidRequestID אם לא ניתן היה לשלוח את ההודעה.
- (NSInteger) loadMedia: | (GCKMediaInformation *) | mediaInfo | |
autoplay: | (BOOL) | autoplay | |
playPosition: | (NSTimeInterval) | playPosition | |
customData: | (id __nullable) | customData | |
טעינה של פריט מדיה חדש והתחלת ההפעלה שלו (אופציונלי).
- 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
.
- החזרות
- מזהה הבקשה, או kGCKInvalidRequestID אם לא ניתן היה לשלוח את ההודעה.
- (NSInteger) loadMedia: | (GCKMediaInformation *) | mediaInfo | |
autoplay: | (BOOL) | autoplay | |
playPosition: | (NSTimeInterval) | playPosition | |
activeTrackIDs: | (NSArray< NSNumber * > *__nullable) | activeTrackIDs | |
טעינה של פריט מדיה חדש והתחלת ההפעלה שלו (אופציונלי).
- 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
.
- החזרות
- מזהה הבקשה, או kGCKInvalidRequestID אם לא ניתן היה לשלוח את ההודעה.
- (NSInteger) loadMedia: | (GCKMediaInformation *) | mediaInfo | |
autoplay: | (BOOL) | autoplay | |
playPosition: | (NSTimeInterval) | playPosition | |
activeTrackIDs: | (NSArray< NSNumber * > *__nullable) | activeTrackIDs | |
customData: | (id __nullable) | customData | |
טעינה של פריט מדיה חדש והתחלת ההפעלה שלו (אופציונלי).
- 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
.
- החזרות
- מזהה הבקשה, או kGCKInvalidRequestID אם לא ניתן היה לשלוח את ההודעה.
- (NSInteger) setActiveTrackIDs: | (NSArray< NSNumber * > *__nullable) | activeTrackIDs |
הגדרת המסלולים הפעילים.
הבקשה תיכשל אם אין סטטוס מדיה נוכחי.
- Parameters
-
activeTrackIDs An array of integers specifying the active tracks.
- החזרות
- מזהה הבקשה, או kGCKInvalidRequestID אם לא ניתן היה לשלוח את ההודעה. יכול להיות
nil
או מערך ריק כדי להגדיר את הטראקים הפעילים לרשימה ריקה.
- (NSInteger) setTextTrackStyle: | (GCKMediaTextTrackStyle *__nullable) | textTrackStyle |
הגדרת הסגנון של רצועת הטקסט.
הבקשה תיכשל אם אין סטטוס מדיה נוכחי.
- Parameters
-
textTrackStyle The text track style. The style will not be changed if this is nil
.
- החזרות
- מזהה הבקשה, או kGCKInvalidRequestID אם לא ניתן היה לשלוח את ההודעה.
- (NSInteger) pause |
השהיית ההפעלה של פריט המדיה הנוכחי.
הבקשה תיכשל אם אין סטטוס מדיה נוכחי.
- החזרות
- מזהה הבקשה, או kGCKInvalidRequestID אם לא ניתן היה לשלוח את ההודעה.
- (NSInteger) pauseWithCustomData: | (id __nullable) | customData |
השהיית ההפעלה של פריט המדיה הנוכחי.
הבקשה תיכשל אם אין סטטוס מדיה נוכחי.
- 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
.
- החזרות
- מזהה הבקשה, או kGCKInvalidRequestID אם לא ניתן היה לשלוח את ההודעה.
- (NSInteger) stop |
הפסקת ההפעלה של פריט המדיה הנוכחי.
הבקשה תיכשל אם אין סטטוס מדיה נוכחי. אם תור ההשמעה טעון כרגע, הוא יוסר.
- החזרות
- מזהה הבקשה, או kGCKInvalidRequestID אם לא ניתן היה לשלוח את ההודעה.
- (NSInteger) stopWithCustomData: | (id __nullable) | customData |
הפסקת ההפעלה של פריט המדיה הנוכחי.
הבקשה תיכשל אם אין סטטוס מדיה נוכחי. אם תור ההשמעה טעון כרגע, הוא יוסר.
- 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
.
- החזרות
- מזהה הבקשה, או kGCKInvalidRequestID אם לא ניתן היה לשלוח את ההודעה.
- (NSInteger) play |
מתחיל (או ממשיך) את ההפעלה של פריט המדיה הנוכחי.
ההפעלה תמיד מתחילה בתחילת השידור. הבקשה תיכשל אם אין סטטוס מדיה נוכחי.
- החזרות
- מזהה הבקשה, או kGCKInvalidRequestID אם לא ניתן היה לשלוח את ההודעה.
- (NSInteger) playWithCustomData: | (id __nullable) | customData |
מתחיל (או ממשיך) את ההפעלה של פריט המדיה הנוכחי.
ההפעלה תמיד מתחילה בתחילת השידור. הבקשה תיכשל אם אין סטטוס מדיה נוכחי.
- 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
.
- החזרות
- מזהה הבקשה, או kGCKInvalidRequestID אם לא ניתן היה לשלוח את ההודעה.
- (NSInteger) seekToTimeInterval: | (NSTimeInterval) | position |
מעבר למיקום חדש בפריט המדיה הנוכחי.
הבקשה תיכשל אם אין סטטוס מדיה נוכחי.
- Parameters
-
position The new position from the beginning of the stream.
- החזרות
- מזהה הבקשה, או kGCKInvalidRequestID אם לא ניתן היה לשלוח את ההודעה.
- (NSInteger) seekToTimeInterval: | (NSTimeInterval) | position | |
resumeState: | (GCKMediaControlChannelResumeState) | resumeState | |
מעבר למיקום חדש בפריט המדיה הנוכחי.
הבקשה תיכשל אם אין סטטוס מדיה נוכחי.
- Parameters
-
position The new position interval from the beginning of the stream. resumeState The action to take after the seek operation has finished.
- החזרות
- מזהה הבקשה, או kGCKInvalidRequestID אם לא ניתן היה לשלוח את ההודעה.
- (NSInteger) seekToTimeInterval: | (NSTimeInterval) | position | |
resumeState: | (GCKMediaControlChannelResumeState) | resumeState | |
customData: | (id __nullable) | customData | |
מעבר למיקום חדש בפריט המדיה הנוכחי.
הבקשה תיכשל אם אין סטטוס מדיה נוכחי.
- 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
.
- החזרות
- מזהה הבקשה, או kGCKInvalidRequestID אם לא ניתן היה לשלוח את ההודעה.
- (NSInteger) queueLoadItems: | (NSArray< GCKMediaQueueItem * > *) | queueItems | |
startIndex: | (NSUInteger) | startIndex | |
repeatMode: | (GCKMediaRepeatMode) | repeatMode | |
טעינה והתחלה אופציונלית של הפעלה של תור חדש של פריטי מדיה.
- 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.
- החזרות
- מזהה הבקשה, או kGCKInvalidRequestID אם לא ניתן לשלוח את ההודעה או אם אחד מהפרמטרים לא תקין.
- (NSInteger) queueLoadItems: | (NSArray< GCKMediaQueueItem * > *) | queueItems | |
startIndex: | (NSUInteger) | startIndex | |
repeatMode: | (GCKMediaRepeatMode) | repeatMode | |
customData: | (id __nullable) | customData | |
טעינה והתחלה אופציונלית של הפעלה של תור חדש של פריטי מדיה.
- 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
.
- החזרות
- מזהה הבקשה, או kGCKInvalidRequestID אם לא ניתן לשלוח את ההודעה או אם אחד מהפרמטרים לא תקין.
- (NSInteger) queueLoadItems: | (NSArray< GCKMediaQueueItem * > *) | queueItems | |
startIndex: | (NSUInteger) | startIndex | |
playPosition: | (NSTimeInterval) | playPosition | |
repeatMode: | (GCKMediaRepeatMode) | repeatMode | |
customData: | (id __nullable) | customData | |
טעינה והתחלה אופציונלית של הפעלה של תור חדש של פריטי מדיה.
- 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
.
- החזרות
- מזהה הבקשה, או kGCKInvalidRequestID אם לא ניתן לשלוח את ההודעה או אם אחד מהפרמטרים לא תקין.
- (NSInteger) queueInsertItems: | (NSArray< GCKMediaQueueItem * > *) | queueItems | |
beforeItemWithID: | (NSUInteger) | beforeItemID | |
הוספת רשימה של פריטי מדיה חדשים לתור.
- 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.
- החזרות
- מזהה הבקשה, או kGCKInvalidRequestID אם לא ניתן לשלוח את ההודעה או אם אחד מהפרמטרים לא תקין.
- (NSInteger) queueInsertItems: | (NSArray< GCKMediaQueueItem * > *) | queueItems | |
beforeItemWithID: | (NSUInteger) | beforeItemID | |
customData: | (id __nullable) | customData | |
הוספת רשימה של פריטי מדיה חדשים לתור.
- 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
.
- החזרות
- מזהה הבקשה, או kGCKInvalidRequestID אם לא ניתן לשלוח את ההודעה או אם אחד מהפרמטרים לא תקין.
- (NSInteger) queueInsertItem: | (GCKMediaQueueItem *) | item | |
beforeItemWithID: | (NSUInteger) | beforeItemID | |
שיטה נוחה להוספת פריט יחיד לתור.
- 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.
- החזרות
- מזהה הבקשה, או kGCKInvalidRequestID אם לא ניתן לשלוח את ההודעה או אם אחד מהפרמטרים לא תקין.
- (NSInteger) queueInsertAndPlayItem: | (GCKMediaQueueItem *) | item | |
beforeItemWithID: | (NSUInteger) | beforeItemID | |
שיטה נוחה להוספת פריט יחיד לתור ולהגדרתו כפריט הנוכחי.
- 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.
- החזרות
- מזהה הבקשה, או kGCKInvalidRequestID אם לא ניתן לשלוח את ההודעה או אם אחד מהפרמטרים לא תקין.
- (NSInteger) queueInsertAndPlayItem: | (GCKMediaQueueItem *) | item | |
beforeItemWithID: | (NSUInteger) | beforeItemID | |
playPosition: | (NSTimeInterval) | playPosition | |
customData: | (id __nullable) | customData | |
שיטה נוחה להוספת פריט יחיד לתור ולהגדרתו כפריט הנוכחי.
- 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
.
- החזרות
- מזהה הבקשה, או kGCKInvalidRequestID אם לא ניתן לשלוח את ההודעה או אם אחד מהפרמטרים לא תקין.
- (NSInteger) queueUpdateItems: | (NSArray< GCKMediaQueueItem * > *) | queueItems |
עדכון התור.
- Parameters
-
queueItems The list of updated items.
- החזרות
- מזהה הבקשה, או kGCKInvalidRequestID אם לא ניתן לשלוח את ההודעה או אם אחד מהפרמטרים לא תקין.
- (NSInteger) queueUpdateItems: | (NSArray< GCKMediaQueueItem * > *) | queueItems | |
customData: | (id __nullable) | customData | |
עדכון התור.
- 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
.
- החזרות
- מזהה הבקשה, או kGCKInvalidRequestID אם לא ניתן לשלוח את ההודעה או אם אחד מהפרמטרים לא תקין.
- (NSInteger) queueRemoveItemsWithIDs: | (NSArray< NSNumber * > *) | itemIDs |
הסרת רשימה של פריטי מדיה מהתור.
אם התור מתרוקן כתוצאה מכך, סשן המדיה הנוכחי יסתיים.
- Parameters
-
itemIDs An array of media item IDs identifying the items to remove. Must not be nil
or empty.
- החזרות
- מזהה הבקשה, או kGCKInvalidRequestID אם לא ניתן לשלוח את ההודעה או אם אחד מהפרמטרים לא תקין.
- (NSInteger) queueRemoveItemsWithIDs: | (NSArray< NSNumber * > *) | itemIDs | |
customData: | (id __nullable) | customData | |
הסרת רשימה של פריטי מדיה מהתור.
אם התור מתרוקן כתוצאה מכך, סשן המדיה הנוכחי יסתיים.
- 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
.
- החזרות
- מזהה הבקשה, או kGCKInvalidRequestID אם לא ניתן לשלוח את ההודעה או אם אחד מהפרמטרים לא תקין.
- (NSInteger) queueRemoveItemWithID: | (NSUInteger) | itemID |
שיטה נוחה להסרת פריט יחיד מהתור.
- Parameters
-
itemID The ID of the item to remove.
- החזרות
- מזהה הבקשה, או kGCKInvalidRequestID אם לא ניתן לשלוח את ההודעה או אם אחד מהפרמטרים לא תקין.
- (NSInteger) queueReorderItemsWithIDs: | (NSArray< NSNumber * > *) | queueItemIDs | |
insertBeforeItemWithID: | (NSUInteger) | beforeItemID | |
שינוי הסדר של פריטי מדיה בתור.
- 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.
- החזרות
- מזהה הבקשה, או kGCKInvalidRequestID אם לא ניתן לשלוח את ההודעה או אם אחד מהפרמטרים לא תקין.
- (NSInteger) queueReorderItemsWithIDs: | (NSArray< NSNumber * > *) | queueItemIDs | |
insertBeforeItemWithID: | (NSUInteger) | beforeItemID | |
customData: | (id __nullable) | customData | |
לשנות את הסדר של פריטי מדיה ברשימת ההמתנה.
- 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
.
- החזרות
- מזהה הבקשה, או kGCKInvalidRequestID אם לא ניתן לשלוח את ההודעה או אם אחד מהפרמטרים לא תקין.
- (NSInteger) queueMoveItemWithID: | (NSUInteger) | itemID | |
beforeItemWithID: | (NSUInteger) | beforeItemID | |
שיטה נוחה להעברת פריט יחיד בתור.
- 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.
- החזרות
- מזהה הבקשה, או kGCKInvalidRequestID אם לא ניתן לשלוח את ההודעה או אם אחד מהפרמטרים לא תקין.
- (NSInteger) queueJumpToItemWithID: | (NSUInteger) | itemID |
מעבר לפריט עם המזהה שצוין בתור.
- Parameters
-
itemID The ID of the item to jump to.
- החזרות
- מזהה הבקשה של הבקשה הזו, או kGCKInvalidRequestID אם לא ניתן היה לשלוח את ההודעה.
- (NSInteger) queueJumpToItemWithID: | (NSUInteger) | itemID | |
customData: | (id __nullable) | customData | |
מעבר לפריט עם המזהה שצוין בתור.
- 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
.
- החזרות
- מזהה הבקשה של הבקשה הזו, או kGCKInvalidRequestID אם לא ניתן היה לשלוח את ההודעה.
- (NSInteger) queueJumpToItemWithID: | (NSUInteger) | itemID | |
playPosition: | (NSTimeInterval) | playPosition | |
customData: | (id __nullable) | customData | |
מעבר לפריט עם המזהה שצוין בתור.
- 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
.
- החזרות
- מזהה הבקשה של הבקשה הזו, או kGCKInvalidRequestID אם לא ניתן היה לשלוח את ההודעה.
- (NSInteger) queueNextItem |
מעבר לפריט הבא בתור.
- החזרות
- מזהה הבקשה של הבקשה הזו, או kGCKInvalidRequestID אם לא ניתן היה לשלוח את ההודעה.
- (NSInteger) queuePreviousItem |
מעבר לפריט הקודם בתור.
- החזרות
- מזהה הבקשה של הבקשה הזו, או kGCKInvalidRequestID אם לא ניתן היה לשלוח את ההודעה.
- (NSInteger) queueSetRepeatMode: | (GCKMediaRepeatMode) | repeatMode |
הגדרת מצב החזרה של התור.
- Parameters
-
repeatMode The new repeat mode.
- החזרות
- מזהה הבקשה, או kGCKInvalidRequestID אם לא ניתן לשלוח את ההודעה או אם אחד מהפרמטרים לא תקין.
- (NSInteger) setStreamVolume: | (float) | volume |
הגדרת עוצמת הקול של הזרם.
הבקשה תיכשל אם אין סשן מדיה פעיל.
- Parameters
-
volume The new volume, in the range [0.0 - 1.0].
- החזרות
- מזהה הבקשה, או kGCKInvalidRequestID אם לא ניתן היה לשלוח את ההודעה.
- (NSInteger) setStreamVolume: | (float) | volume | |
customData: | (id __nullable) | customData | |
הגדרת עוצמת הקול של הזרם.
הבקשה תיכשל אם אין סשן מדיה פעיל.
- 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
.
- החזרות
- מזהה הבקשה, או kGCKInvalidRequestID אם לא ניתן היה לשלוח את ההודעה.
- (NSInteger) setStreamMuted: | (BOOL) | muted |
קובעת אם השידור מושתק.
הבקשה תיכשל אם אין סשן מדיה פעיל.
- Parameters
-
muted Whether the stream should be muted or unmuted.
- החזרות
- מזהה הבקשה, או kGCKInvalidRequestID אם לא ניתן היה לשלוח את ההודעה.
- (NSInteger) setStreamMuted: | (BOOL) | muted | |
customData: | (id __nullable) | customData | |
קובעת אם השידור מושתק.
הבקשה תיכשל אם אין סשן מדיה פעיל.
- 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
.
- החזרות
- מזהה הבקשה, או kGCKInvalidRequestID אם לא ניתן היה לשלוח את ההודעה.
- (NSInteger) requestStatus |
שולח בקשה לקבלת מידע עדכני על סטטוס המדיה מהמקבל.
- החזרות
- מזהה הבקשה, או kGCKInvalidRequestID אם לא ניתן היה לשלוח את ההודעה.
- (NSTimeInterval) approximateStreamPosition |
הפונקציה מחזירה את המיקום המשוער בשידור, כפי שמחושב על סמך נתוני השידור האחרונים שהתקבלו ומשך הזמן שחלף מאז העדכון הזה.
הפונקציה מחזירה 0 אם הערוץ לא מחובר או אם לא נטען כרגע מדיה.
- (BOOL) cancelRequestWithID: | (NSInteger) | requestID |
ביטול בקשה בתהליך.
ביטול בקשה לא מונע את הביצוע שלה, אלא רק מציין שהאפליקציה ששלחה את הבקשה כבר לא מעוניינת בתוצאות שלה, ולכן כל מצב שמשויך למעקב אחרי הבקשה ינוקה.
- Parameters
-
requestID The ID of the request to cancel.
- החזרות
YES
אם הבקשה בוטלה, אוNO
אם אין בקשה במעקב עם המזהה שצוין.
- (instancetype) initWithNamespace: | (NSString *) | protocolNamespace |
מאותחל ייעודי.
יוצר GCKCastChannel חדש עם מרחב השמות שצוין.
- Parameters
-
protocolNamespace The namespace.
הוטמע ב-GCKGenericChannel.
- (void) didReceiveTextMessage: | (NSString *) | message |
הפונקציה מופעלת כשמתקבלת הודעת טקסט בערוץ הזה.
ההטמעה שמוגדרת כברירת מחדל היא ללא תפעול (no-op).
- Parameters
-
message The message.
- (BOOL) sendTextMessage: | (NSString *) | message |
שליחת הודעת טקסט בערוץ הזה.
- Parameters
-
message The message.
- החזרות
YES
אם הפעולה הצליחה אוNO
אם לא ניתן לשלוח את ההודעה (כי הערוץ לא מחובר או כי מאגר השליחה מלא מדי כרגע).
- Deprecated:
- משתמשים ב-sendTextMessage:error: שמספק מידע מפורט על השגיאה.
- (BOOL) sendTextMessage: | (NSString *) | message | |
error: | (GCKError *__nullable *__nullable) | error | |
שליחת הודעת טקסט בערוץ הזה.
- Parameters
-
message The message. error A pointer at which to store the error result. May be nil
.
- החזרות
YES
אם הפעולה הצליחה אוNO
אם אי אפשר היה לשלוח את ההודעה.
- (NSInteger) generateRequestID |
יוצר מזהה בקשה להודעה חדשה.
- החזרות
- המזהה שנוצר, או kGCKInvalidRequestID אם הערוץ לא מקושר כרגע.
- (NSNumber * __nullable) generateRequestNumber |
שיטת נוחות שעוטפת את התוצאה של generateRequestID ב-NSNumber.
- החזרות
- המזהה שנוצר, או
nil
אם הערוץ לא מקושר כרגע.
- (void) didConnect |
הפונקציה נקראת כשהערוץ הזה מחובר, כדי לציין שעכשיו אפשר להעביר הודעות למכשיר Cast דרך הערוץ הזה.
ההטמעה שמוגדרת כברירת מחדל היא ללא תפעול (no-op).
- (void) didDisconnect |
הפונקציה הזו מופעלת כשהערוץ הזה מנותק, כדי לציין שלא ניתן יותר להעביר הודעות עם מכשיר Cast דרך הערוץ הזה.
ההטמעה שמוגדרת כברירת מחדל היא ללא תפעול (no-op).
פרטי הנכס
|
readnonatomicstrong |
סטטוס המדיה של המדיה שנטענה כרגע, אם יש כזו. אחרת, nil
.
|
readnonatomicassign |
כמות הזמן שחלפה מאז העדכון האחרון של סטטוס המדיה.
אם בקשת סטטוס נמצאת כרגע בתהליך, הערך יהיה 0.
|
readnonatomiccopy |
פרטי השגיאה מהבקשה האחרונה, אם יש כאלה, או nil
אם הבקשה האחרונה הושלמה בהצלחה.
|
readwritenonatomicweak |
הנציג לקבלת התראות על שינויים במצב הערוץ.
|
readnonatomiccopyinherited |
מרחב השמות של הערוץ.
|
readnonatomicassigninherited |
סימון שמציין אם הערוץ מקושר כרגע.
|
readnonatomicweakinherited |
מנהל המכשירים שבו הערוץ הזה רשום, אם יש כזה.
- Deprecated:
- אם הערוץ הזה לא נרשם באמצעות המחלקה GCKDeviceManager שהוצאה משימוש, הערך יהיה
nil
.