[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\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."]]