큐 항목 정보입니다. 애플리케이션 개발자는 Cast.framework.messages.InsertQueueItems를 사용하여 큐 요소를 삽입하기 위해 QueueItem을 만들어야 할 수 있습니다. 이 경우 itemId를 제공하면 안 됩니다. 항목이 큐에 삽입될 때 실제 itemId가 할당되기 때문입니다. 이렇게 하면 발신기 앱에서 추가된 항목과 ID의 충돌을 방지할 수 있습니다.
생성자
QueueItem
새 QueueItem(opt_itemId)
매개변수
opt_itemId
선택사항
숫자
상품 ID입니다.
속성
activeTrackIds
(null이 아닌 숫자 배열이거나 정의되지 않음)
활성 트랙 트랙 ID의 배열입니다. 배열이 제공되지 않으면 기본 트랙이 활성화됩니다.
자동재생
(불리언 또는 정의되지 않음)
자동재생 매개변수가 지정되지 않거나 true인 경우 항목이 currentItem이 되면 미디어 플레이어는 대기열의 요소 재생을 시작합니다.
customData
(null을 허용하는 객체 또는 정의되지 않음)
애플리케이션은 필요한 추가 대기열 항목 정보를 정의할 수 있습니다.
itemId
(숫자 또는 정의되지 않음)
큐에 있는 항목의 고유 식별자입니다. LOAD 또는 INSERT의 경우 항목이 처음 생성/삽입될 때 수신기에 의해 할당되므로 이 속성은 선택사항입니다.
이 매개변수는 미디어 항목이 재생되기 전에 수신기에서 이 미디어 항목을 미리 로드할 수 있게 하는 힌트입니다. 따라서 대기열에서 재생되는 항목 간에 원활하게 전환할 수 있습니다. 시간은 이 항목 재생의 시작 (일반적으로 이전 항목 재생의 끝)을 기준으로 한 초 단위로 표시됩니다. 예를 들어 값이 10초이면 이 항목은 이전 항목이 완료되기 10초 전에 미리 로드됩니다. broadcast receiver는 이 값을 적용하려고 하지만 반드시 보장하지는 않습니다. 예를 들어 값이 이전 항목 기간보다 큰 경우 이전 항목이 재생을 시작한 직후에 이 항목을 미리 로드할 수 있습니다(항목이 두 개 동시에 미리 로드되지 않음). 또한 currentItem 바로 뒤에 항목이 큐에 삽입되고 미리 로드하는 시간이 currentItem에 남은 시간보다 길면 미리 로드가 최대한 빨리 발생합니다. 음수 값은 미리 로드를 명시적으로 사용 중지합니다. 값이 0이거나 정의되지 않은 경우 재생 위치 후 이전 항목이 완전히 다운로드되는 즉시 미디어 항목이 미리 로드되기 시작합니다.
startTime
(숫자 또는 정의되지 않음)
콘텐츠 시작 후 경과된 시간(초)입니다. 콘텐츠가 실시간 콘텐츠이고 startTime을 지정하지 않으면 스트림이 실시간 위치에서 시작됩니다.
[null,null,["최종 업데이트: 2025-07-25(UTC)"],[[["\u003cp\u003e\u003ccode\u003eQueueItem\u003c/code\u003e objects represent items within a media queue, holding information like media metadata, playback settings, and custom data.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can create \u003ccode\u003eQueueItem\u003c/code\u003e instances to insert elements into the queue, but should omit the \u003ccode\u003eitemId\u003c/code\u003e for new items to avoid conflicts.\u003c/p\u003e\n"],["\u003cp\u003eKey properties of a \u003ccode\u003eQueueItem\u003c/code\u003e include \u003ccode\u003emedia\u003c/code\u003e for content details, \u003ccode\u003eautoplay\u003c/code\u003e and \u003ccode\u003estartTime\u003c/code\u003e for playback control, and \u003ccode\u003epreloadTime\u003c/code\u003e to optimize transitions.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ecustomData\u003c/code\u003e property allows developers to attach application-specific information to queue items for extended functionality.\u003c/p\u003e\n"],["\u003cp\u003eExisting queue items can be identified and managed using their unique \u003ccode\u003eitemId\u003c/code\u003e, assigned by the receiver upon insertion.\u003c/p\u003e\n"]]],["`QueueItem` stores queue element information. Developers create it for inserting queue elements, omitting `itemId` to prevent collisions. Key properties include: `activeTrackIds` (active track IDs), `autoplay` (automatic playback), `customData` (extra data), `media` (metadata), `orderId` (original order), `preloadTime` (preloading hint), and `startTime` (content start time). `itemId` is assigned by the receiver during creation/insertion, and `preloadTime` helps smooth transitions between queued items.\n"],null,["# Class: QueueItem\n\ncast.[framework](/cast/docs/reference/web_receiver/cast.framework).[messages](/cast/docs/reference/web_receiver/cast.framework.messages).QueueItem\n==================================================================================================================================================\n\nclass static\n\nQueue item information. Application developers may need to create a QueueItem\nto insert a queue element using\ncast.framework.messages.InsertQueueItems. In this case they should\nnot provide an itemId (as the actual itemId will be assigned when the item is\ninserted in the queue). This prevents ID collisions with items added from a\nsender app.\n\nConstructor\n-----------\n\n### QueueItem\n\nnew\nQueueItem(opt_itemId)\n\n| #### Parameter ||\n|------------|------------------------------|\n| opt_itemId | Optional number The item ID. |\n\nProperties\n----------\n\n### activeTrackIds\n\n(non-null Array of number or undefined)\n\nArray of Track trackIds that are active. If the array is not provided,\nthe default tracks will be active.\n\n### autoplay\n\n(boolean or undefined)\n\nIf the autoplay parameter is not specified or is true, the media player\nwill begin playing the element in the queue when the item becomes the\ncurrentItem.\n\n### customData\n\n(nullable Object or undefined)\n\nThe application can define any extra queue item information needed.\n\n### itemId\n\n(number or undefined)\n\nUnique identifier of the item in the queue. The attribute is optional\nbecause for LOAD or INSERT should not be provided (as it will be assigned\nby the receiver when an item is first created/inserted).\n\n### media\n\n(non-null [cast.framework.messages.MediaInformation](/cast/docs/reference/web_receiver/cast.framework.messages.MediaInformation) or undefined)\n\nMetadata (including contentId) of the playlist element.\n\n### orderId\n\n(number or undefined)\n\nUsed to track original order of an item in the queue to undo shuffle.\n\n### preloadTime\n\n(number or undefined)\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. The time is expressed in seconds, relative to the\nbeginning of this item playback (usually the end of the previous item\nplayback). For example, if the value is 10 seconds, this item will be\npreloaded 10 seconds before the previous item has finished. The receiver\nwill try to honor this value but will not guarantee it, for example if\nthe value is larger than the previous item duration the receiver may just\npreload this item shortly after the previous item has started playing\n(there will never be two items being preloaded in parallel). Also, if an\nitem is inserted in the queue just after the currentItem and the time to\npreload is higher than the time left on the currentItem, the preload will\njust happen as soon as possible. Negative values explicitly disable\npreloading. If the value is 0 or undefined, the media item will start to\npreload as soon as the previous item is fully downloaded after its\nplayback position.\n\n### startTime\n\n(number or undefined)\n\nSeconds since beginning of content. If the content is live content, and\nstartTime is not specified, the stream will start at the live position."]]