قائمة عناصر قائمة الانتظار
يجب أن يكون حقل معرّف السلعة فارغًا، وإلا سيتعذّر تنفيذ الطلب
مع ظهور خطأ INVALID_PARAMS. يتم ترتيب العنصر (سيتم تشغيل العنصر الأول أولاً).
رقم تعريف عنصر الوسائط الحالي بعد الإدراج (إذا لم يتم توفيره، ستكون قيمة العنصر الحالي هي نفسها القيمة قبل الإدراج).
currentItemIndex
(رقم أو غير محدد)
الفهرس (بالنسبة إلى مصفوفة العناصر، يبدأ بالرقم 0) لعنصر الوسائط الحالي الجديد. بالنسبة إلى العناصر المدرجة، نستخدم الفهرس (يشبه startIndex في QUEUE_LOAD) وليس currentItemId، لأنّ معرّف itemId غير معروف إلى أن يتم إدراج العناصر. في حال عدم توفير القيمة، ستكون قيمة currentItem نفسها
هي نفسها القيمة التي كانت عليها قبل الإدراج (ما لم يتم تقديم معرّف Currents الحالي).
تسمح هذه المعلَمة بإنشاء حالة الاستخدام الشائعة لإدراج عنصر وتشغيله.
currentTime
(رقم أو غير محدد)
تمثّل هذه السمة ثوانٍ منذ بداية المحتوى لبدء تشغيل العنصر الحالي. وفي حال توفير هذه القيمة، سيتم منحها الأولوية على قيمة startTime
المقدّمة على مستوى QueueItem ولكن في المرة الأولى فقط
تشغيل العنصر. يتناول هذا الأمر الحالة الشائعة التي ينتقل فيها المستخدم إلى منتصف العنصر كي لا ينطبق الوقت الحالي على العنصر بشكل دائم كما ينطبق على QueueItem startTime. وتجنّب الحاجة إلى إعادة ضبط وقت البدء ديناميكيًا (قد لا يكون ذلك ممكنًا إذا كان الهاتف في وضع السكون).
customData
(كائن غير فارغ أو غير محدد)
البيانات الخاصة بالتطبيق لهذا الطلب. وتتيح هذه الخدمة للمرسِل والمستلِم توسيع بروتوكول الوسائط بسهولة بدون الحاجة إلى استخدام مساحة اسم جديدة مع الرسائل المخصّصة.
رقم تعريف العنصر الذي سيتم وضعه بعد القائمة المدرجة مباشرةً.
إذا لم يتم العثور على المعرّف أو لم يتم تقديمه، سيتمّ إلحاق القائمة
في نهاية القائمة الحالية.
رقم لمزامنة جميع أوامر قائمة الانتظار.
وفي حال توفير هذه الأداة لأحد طلبات قائمة المحتوى التالي، ستتحقّق حزمة تطوير البرامج (SDK) من تطابق أحدث رقم تسلسلي لقائمة الانتظار مع الطلب.
يتم توفير التسلسل الحالي رقم كجزء من الرسائل التي تم تغييرها في قائمة الانتظار الصادرة.
تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003e\u003ccode\u003eQueueInsertRequestData\u003c/code\u003e is used to request insertion of media items into the queue.\u003c/p\u003e\n"],["\u003cp\u003eIt provides parameters to specify the items to be inserted, their position in the queue, and playback behavior.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eitems\u003c/code\u003e field is mandatory and contains an array of \u003ccode\u003eQueueItem\u003c/code\u003e objects representing the media to be inserted.\u003c/p\u003e\n"],["\u003cp\u003eProperties such as \u003ccode\u003ecurrentItemId\u003c/code\u003e, \u003ccode\u003ecurrentItemIndex\u003c/code\u003e, and \u003ccode\u003ecurrentTime\u003c/code\u003e allow for controlling playback after insertion.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003einsertBefore\u003c/code\u003e enables specifying the insertion point within the existing queue.\u003c/p\u003e\n"]]],[],null,["# Class: QueueInsertRequestData\n\ncast.[framework](/cast/docs/reference/web_receiver/cast.framework).[messages](/cast/docs/reference/web_receiver/cast.framework.messages).QueueInsertRequestData\n===============================================================================================================================================================\n\nclass static\n\nMedia event queue INSERT request data.\n\nConstructor\n-----------\n\n### QueueInsertRequestData\n\nnew\nQueueInsertRequestData(items)\n\n| #### Parameter ||\n|-------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| items | Array of non-null [cast.framework.messages.QueueItem](/cast/docs/reference/web_receiver/cast.framework.messages.QueueItem) List of queue items. The itemId field of the items should be empty or the request will fail with an INVALID_PARAMS error. It is sorted (first element will be played first). Value must not be null. |\n\nExtends\n: [cast.framework.messages.RequestData](/cast/docs/reference/web_receiver/cast.framework.messages.RequestData)\n\nProperties\n----------\n\n### currentItemId\n\n(number or undefined)\n\nID of the current media Item after the insertion (if not provided, the\ncurrentItem value will be the same as before the insertion).\n\n### currentItemIndex\n\n(number or undefined)\n\nIndex (relative to the items array, starting with 0) of the new current\nmedia Item. For inserted items we use the index (similar to startIndex in\nQUEUE_LOAD) and not currentItemId, because the itemId is unknown until\nthe items are inserted. If not provided, the currentItem value will be\nthe same as before the insertion (unless currentItemId is provided).\nThis param allows to make atomic the common use case of insert and play\nan item.\n\n### currentTime\n\n(number or undefined)\n\nSeconds since the beginning of content to start playback of the current\nitem. If provided, this value will take precedence over the startTime\nvalue provided at the QueueItem level but only the first time the item is\nplayed. This is to cover the common case where the user jumps to the\nmiddle of an item so the currentTime does not apply to the item\npermanently like the QueueItem startTime does. It avoids having to reset\nthe startTime dynamically (that may not be possible if the phone has gone\nto sleep).\n\n### customData\n\n(non-null Object or undefined)\n\nApplication-specific data for this request. It enables the sender and\nreceiver to easily extend the media protocol without having to use a new\nnamespace with custom messages.\n\nInherited from\n: [cast.framework.messages.RequestData#customData](/cast/docs/reference/web_receiver/cast.framework.messages.RequestData#customData)\n\n### insertBefore\n\n(number or undefined)\n\nID of the item that will be located immediately after the inserted list.\nIf the ID is not found or it is not provided, the list will be appended\nat the end of the existing list.\n\n### items\n\nnon-null Array of non-null [cast.framework.messages.QueueItem](/cast/docs/reference/web_receiver/cast.framework.messages.QueueItem)\n\nList of queue items. The itemId field of the items should be empty. It is\nsorted (first element will be played first).\n\n### mediaSessionId\n\n(number or undefined)\n\nId of the media session that the request applies to.\n\nInherited from\n: [cast.framework.messages.RequestData#mediaSessionId](/cast/docs/reference/web_receiver/cast.framework.messages.RequestData#mediaSessionId)\n\n### requestId\n\nnumber\n\nId of the request, used to correlate request/response.\n\nInherited from\n: [cast.framework.messages.RequestData#requestId](/cast/docs/reference/web_receiver/cast.framework.messages.RequestData#requestId)\n\n### sequenceNumber\n\n(number or undefined)\n\nA number to synchronize all queue commands.\nIf provided for a queue command, the SDK will verify the queue latest\nsequence number match the request.\nCurrent sequenceNumber is provided as part of outgoing queue changed\nmessages.\n\nInherited from\n: [cast.framework.messages.RequestData#sequenceNumber](/cast/docs/reference/web_receiver/cast.framework.messages.RequestData#sequenceNumber)"]]