מחלקה של GCKMediaQueueItem

חומר עזר בנושא סיווג GCKMediaQueueItem

סקירה כללית

מחלקה שמייצגת פריט מסוג 'הבאים בתור' למדיה.

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

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

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

עוברת בירושה את NSObject. יישום <NSCopy>.

סיכום של שיטת המכונה

(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

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