מחלקת GCKMediaQueueItem

הפניה למחלקה GCKMediaQueueItem

סקירה כללית

מחלקת ייצוג של פריט בתור להפעלת מדיה.

מופעים של האובייקט הזה הם בלתי ניתנים לשינוי.

המחלקות האלה משמשות לתקשורת דו-כיוונית בין אפליקציית השולח לאפליקציית המקבל. השולח בונה אותם כדי לטעון או להוסיף רשימה של פריטי מדיה באפליקציה של המקבל. ההודעה GCKMediaStatus מהמקבל מכילה גם את רשימת הפריטים שמיוצגים כמופעים של המחלקה הזו.

אחרי הטעינה, המקבל יקצה מזהה פריט ייחודי לכל GCKMediaQueueItem, גם אם אותו מדיה נטען כמה פעמים.

המחלקות האלה יורשות מ-NSObject. ‫Implements <NSCopying>.

סיכום שיטות המופע

(instancetype) - initWithMediaInformation:autoplay:startTime:preloadTime:activeTrackIDs:customData:
 יוצרת GCKMediaQueueItem חדש עם המאפיינים שצוינו. עוד...
 
(instancetype) - initWithMediaInformation:autoplay:startTime:playbackDuration:preloadTime:activeTrackIDs:customData:
 מאותחל ייעודי. עוד...
 
(void) - clearItemID
 מנקה (מבטל את ההקצאה של) את מזהה הפריט. עוד...
 
(instancetype) - mediaQueueItemModifiedWithBlock:
 מחזירה עותק של GCKMediaQueueItem ששונה על ידי הבלוק הנתון. עוד...
 

סיכום הנכס

GCKMediaInformationmediaInformation
 פרטי המדיה שמשויכים לפריט הזה. עוד...
 
NSUInteger itemID
 מזהה הפריט, או kGCKMediaQueueInvalidItemID אם עדיין לא הוקצה מזהה. עוד...
 
BOOL autoplay
 האם הפריט יתחיל לפעול אוטומטית כשהוא יהפוך לפריט הנוכחי בתור. עוד...
 
NSTimeInterval startTime
 שעת ההתחלה של הפריט, בשניות. עוד...
 
NSTimeInterval playbackDuration
 משך ההפעלה של הפריט, בשניות, או INFINITY אם צריך להשתמש במשך בפועל של הסטרימינג. עוד...
 
NSTimeInterval preloadTime
 כמה זמן לפני שהפריט הקודם מסתיים, בשניות, לפני שהמקלט צריך להתחיל בטעינה מראש של הפריט הזה. עוד...
 
NSArray< NSNumber * > * activeTrackIDs
 מזהי הרצועות הפעילות של הפריט הזה. עוד...
 
id customData
 הנתונים המותאמים אישית שמשויכים לפריט הזה, אם יש כאלה. עוד...
 

פרטי השיטה

- (instancetype) initWithMediaInformation: (GCKMediaInformation *)  mediaInformation
autoplay: (BOOL)  autoplay
startTime: (NSTimeInterval)  startTime
preloadTime: (NSTimeInterval)  preloadTime
activeTrackIDs: (NSArray< NSNumber * > *__nullable)  activeTrackIDs
customData: (id __nullable)  customData 

יוצרת GCKMediaQueueItem חדש עם המאפיינים שצוינו.

מידע נוסף מופיע במסמכי התיעוד של המאפיינים המתאימים.

Parameters
mediaInformationThe media information for the item.
autoplayThe autoplay state for this item.
startTimeThe start time of the item, in seconds. May be kGCKInvalidTimeInterval if this item refers to a live stream or if the default start time should be used.
preloadTimeThe preload time for the item, in seconds. May be kGCKInvalidTimeInterval to indicate no preload time.
activeTrackIDsThe active track IDs for the item. May be nil.
customDataAny custom data to associate with the item. May be nil.
- (instancetype) initWithMediaInformation: (GCKMediaInformation *)  mediaInformation
autoplay: (BOOL)  autoplay
startTime: (NSTimeInterval)  startTime
playbackDuration: (NSTimeInterval)  playbackDuration
preloadTime: (NSTimeInterval)  preloadTime
activeTrackIDs: (NSArray< NSNumber * > *__nullable)  activeTrackIDs
customData: (id __nullable)  customData 

מאותחל ייעודי.

יוצרת GCKMediaQueueItem חדש עם המאפיינים שצוינו. מידע נוסף מופיע במסמכי התיעוד של המאפיינים המתאימים.

Parameters
mediaInformationThe media information for the item.
autoplayThe autoplay state for this item.
startTimeThe start time of the item, in seconds. May be kGCKInvalidTimeInterval if this item refers to a live stream or if the default start time should be used.
playbackDurationThe playback duration of the item, in seconds. May be kGCKInvalidTimeInterval to indicate no preload time.
preloadTimeThe preload time for the item, in seconds.
activeTrackIDsThe active track IDs for the item. May be nil.
customDataAny custom data to associate with the item. May be nil.
- (void) clearItemID

מנקה (מבטל את ההקצאה של) את מזהה הפריט.

צריך להפעיל את הפונקציה הזו כדי להשתמש מחדש במופע קיים, למשל כדי להוסיף אותו בחזרה לתור.

- (instancetype) mediaQueueItemModifiedWithBlock: (void(^)(GCKMediaQueueItemBuilder *builder))  block

מחזירה עותק של GCKMediaQueueItem ששונה על ידי הבלוק הנתון.

Parameters
blockA block that receives a GCKMediaQueueItemBuilder which can be used to modify attributes of the copy. It is not necessary to call the builder's build (GCKMediaQueueItemBuilder) method within the block, as this method will do that automatically when the block completes.
החזרות
עותק ששונה של הפריט הזה.

פרטי הנכס

- (GCKMediaInformation*) mediaInformation
readnonatomicstrong

פרטי המדיה שמשויכים לפריט הזה.

- (NSUInteger) itemID
readnonatomicassign

מזהה הפריט, או kGCKMediaQueueInvalidItemID אם עדיין לא הוקצה מזהה.

- (BOOL) autoplay
readnonatomicassign

האם הפריט יתחיל לפעול אוטומטית כשהוא יהפוך לפריט הנוכחי בתור.

אם הערך הוא NO, התור יושהה כשהוא יגיע לפריט הזה. ערך ברירת המחדל הוא YES.

- (NSTimeInterval) startTime
readnonatomicassign

שעת ההתחלה של הפריט, בשניות.

ערך ברירת המחדל הוא kGCKInvalidTimeInterval, שמציין שלא הוגדרה שעת התחלה.

- (NSTimeInterval) playbackDuration
readnonatomicassign

משך ההפעלה של הפריט, בשניות, או INFINITY אם צריך להשתמש במשך בפועל של הסטרימינג.

- (NSTimeInterval) preloadTime
readnonatomicassign

כמה זמן לפני שהפריט הקודם מסתיים, בשניות, לפני שהמקלט צריך להתחיל בטעינה מראש של הפריט הזה.

ערך ברירת המחדל הוא kGCKInvalidTimeInterval, שמציין שלא הוגדר זמן טעינה מראש.

- (NSArray<NSNumber *>*) activeTrackIDs
readnonatomicstrong

מזהי הרצועות הפעילות של הפריט הזה.

- (id) customData
readnonatomicstrong

הנתונים המותאמים אישית שמשויכים לפריט הזה, אם יש כאלה.