مصفوفة من معرّفات TrackId التي يجب أن تكون نشطة. وإذا لم تتوفر المصفوفة، ستكون المسارات التلقائية نشطة.
في حال تقديم معرّفَي track غير متوافقَين (على سبيل المثال مقطعان صوتيان نشطان)،
سيتعذّر تنفيذ الأمر مع INVALID_PARAMETER.
التشغيل التلقائي
boolean
ما إذا كان سيتم تشغيل الوسائط تلقائيًا أم لا.
customData
كائن قابل للقيم الفارغة
مجموعة بيانات مخصصة من خلال تطبيق المُستلِم.
itemId
رقم قابل للقيم الفارغة
المعرّف الفريد للسلعة في قائمة الانتظار. وإذا تم استخدامه في
chrome.cast.media.QueueLoad أو chrome.cast.media.QueueInsert، يجب
أن يكون فارغًا (لأنه سيتم تخصيصه من قِبل المتلقي عند إنشاء/إدراج عنصر لأول مرة). أمّا العمليات الأخرى، فيكون إلزاميًا.
مدة تشغيل العنصر بالثواني وإذا كانت أطول من المدة الفعلية - startTime (وقت البدء)، ستقتصر المدة على المدة الفعلية - startTime (وقت البدء). ويمكن أن يكون العدد سالبًا، وفي هذه الحالة ستكون المدة
هي مدة السلعة الفعلية مطروحًا منها المدة المقدّمة. وتشير المدة التي تكون قيمتها صفر إلى أنه لن يتم تشغيل العنصر.
preloadTime
الرقم
هذه المَعلمة هي تلميح للمستلم بتحميل عنصر الوسائط هذا مسبقًا
قبل تشغيله. وتتيح هذه الميزة التنقّل بسلاسة بين العناصر
التي يتم تشغيلها من قائمة المحتوى التالي.
ويتم التعبير عن الوقت بالثواني، مقارنةً ببداية تشغيل هذا العنصر (عادةً ما تكون نهاية تشغيل العنصر السابق). القيم الموجبة فقط هي الصالحة. على سبيل المثال، إذا كانت القيمة
10 ثوانٍ، سيتم تحميل هذا العنصر مسبقًا قبل 10 ثوانٍ من انتهاء
العنصر السابق. سيحاول المستلِم استخدام هذه القيمة ولكنّه لن
يضمنها، على سبيل المثال إذا كانت القيمة أكبر من مدة العنصر السابق،
قد يحمِّل المُستلِم هذا العنصر مسبقًا بعد وقت قصير
من بدء تشغيل العنصر السابق (لن يتم مطلقًا
تحميل عنصرين
مسبقًا بالتوازي). بالإضافة إلى ذلك، إذا تم إدراج عنصر في قائمة الانتظار بعد العنصر الحالي مباشرةً ووقت التحميل المُسبق أعلى من الوقت المتبقي على العنصر الحالي، سيتم تنفيذ عملية التحميل المُسبق في أقرب وقت ممكن.
تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003e\u003ccode\u003echrome.cast.media.QueueItem\u003c/code\u003e represents an item within a media queue, like a song in a playlist.\u003c/p\u003e\n"],["\u003cp\u003eIt's constructed using \u003ccode\u003emediaInfo\u003c/code\u003e, which describes the media (e.g., title, artist).\u003c/p\u003e\n"],["\u003cp\u003eKey properties include \u003ccode\u003emedia\u003c/code\u003e, \u003ccode\u003estartTime\u003c/code\u003e, \u003ccode\u003eplaybackDuration\u003c/code\u003e, and \u003ccode\u003eautoplay\u003c/code\u003e, allowing control over playback.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003epreloadTime\u003c/code\u003e hints to the receiver to preload the item for smoother transitions.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eactiveTrackIds\u003c/code\u003e enables specifying active tracks (like subtitles or audio languages).\u003c/p\u003e\n"]]],["A `QueueItem` represents an item in a media queue and requires `mediaInfo`. Key properties include: `activeTrackIds` (tracks to be active), `autoplay` (automatic playback), `customData` (application-specific data), `itemId` (unique identifier), `media` (media description), `playbackDuration` (playback time), `preloadTime` (time to preload before playback), and `startTime` (playback start time). `itemId` must be null when creating but mandatory for other operations. `preloadTime` hints when to load next.\n"],null,["# Class: QueueItem\n\nchrome.[cast](/cast/docs/reference/web_sender/chrome.cast).[media](/cast/docs/reference/web_sender/chrome.cast.media).QueueItem\n===============================================================================================================================\n\nclass static\n\nRepresents an item in a media queue.\n\nConstructor\n-----------\n\n### QueueItem\n\nnew\nQueueItem(mediaInfo)\n\n| #### Parameter ||\n|-----------|-------------------------------------------------------------------------------------------------------------------------------|\n| mediaInfo | [chrome.cast.media.MediaInfo](/cast/docs/reference/web_sender/chrome.cast.media.MediaInfo) Media info Value must not be null. |\n\nProperties\n----------\n\n### activeTrackIds\n\nnullable Array of number\n\nArray of Track trackIds that should be active. If the array is not\nprovided, the default tracks will be active.\nIf two incompatible trackIds are provided (for example two active audio\ntracks) the command will fail with INVALID_PARAMETER.\n\n### autoplay\n\nboolean\n\nWhether the media will automatically play.\n\n### customData\n\nnullable Object\n\nCustom data set by the receiver application.\n\n### itemId\n\nnullable number\n\nUnique identifier of the item in the queue. If used in\nchrome.cast.media.QueueLoad or chrome.cast.media.QueueInsert it must be\nnull (as it will be assigned by the receiver when an item is first\ncreated/inserted). For other operations it is mandatory.\n\n### media\n\nnon-null [chrome.cast.media.MediaInfo](/cast/docs/reference/web_sender/chrome.cast.media.MediaInfo)\n\nMedia description.\n\n### playbackDuration\n\nnullable number\n\nPlayback duration of the item in seconds. If it is larger than the actual\nduration - startTime it will be limited to the actual duration -\nstartTime. It can be negative, in such case the duration will be the\nactual item duration minus the duration provided. A duration of value\nzero effectively means that the item will not be played.\n\n### preloadTime\n\nnumber\n\nThis parameter is a hint for the receiver to preload this media item\nbefore it is played. It allows for a smooth transition between items\nplayed from the queue.\n\nThe time is expressed in seconds, relative to\nthe beginning of this item playback (usually the end of the previous item\nplayback). Only positive values are valid. For example, if the value is\n10 seconds, this item will be preloaded 10 seconds before the previous\nitem has finished. The receiver will try to honor this value but will not\nguarantee it, for example if the value is larger than the previous item\nduration the receiver may just preload this item shortly after the\nprevious item has started playing (there will never be two items being\npreloaded in parallel). Also, if an item is inserted in the queue just\nafter the currentItem and the time to preload is higher than the time\nleft on the currentItem, the preload will just happen as soon as\npossible.\n\n### startTime\n\nnumber\n\nSeconds from the beginning of the media to start playback."]]