Lớp GCKMediaQueueLoadOptions
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Các tuỳ chọn tải các mục trong hàng đợi nội dung nghe nhìn bằng GCKRemoteMediaClient.
- Năm thành lập
- 4,3
Kế thừa NSObject, <NSCopying> và <NSSecureCoding>.
Trình khởi tạo được chỉ định.
Khởi động GCKMediaLoadOptions với các giá trị mặc định cho mọi thuộc tính.
- (NSUInteger) startIndex |
|
readwritenonatomicassign |
Chỉ mục của mục trong mảng các mục trong hàng đợi sẽ được phát trước.
- (NSTimeInterval) playPosition |
|
readwritenonatomicassign |
Vị trí phát ban đầu cho mục đầu tiên trong mảng các mục trong hàng đợi khi mục được phát lần đầu tiên, so với đầu luồng.
Giá trị này bị bỏ qua khi phát lại cùng một mục, chẳng hạn như khi hàng đợi lặp lại hoặc sau đó mục được chuyển đến. Trong những trường hợp đó, hệ thống sẽ sử dụng startTime của mục.
Chế độ lặp lại để phát danh sách chờ.
Tuỳ chỉnh dữ liệu dành riêng cho ứng dụng để truyền cùng với yêu cầu.
Phải là một đối tượng có thể chuyển đổi tuần tự thành JSON bằng NSJSONSerialization hoặc nil
.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-25 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[[["\u003cp\u003e\u003ccode\u003eGCKMediaQueueLoadOptions\u003c/code\u003e provides options for loading media queue items using \u003ccode\u003eGCKRemoteMediaClient\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIt allows you to specify the starting index, initial playback position, and repeat mode for the media queue.\u003c/p\u003e\n"],["\u003cp\u003eYou can also include custom application-specific data with the request.\u003c/p\u003e\n"],["\u003cp\u003eThe class inherits from \u003ccode\u003eNSObject\u003c/code\u003e, \u003ccode\u003eNSCopying\u003c/code\u003e, and \u003ccode\u003eNSSecureCoding\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eAn initialized \u003ccode\u003eGCKMediaQueueLoadOptions\u003c/code\u003e object contains default values for all its properties.\u003c/p\u003e\n"]]],[],null,["# GCKMediaQueueLoadOptions Class\n\n[Instance Methods](#pub-methods) \\| [Properties](#properties) \nGCKMediaQueueLoadOptions Class Reference \n\nOverview\n--------\n\nOptions for loading media queue items with [GCKRemoteMediaClient](/cast/docs/reference/ios/interface_g_c_k_remote_media_client \"A class for controlling media playback on a Cast receiver. \").\n\nSince\n: 4.3\n\nInherits NSObject, \\\u003cNSCopying\\\u003e, and \\\u003cNSSecureCoding\\\u003e.\n\n|----------------|---------------------------------------------------------------------------------------------------------------|\n| Instance Method Summary ----------------------- ||\n| (instancetype) | - [init](/cast/docs/reference/ios/interface_g_c_k_media_queue_load_options#a5d77d969b4d06bfed6846e15053c531c) |\n| | Designated initializer. [More...](#a5d77d969b4d06bfed6846e15053c531c) |\n| ||\n\n|--------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Property Summary ---------------- ||\n| NSUInteger | [startIndex](/cast/docs/reference/ios/interface_g_c_k_media_queue_load_options#a5eb6ef7f3d3af41dea5870ce4a1e3ad4) |\n| | The index of the item in the queue items array that should be played first. [More...](#a5eb6ef7f3d3af41dea5870ce4a1e3ad4) |\n| ||\n| NSTimeInterval | [playPosition](/cast/docs/reference/ios/interface_g_c_k_media_queue_load_options#a0ceb653bbd2d8ad8586b23d7ab7ed383) |\n| | The initial playback position for the first item in the queue items array when it is first played, relative to the beginning of the stream. [More...](#a0ceb653bbd2d8ad8586b23d7ab7ed383) |\n| ||\n| [GCKMediaRepeatMode](/cast/docs/reference/ios/g_c_k_media_common_8h#aad72b610da8ac7e1785975bd5f251406) | [repeatMode](/cast/docs/reference/ios/interface_g_c_k_media_queue_load_options#aee30969b09b5d08bbd882c55163c43a1) |\n| | The repeat mode for playing the queue. [More...](#aee30969b09b5d08bbd882c55163c43a1) |\n| ||\n| id | [customData](/cast/docs/reference/ios/interface_g_c_k_media_queue_load_options#a082d80574820ded01cd226feca05cef8) |\n| | Custom application-specific data to pass along with the request. [More...](#a082d80574820ded01cd226feca05cef8) |\n| ||\n\nMethod Detail\n-------------\n\n|-----------------------|---|---|---|\n| - (instancetype) init | | | |\n\nDesignated initializer.\n\nInitializes a [GCKMediaLoadOptions](/cast/docs/reference/ios/interface_g_c_k_media_load_options \"Options for loading media with GCKRemoteMediaClient. \") with default values for all properties.\n\nProperty Detail\n---------------\n\n|-------------------------------------------------------------|--------------------------|\n| |---------------------------| | - (NSUInteger) startIndex | | readwritenonatomicassign |\n\nThe index of the item in the queue items array that should be played first. \n\n|-------------------------------------------------------------------------|--------------------------|\n| |---------------------------------| | - (NSTimeInterval) playPosition | | readwritenonatomicassign |\n\nThe initial playback position for the first item in the queue items array when it is first played, relative to the beginning of the stream.\n\nThis 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. \n\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------|\n| |-----------------------------------------------------------------------------------------------------------------------| | - ([GCKMediaRepeatMode](/cast/docs/reference/ios/g_c_k_media_common_8h#aad72b610da8ac7e1785975bd5f251406)) repeatMode | | readwritenonatomicassign |\n\nThe repeat mode for playing the queue. \n\n|---------------------------------------------|--------------------------|\n| |-------------------| | - (id) customData | | readwritenonatomicstrong |\n\nCustom application-specific data to pass along with the request.\n\nMust either be an object that can be serialized to JSON using [**NSJSONSerialization**](https://goo.gl/0vd4Q2), or `nil`."]]