طلب لإعادة ترتيب قائمة عناصر الوسائط في قائمة الانتظار.
الشركة المصنِّعة
QueueReorderItemsRequest
new
QueueReorderItemsRequest(itemIdsToReorder)
المَعلمة
itemIdsToReorder
مصفوفة أرقام
قائمة معرّفات عناصر الوسائط المطلوب
إعادة ترتيبها. يجب ألا يكون صفرًا أو فارغًا.
يجب ألا تكون القيمة فارغة.
أماكن إقامة
customData
كائن قابل للقيم الفارغة
بيانات مخصّصة لتطبيق المُستلِم.
insertBefore
رقم قابل للقيم الفارغة
رقم تعريف العنصر الذي سيتم العثور عليه مباشرةً بعد القائمة المُعاد ترتيبها.
في حال عدم العثور على قيمة فارغة أو عدم توفّرها، سيتم إلحاق القائمة المُعاد ترتيبها في نهاية
قائمة الانتظار. لا يمكن أن يكون هذا المعرّف أحد المعرّفات في قائمة itemId.
itemIds
مصفوفة أرقام غير فارغة
قائمة معرّفات عناصر الوسائط المطلوب إعادة ترتيبها، بالترتيب الجديد. وستبقى السلع التي لم يتم تقديمها
الطلب الحالي (بدون إعادة
طلب السلع). سيتم إدراج القائمة المقدمة في الموضع الذي يحدده الإدخال Insertقبل.
مثال:
في حال عدم تحديد InsertFrom
قائمة الانتظار الحالية: "A""",D"""G"""H"""B"""E" itemIds: "D"""H""B"
طلب جديد: "A"""G"""E"""""H""B"
إذا كانت قيمة insertApply هي "أ"
في قائمة الانتظار الحالية: "أ" و"د"""و"" و"ح"" و"ب"
أرقام تعريف العناصر: "د""س"""ب"
طلب جديد: "د""و""و"ب""آ"""""ه""
إذا كانت قيمة InsertIf تساوي "G"
قائمة الانتظار الحالية: "أ" و"د""و"غ""""و""و"ب"
أرقام تعريف العناصر: "د""و"""ب"
طلب جديد: "أ" و"د""و""""""""""ه""
في حال عدم توفُّر أي من العناصر، سيتم تجاهله.
يجب ألا يكون صفرًا أو فارغًا.
تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003e\u003ccode\u003echrome.cast.media.QueueReorderItemsRequest\u003c/code\u003e is used to change the playback order of media items within a queue on a cast receiver.\u003c/p\u003e\n"],["\u003cp\u003eIt requires a list of media item IDs (\u003ccode\u003eitemIds\u003c/code\u003e) to reorder and optionally an \u003ccode\u003einsertBefore\u003c/code\u003e item ID to specify the position in the queue.\u003c/p\u003e\n"],["\u003cp\u003eItems not specified in the \u003ccode\u003eitemIds\u003c/code\u003e array retain their original order relative to each other, with the reordered items inserted as a block.\u003c/p\u003e\n"],["\u003cp\u003eThe reordered items are placed before the item specified by \u003ccode\u003einsertBefore\u003c/code\u003e, or appended to the end of the queue if \u003ccode\u003einsertBefore\u003c/code\u003e is not provided or is invalid.\u003c/p\u003e\n"],["\u003cp\u003eCustom data can be passed to the receiver application using the \u003ccode\u003ecustomData\u003c/code\u003e property.\u003c/p\u003e\n"]]],["The `QueueReorderItemsRequest` class is used to rearrange media items within a queue. It requires an array of `itemIds` to specify the items and their new order. The `insertBefore` property determines where to place the reordered list; if null, it's appended to the end. Items not listed retain their positions, while non-existent items are ignored. Custom data for the receiver can be set. The reordered list will be in the position as specified in the `insertBefore` property.\n"],null,["# Class: QueueReorderItemsRequest\n\nchrome.[cast](/cast/docs/reference/web_sender/chrome.cast).[media](/cast/docs/reference/web_sender/chrome.cast.media).QueueReorderItemsRequest\n==============================================================================================================================================\n\nclass static\n\nA request to reorder a list of media items in the queue.\n\nConstructor\n-----------\n\n### QueueReorderItemsRequest\n\nnew\nQueueReorderItemsRequest(itemIdsToReorder)\n\n| #### Parameter ||\n|------------------|-----------------------------------------------------------------------------------------------------------|\n| itemIdsToReorder | Array of number The list of media item IDs to reorder. Must not be null or empty. Value must not be null. |\n\nProperties\n----------\n\n### customData\n\nnullable Object\n\nCustom data for the receiver application.\n\n### insertBefore\n\nnullable number\n\nID of the item that will be located immediately after the reordered list.\nIf null or not found, the reordered list will be appended at the end of\nthe queue. This ID can not be one of the IDs in the itemIds list.\n\n### itemIds\n\nnon-null Array of number\n\nThe list of media item IDs to reorder, in the new order. Items not\nprovided will keep their existing order (without the items being\nreordered). The provided list will be inserted at the position determined\nby insertBefore.\n\nFor example:\n\nIf insertBefore is not specified\nExisting queue: \"A\",\"D\",\"G\",\"H\",\"B\",\"E\"\nitemIds: \"D\",\"H\",\"B\"\nNew Order: \"A\",\"G\",\"E\",\"D\",\"H\",\"B\"\n\nIf insertBefore is \"A\"\nExisting queue: \"A\",\"D\",\"G\",\"H\",\"B\"\nitemIds: \"D\",\"H\",\"B\"\nNew Order: \"D\",\"H\",\"B\",\"A\",\"G\",\"E\"\n\nIf insertBefore is \"G\"\nExisting queue: \"A\",\"D\",\"G\",\"H\",\"B\"\nitemIds: \"D\",\"H\",\"B\"\nNew Order: \"A\",\"D\",\"H\",\"B\",\"G\",\"E\"\n\nIf any of the items does not exist it will be ignored.\nMust not be null or empty."]]