Entidade alternativa a ser usada para carregar a mídia no app Android TV.
Se definido, ele vai substituir o valor definido na entidade se o receptor for um app para Android TV. No lado do receptor, a entidade pode ser acessada em MediaInfo#getEntity().
Lista parcial de clipes de interrupção que inclui o clipe de intervalo atual que
o receptor está reproduzindo ou aqueles que o receptor vai reproduzir logo depois,
em vez de enviar a lista inteira de clipes. Isso evita o excesso de mensagens MediaStatus.
Identifica o conteúdo. Normalmente, é um URL, mas pode ser qualquer identificador de string.
contentType
string
Tipo de conteúdo MIME da mídia.
contentUrl
(string ou indefinido)
URL de mídia opcional, para permitir o uso de contentId para ID real.
Se contentUrl for fornecido, ele será usado como URL de mídia. Caso contrário, contentId será usado como o URL de mídia.
customData
objeto anulável
Dados personalizados definidos pelo app receptor.
visualização
número anulável
Duração do conteúdo em segundos. Pode ser nulo para mídia com o tipo
chrome.cast.media.StreamType.LIVE.
entidade
(string ou indefinido)
Entidade de mídia opcional, geralmente um link direto do Google Assistente.
Descreve o conteúdo de mídia. O valor precisa ser um dos objetos chrome.cast.media.*Metadata.
startAbsoluteTime
(número ou indefinido)
Fornece o tempo absoluto (tempo Unix Epoch em segundos) para transmissões ao vivo.
Para o evento ao vivo, seria a hora em que o evento começou. Caso contrário, será o início do intervalo pesquisável quando o streaming começar.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Não contém as informações de que eu preciso","missingTheInformationINeed","thumb-down"],["Muito complicado / etapas demais","tooComplicatedTooManySteps","thumb-down"],["Desatualizado","outOfDate","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Problema com as amostras / o código","samplesCodeIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-07-25 UTC."],[[["\u003cp\u003e\u003ccode\u003echrome.cast.media.MediaInfo\u003c/code\u003e is a class that describes a media item, including its content, type, duration, and other relevant information.\u003c/p\u003e\n"],["\u003cp\u003eIt requires \u003ccode\u003econtentId\u003c/code\u003e and \u003ccode\u003econtentType\u003c/code\u003e to be instantiated, representing the unique identifier and MIME type of the media respectively.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eMediaInfo\u003c/code\u003e objects have various properties like \u003ccode\u003eduration\u003c/code\u003e, \u003ccode\u003estreamType\u003c/code\u003e, \u003ccode\u003etracks\u003c/code\u003e, and custom data to provide detailed metadata about the media item.\u003c/p\u003e\n"],["\u003cp\u003eThis class allows developers to specify how media should be loaded and handled by the Cast receiver, such as defining breaks, user action states, and ad requests.\u003c/p\u003e\n"],["\u003cp\u003eProperties like \u003ccode\u003econtentUrl\u003c/code\u003e, \u003ccode\u003eentity\u003c/code\u003e, and \u003ccode\u003eatvEntity\u003c/code\u003e offer flexibility in identifying and accessing media content on different platforms and devices.\u003c/p\u003e\n"]]],[],null,["# Class: MediaInfo\n\nchrome.[cast](/cast/docs/reference/web_sender/chrome.cast).[media](/cast/docs/reference/web_sender/chrome.cast.media).MediaInfo\n===============================================================================================================================\n\nclass static\n\nDescribes a media item.\n\nConstructor\n-----------\n\n### MediaInfo\n\nnew\nMediaInfo(contentId, contentType)\n\n| #### Parameter ||\n|-------------|-----------------------------------------|\n| contentId | string Unique identifier for the media. |\n| contentType | string MIME content type of the media. |\n\nProperties\n----------\n\n### atvEntity\n\n(string or undefined)\n\nAlternate entity to be used to load the media in Android TV app.\n\nIf set, this will override the value set in entity if the receiver is an\nAndroid TV app. On the receiver side, the entity can be accessed from\nMediaInfo#getEntity().\n\n### breakClips\n\n(non-null Array of non-null [chrome.cast.media.BreakClip](/cast/docs/reference/web_sender/chrome.cast.media.BreakClip) or undefined)\n\nPartial list of break clips that includes current break clip that\nreceiver is playing or ones that receiver will play shortly after,\ninstead of sending whole list of clips. This is to avoid overflow of\nMediaStatus message.\n\n### breaks\n\n(non-null Array of non-null [chrome.cast.media.Break](/cast/docs/reference/web_sender/chrome.cast.media.Break) or undefined)\n\nList of breaks.\n\n### contentId\n\nstring\n\nIdentifies the content. Typically a URL, but can be any string\nidentifier.\n\n### contentType\n\nstring\n\nMIME content type of the media.\n\n### contentUrl\n\n(string or undefined)\n\nOptional media URL, to allow using contentId for real ID.\nIf contentUrl is provided, it will be used as media URL, otherwise\nthe contentId will be used as the media URL.\n\n### customData\n\nnullable Object\n\nCustom data set by the receiver application.\n\n### duration\n\nnullable number\n\nDuration of the content, in seconds. May be null for media with type\nchrome.cast.media.StreamType.LIVE.\n\n### entity\n\n(string or undefined)\n\nOptional media entity, commonly a Google Assistant deep link.\n\n### hlsSegmentFormat\n\n(non-null [chrome.cast.media.HlsSegmentFormat](/cast/docs/reference/web_sender/chrome.cast.media#.HlsSegmentFormat) or undefined)\n\nThe format of the HLS audio segment.\n\n### hlsVideoSegmentFormat\n\n(non-null [chrome.cast.media.HlsVideoSegmentFormat](/cast/docs/reference/web_sender/chrome.cast.media#.HlsVideoSegmentFormat) or undefined)\n\nThe format of the HLS video segment.\n\n### metadata\n\nany type\n\nDescribes the media content. The value should be one of the\nchrome.cast.media.\\*Metadata objects.\n\n### startAbsoluteTime\n\n(number or undefined)\n\nProvides absolute time (Epoch Unix time in seconds) for live streams.\nFor live event it would be the time the event started, otherwise\nit will be start of the seekable range when the streaming started.\n\n### streamType\n\nnon-null [chrome.cast.media.StreamType](/cast/docs/reference/web_sender/chrome.cast.media#.StreamType)\n\nThe type of media stream.\n\n### textTrackStyle\n\nnullable [chrome.cast.media.TextTrackStyle](/cast/docs/reference/web_sender/chrome.cast.media.TextTrackStyle)\n\nThe requested text track style. If not provided, the device style\npreferences (if existing) will be used.\n\n### tracks\n\nnullable Array of non-null [chrome.cast.media.Track](/cast/docs/reference/web_sender/chrome.cast.media.Track)\n\nArray of Track objects.\n\n### userActionStates\n\n(non-null Array of non-null [chrome.cast.media.UserActionState](/cast/docs/reference/web_sender/chrome.cast.media.UserActionState) or undefined)\n\nIndicates the user action state for media.\nIndicate user like, dislike, or follow actions for the media.\n\n### vmapAdsRequest\n\n(non-null [chrome.cast.media.VastAdsRequest](/cast/docs/reference/web_sender/chrome.cast.media.VastAdsRequest) or undefined)\n\nVMAP ad request configuration.\nUsed if breaks and breakClips are not provided."]]