[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003e\u003ccode\u003ePlayerData\u003c/code\u003e provides essential information about the media being played, including its current state, position, and metadata.\u003c/p\u003e\n"],["\u003cp\u003eIt includes details like active track IDs, break information, playback rate, and supported media commands.\u003c/p\u003e\n"],["\u003cp\u003eIt offers data related to live streams, such as \u003ccode\u003eisAtLiveEdge\u003c/code\u003e and \u003ccode\u003eliveSeekableRange\u003c/code\u003e, as well as custom states for UI logic.\u003c/p\u003e\n"],["\u003cp\u003eProperties like \u003ccode\u003edisplayStatus\u003c/code\u003e and \u003ccode\u003edisplayType\u003c/code\u003e control how and what media information should be displayed.\u003c/p\u003e\n"],["\u003cp\u003eAccess media information, including title, duration, thumbnail URL, and metadata, through the \u003ccode\u003emedia\u003c/code\u003e and \u003ccode\u003emetadata\u003c/code\u003e properties.\u003c/p\u003e\n"]]],[],null,["# Class: PlayerData\n\ncast.[framework](/cast/docs/reference/web_receiver/cast.framework).[ui](/cast/docs/reference/web_receiver/cast.framework.ui).PlayerData\n=======================================================================================================================================\n\nclass static\n\nPlayer data. Provide the player media and break state.\n\nConstructor\n-----------\n\n### PlayerData\n\nnew\nPlayerData()\n\nProperties\n----------\n\n### activeTrackIds\n\nnon-null Array of number\n\nActive track ids of current media.\n\n### applicationData\n\nnullable [cast.framework.ui.ApplicationData](/cast/docs/reference/web_receiver/cast.framework.ui.ApplicationData)\n\nApplication data.\n\n### breakPercentagePositions\n\nnon-null Array of number\n\nArray of breaks positions in percentage.\nDeprecated - is not updated for breaks in live or dynamic breaks.\n\nDeprecated\n: Use the \\`breaks\\` property of\n [cast.framework.ui.PlayerData#media](/cast/docs/reference/web_receiver/cast.framework.ui.PlayerData#media) instead.\n\n### breakTitle\n\nstring\n\nTitle of the current playing break.\n\n### currentBreakClipNumber\n\nnumber\n\nThe number of the current playing break clip in the break.\n\n### currentTime\n\nnumber\n\nMedia current position in seconds, or break current position if playing\nbreak.\n\n### customState\n\nnullable Object\n\nUser custom state, Should be used to separate playback and UI logic,\nto allow same UI code to run in a remote control.\nThe state can be set by calling\n[cast.framework.PlayerManager#sendCustomState](/cast/docs/reference/web_receiver/cast.framework.PlayerManager#sendCustomState)\n\n### displayStatus\n\nboolean\n\nWhether the player metadata (ie: title, currentTime) should be displayed.\nThis will be true if at least one field in the metadata should be\ndisplayed. In some cases, displayStatus will be true, but parts of the\nmetadata should be hidden (ie: the media title while media is seeking).\nIn these cases, additional css can be applied to hide those elements. For\ncases where the media is audio-only, this will almost always be true. In\ncases where the media is video, this will be true when: (1) the video is\nloading, buffering, or seeking (2) a play request was made in the last\nfive seconds while media is already playing, (3) there is a request made\nto show the status in the last five seconds, or (4) the media was paused\nin the last five seconds.\n\n### displayType\n\nstring\n\nProperty to differentiate between different screen types. TV is default.\n\n### duration\n\nnumber\n\nMedia duration in seconds, Or break duration if playing break.\n\n### isAtLiveEdge\n\nboolean\n\nIndicate if the media stream is playing at live edge.\n\n### isBreakSkippable\n\nboolean\n\nIndicate that break clip can be skipped at the current moment. True when\nwhenSkippable == 0.\n\n### isLive\n\nboolean\n\nIndicate if the content is a live stream.\n\n### isPlayingBreak\n\nboolean\n\nIndicate that the receiver is playing a break.\n\n### isSeeking\n\nboolean\n\nIndicate the player is seeking (can be either during playing or pausing).\n\n### liveSeekableRange\n\nnullable [cast.framework.messages.LiveSeekableRange](/cast/docs/reference/web_receiver/cast.framework.messages.LiveSeekableRange)\n\nIndicate the seekable range of the content if it is a live stream.\n\n### media\n\n(nullable [cast.framework.messages.MediaInformation](/cast/docs/reference/web_receiver/cast.framework.messages.MediaInformation) or undefined)\n\nCurrent media information.\n\n### mediaCategory\n\nnullable [cast.framework.messages.MediaCategory](/cast/docs/reference/web_receiver/cast.framework.messages#.MediaCategory)\n\nThe media category (video, audio, or image).\n\n### mediaSessionId\n\nnumber\n\nUnique id for media session. It is updated when a new load request\nis received.\n\n### mediaStartAbsoluteTime\n\nnullable number\n\nIndicates absolute time (Epoch 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### metadata\n\n(nullable [cast.framework.messages.MediaMetadata](/cast/docs/reference/web_receiver/cast.framework.messages.MediaMetadata) or nullable Object)\n\nMedia metadata.\n\n### nextMetadata\n\n(nullable [cast.framework.messages.MediaMetadata](/cast/docs/reference/web_receiver/cast.framework.messages.MediaMetadata) or nullable Object)\n\nNext item metadata.\n\n### nextSubtitle\n\nstring\n\nNext Item subtitle.\n\n### nextThumbnailUrl\n\nstring\n\nNext Item thumbnail url.\n\n### nextTitle\n\nstring\n\nNext Item title.\n\n### numberBreakClips\n\nnumber\n\nNumber of break clips in current break.\n\n### playbackRate\n\nnumber\n\nMedia playback rate.\n\n### preloadingNext\n\nboolean\n\nFlag to show/hide next item metadata.\n\n### queueData\n\n(nullable [cast.framework.messages.QueueData](/cast/docs/reference/web_receiver/cast.framework.messages.QueueData) or undefined)\n\nQueue data.\n\n### secondaryImageUrl\n\nstring\n\nContent secondary image url.\n\n### sectionDuration\n\nnullable number\n\nIndicate the section duration in seconds.\n\n### sectionStartTimeInMedia\n\nnullable number\n\nIndicate the section start time, in media time in seconds.\n\n### state\n\n[cast.framework.ui.State](/cast/docs/reference/web_receiver/cast.framework.ui#.State)\n\nCurrent player state.\n\n### supportedMediaCommands\n\nnumber\n\nThe commands supported by this player.\n\nSee also\n: [cast.framework.messages.Command](/cast/docs/reference/web_receiver/cast.framework.messages#.Command)\n\n### thumbnailUrl\n\nstring\n\nContent thumbnail url.\n\n### title\n\nstring\n\nContent title.\n\n### whenSkippable\n\n(number or undefined)\n\nProvide the time remaining till a break will become skippable relative\nto current playback time. Undefined or a negative value if break is not\nskippable."]]