类:MediaStatus
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003e\u003ccode\u003eMediaStatus\u003c/code\u003e represents the current status of a media session, including playback state, current time, and volume.\u003c/p\u003e\n"],["\u003cp\u003eIt provides detailed information about the media being played, such as media information, queue details, and active tracks.\u003c/p\u003e\n"],["\u003cp\u003eThe class includes properties for various playback controls and settings like \u003ccode\u003eplaybackRate\u003c/code\u003e, \u003ccode\u003erepeatMode\u003c/code\u003e, and \u003ccode\u003esupportedMediaCommands\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eMediaStatus\u003c/code\u003e also reports on the current break status, live seekable range, and extended status information.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can access application-specific data through the \u003ccode\u003ecustomData\u003c/code\u003e property.\u003c/p\u003e\n"]]],[],null,["# Class: MediaStatus\n\ncast.[framework](/cast/docs/reference/web_receiver/cast.framework).[messages](/cast/docs/reference/web_receiver/cast.framework.messages).MediaStatus\n====================================================================================================================================================\n\nclass static\n\nRepresents the status of a media session.\n\nConstructor\n-----------\n\n### MediaStatus\n\nnew\nMediaStatus()\n\nProperties\n----------\n\n### activeTrackIds\n\n(non-null Array of number or undefined)\n\nA list of IDs corresponding to the active tracks.\n\n### breakStatus\n\n(non-null [cast.framework.messages.BreakStatus](/cast/docs/reference/web_receiver/cast.framework.messages.BreakStatus) or undefined)\n\nContains information about the currently-playing break.\n\n### currentItemId\n\n(number or undefined)\n\nThe ID of this media item (the item that originated the status change).\n\n### currentTime\n\nnumber\n\nThe current playback position.\n\n### customData\n\n(non-null Object or undefined)\n\nApplication-specific media status data.\n\n### extendedStatus\n\n(non-null [cast.framework.messages.ExtendedMediaStatus](/cast/docs/reference/web_receiver/cast.framework.messages.ExtendedMediaStatus) or undefined)\n\nThe extended media status information. It is used to broadcast additional\nplayer states beyond the four main ones, namely `IDLE`, `PLAYING`,\n`PAUSED`, and `BUFFERING`. Currently it is used only to signal the\ninitial loading of a media item. In that case `MediaStatus#playerState`\nis `IDLE`, but `ExtendedMediaStatus#playerState` is `LOADING`.\n\n### idleReason\n\n(non-null [cast.framework.messages.IdleReason](/cast/docs/reference/web_receiver/cast.framework.messages#.IdleReason) or undefined)\n\nIf the state is IDLE, the reason the player went to IDLE state.\n\n### items\n\n(non-null Array of non-null [cast.framework.messages.QueueItem](/cast/docs/reference/web_receiver/cast.framework.messages.QueueItem) or undefined)\n\nList of media queue items.\n\n### liveSeekableRange\n\n(non-null [cast.framework.messages.LiveSeekableRange](/cast/docs/reference/web_receiver/cast.framework.messages.LiveSeekableRange) or undefined)\n\nThe seekable range of a live or event stream. This uses the relative\nmedia time, in seconds. It is `undefined` for VOD streams.\n\n### loadingItemId\n\n(number or undefined)\n\nThe ID of the currently-loading media item. If there is no item being\nloaded, this is `undefined`.\n\n### media\n\n(non-null [cast.framework.messages.MediaInformation](/cast/docs/reference/web_receiver/cast.framework.messages.MediaInformation) or undefined)\n\nThe media information.\n\n### mediaSessionId\n\nnumber\n\nThe unique session ID.\n\n### playbackRate\n\nnumber\n\nThe playback rate.\n\n### playerState\n\nnon-null [cast.framework.messages.PlayerState](/cast/docs/reference/web_receiver/cast.framework.messages#.PlayerState)\n\nThe playback state.\n\n### preloadedItemId\n\n(number or undefined)\n\nID of the next item. This ID is only available if that item has been\npreloaded. Media items can be partially preloaded and cached, so when\nthey are loaded later on, the process is faster (as the media does not\nhave to be fetched from the network).\n\n### queueData\n\n(non-null [cast.framework.messages.QueueData](/cast/docs/reference/web_receiver/cast.framework.messages.QueueData) or undefined)\n\nQueue data.\n\n### repeatMode\n\n(non-null [cast.framework.messages.RepeatMode](/cast/docs/reference/web_receiver/cast.framework.messages#.RepeatMode) or undefined)\n\nThe behavior of the queue when all items have been played.\n\n### supportedMediaCommands\n\nnumber\n\nThe commands supported by this player.\n\n### type\n\nnon-null [cast.framework.messages.MessageType](/cast/docs/reference/web_receiver/cast.framework.messages#.MessageType)\n\n### videoInfo\n\n(non-null [cast.framework.messages.VideoInformation](/cast/docs/reference/web_receiver/cast.framework.messages.VideoInformation) or undefined)\n\nThe video information.\n\n### volume\n\nnon-null [cast.framework.messages.Volume](/cast/docs/reference/web_receiver/cast.framework.messages.Volume)\n\nThe current stream volume."]]