قائمة عناصر قائمة الانتظار
يجب أن يكون حقل معرّف السلعة فارغًا، وإلا سيتعذّر تنفيذ الطلب
مع ظهور خطأ INVALID_PARAMS. يتم ترتيب العنصر (سيتم تشغيل العنصر الأول أولاً).
الثواني (منذ بداية المحتوى) لبدء تشغيل أول
عنصر سيتم تشغيله.
وفي حال توفير هذه القيمة، سيكون لها الأولوية على قيمة startTime
المقدّمة على مستوى QueueItem ولكن في المرة الأولى فقط
تشغيل العنصر. وينطبق هذا على الحالة الشائعة التي يحوّل فيها المستخدم العنصر الذي كان يجري تشغيله محليًا، ولذلك لا ينطبق الوقت الحالي على العنصر بشكل دائم كما هو الحال بالنسبة إلى وقت بدء عنصر QueueItem. وتجنّب الحاجة إلى إعادة ضبط وقت البدء ديناميكيًا (قد لا يكون ذلك ممكنًا إذا كان الهاتف في وضع السكون).
customData
(كائن غير فارغ أو غير محدد)
البيانات الخاصة بالتطبيق لهذا الطلب. وتتيح هذه الخدمة للمرسِل والمستلِم توسيع بروتوكول الوسائط بسهولة بدون الحاجة إلى استخدام مساحة اسم جديدة مع الرسائل المخصّصة.
رقم لمزامنة جميع أوامر قائمة الانتظار.
وفي حال توفير هذه الأداة لأحد طلبات قائمة المحتوى التالي، ستتحقّق حزمة تطوير البرامج (SDK) من تطابق أحدث رقم تسلسلي لقائمة الانتظار مع الطلب.
يتم توفير التسلسل الحالي رقم كجزء من الرسائل التي تم تغييرها في قائمة الانتظار الصادرة.
فهرس العنصر في مصفوفة السلع الذي يجب أن يكون أول عنصر حالي (العنصر الذي سيتم تشغيله أولاً). يُرجى العِلم أنّ هذا هو فهرس المصفوفة (يبدأ بـ 0) وليس itemId (لأنّه لا يكون معروفًا حتى يتم إنشاء قائمة الانتظار). إذا تم ضبط RePEAT_OFF على REPEAT_OFF وسينتهي التشغيل عند تشغيل آخر عنصر في المصفوفة (لن يتم تشغيل العناصر السابقة لفهرس startIndex).
قد يكون ذلك مفيدًا لسيناريوهات الحالات التي يكون فيها المستخدم يستخدم تطبيق المُرسِل، وفي المنتصف يقرِّر البث. وبهذه الطريقة، لا يحتاج تطبيق المرسِل إلى الربط بين مواضع قائمة الانتظار المحلية والبعيدة أو حفظ طلب QUEUE_UPDATE إضافي.
تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","easyToUnderstand","thumb-up"],["ساعَدني المحتوى في حلّ مشكلتي.","solvedMyProblem","thumb-up"],["غير ذلك","otherUp","thumb-up"]],[["لا يحتوي على المعلومات التي أحتاج إليها.","missingTheInformationINeed","thumb-down"],["الخطوات معقدة للغاية / كثيرة جدًا.","tooComplicatedTooManySteps","thumb-down"],["المحتوى قديم.","outOfDate","thumb-down"],["ثمة مشكلة في الترجمة.","translationIssue","thumb-down"],["مشكلة في العيّنات / التعليمات البرمجية","samplesCodeIssue","thumb-down"],["غير ذلك","otherDown","thumb-down"]],["تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003e\u003ccode\u003eQueueLoadRequestData\u003c/code\u003e is used to load a queue of media items for playback within the Cast framework.\u003c/p\u003e\n"],["\u003cp\u003eIt includes properties like \u003ccode\u003eitems\u003c/code\u003e (array of queue items), \u003ccode\u003ecurrentTime\u003c/code\u003e (playback start time), and \u003ccode\u003erepeatMode\u003c/code\u003e (queue behavior).\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003estartIndex\u003c/code\u003e property allows specifying the initial playback position within the queue.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003ecustomData\u003c/code\u003e can be used to send application-specific information along with the request.\u003c/p\u003e\n"],["\u003cp\u003eRequest parameters like \u003ccode\u003emediaSessionId\u003c/code\u003e, \u003ccode\u003erequestId\u003c/code\u003e, and \u003ccode\u003esequenceNumber\u003c/code\u003e help manage and synchronize queue operations.\u003c/p\u003e\n"]]],["`QueueLoadRequestData` defines the data for a media event queue load request. Key actions include constructing it with a non-null array of `QueueItem` objects, where each item's `itemId` should be empty. It allows setting a `currentTime` for the first item's playback start, overriding the `QueueItem`'s `startTime`. `customData` facilitates application-specific extensions. Properties include `repeatMode` for queue behavior, `startIndex` for initial playback position, and `sequenceNumber` for command synchronization.\n"],null,["cast.[framework](/cast/docs/reference/web_receiver/cast.framework).[messages](/cast/docs/reference/web_receiver/cast.framework.messages).QueueLoadRequestData \nclass static\n\nMedia event queue LOAD request data.\n\nConstructor\n\nQueueLoadRequestData\n\nnew\nQueueLoadRequestData(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\ncurrentTime\n\n(number or undefined)\n\nSeconds (since the beginning of content) to start playback of the first\nitem to be played.\nIf provided, this value will take precedence over the startTime value\nprovided at the QueueItem level but only the first time the item is\nplayed. This is to cover the common case where the user casts the item\nthat was playing locally 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\ncustomData\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\nitems\n\nnon-null Array of non-null [cast.framework.messages.QueueItem](/cast/docs/reference/web_receiver/cast.framework.messages.QueueItem)\n\nArray of queue items. It is sorted (first element will be played first).\n\nmediaSessionId\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\nrepeatMode\n\n([cast.framework.messages.RepeatMode](/cast/docs/reference/web_receiver/cast.framework.messages#.RepeatMode) or undefined)\n\nBehavior of the queue when all items have been played.\n\nrequestId\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\nsequenceNumber\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)\n\nstartIndex\n\n(number or undefined)\n\nThe index of the item in the items array that must be the first\ncurrentItem (the item that will be played first). Note this is the index\nof the array (starts at 0) and not the itemId (as it is not known until\nthe queue is created). If repeatMode is REPEAT_OFF playback will end when\nthe last item in the array is played (elements before the startIndex will\nnot be played).\nThis may be useful for continuation scenarios where the user was already\nusing the sender app and in the middle decides to cast. In this way the\nsender app does not need to map between the local and remote queue\npositions or saves one extra QUEUE_UPDATE request."]]