커스텀 메시지 네임스페이스 및 해당 유형의 맵입니다. 사용자 지정
메시지 네임스페이스는 애플리케이션이 실행되기 전에 초기화되어야 함
시작하므로 수신자 옵션에 제공되어야 합니다.
(여기에 제공되지 않은 경우 기본 메시지 유형은 JSON입니다.)
disableIdleTimeout
(불리언 또는 정의되지 않음)
true인 경우 수신자가 유휴 상태가 되면 닫히지 않습니다.
종료한 후 다시 재생됩니다. 이 속성은
미디어가 아닌 앱에 적합합니다.
enforceSupportedCommands
상수
부울
true인 경우 supportedCommands 맵에 없는 모든 미디어 명령어는
오류가 발생합니다. Cast.framework.messages.ErrorReason이 설정됩니다.
NOT_SUPPORTED로 변경합니다. 기본값은 false이며 이 경우 미디어 명령어를 사용할 수 있습니다.
지도 확인 없이 실행될 수 있습니다.
localSenderId
(문자열 또는 정의되지 않음)
로컬 요청에 사용되는 발신자 ID입니다. 기본값은 'local'입니다.
maxInactivity
(숫자 또는 정의되지 않음)
유휴 상태를 종료하기 전 최대 시간(초)
연결되고 있는지
확인해야 합니다 이 값을 설정하면 하트비트 메시지가
확인할 수 있습니다 응답하지 않는 발신자를 다음보다 빠르게 감지하는 데 사용됩니다.
일반적인 TCP 제한 시간을 단축할 수 있습니다 최솟값은 5초입니다. 대문자 없음
적용되지만 일반적으로 플랫폼 TCP까지 몇 분 정도 걸립니다.
제한 시간이 중요한 역할을 합니다. 기본값은 10초입니다.
로드할 Shaka Player 빌드 다음으로 설정
cast.framework.ShakaVariant.DEBUG: 디버그 빌드를 로드합니다.
shakaVersion
(문자열 또는 정의되지 않음)
MAJOR.MINOR.PATCH 형식의 Shaka 버전(예: '4.9.2') (
현재 기본값).
지원되는 버전은 4.9.2 이상 <5.0.0입니다.
지원 중단되었지만 계속 호환되는 버전은 2.5.6 <4.9.2 이상입니다.
참고: 기본 버전보다 오래된 Shaka Player 버전은 권장되지 않습니다.
많은 버그가 최신 버전에서 수정되었기 때문입니다. 최신 버전은
추가 수정사항 또는 기능에 동의하지 않는 경우 이곳에 명시되어야 합니다.
기본적으로 제공됩니다 하지만 향후 출시 버전에서는
지원되는 버전의 범위를 변경할 수 있고
여기에 지정한 것과 다른 버전을 강제로 사용하세요. 이 플래그
이러한 조치는 임시 조치로만 사용해야 하며
Cast 지원팀 (https://developers.google.com/cast/support)에서 사용
위험을 최소화할 수 있습니다
skipMplLoad
(불리언 또는 정의되지 않음)
true인 경우 수신자가 MPL 플레이어를 로드하지 못하게 합니다.
skipPlayersLoad
(불리언 또는 정의되지 않음)
true인 경우 수신자가 MPL 또는 Shaka 플레이어를 로드하지 못하게 합니다.
제공합니다 skipMplLoad 및 skipShakaLoad를 모두 설정하는 것과 같습니다.
true로 설정합니다.
skipShakaLoad
(불리언 또는 정의되지 않음)
true인 경우 수신자가 Shaka 플레이어를 로드하지 못하게 합니다.
statusText
(문자열 또는 정의되지 않음)
신청 상태를 나타내는 텍스트입니다. 또한
발송자가 표시할 수 있으므로 다국어화 규칙
애플리케이션입니다.
supportedCommands
(숫자 또는 정의되지 않음)
미디어 명령어의 비트마스크
가장 적합합니다 LOAD, PLAY, STOP, GET_STATUS는 항상
지원되어야 합니다 이 값이 제공되지 않으면 PAUSE, SEEK,
STREAM_VOLUME, STREAM_MUTE, EDIT_TRACKS, PLAYBACK_RATE도 있습니다.
지원되는 것으로 가정됩니다
참고: Shaka Player는 HLS 콘텐츠의 기본값이 아닙니다.
여전히 누락되고 있으며 Google은
HLS 수신기와 폭넓게 호환되어야 합니다.
기본값입니다. 공식 출시 전에 HLS용 Shaka Player를 선택하는 경우
문제가 발생하면 신고해 주시기 바랍니다.
(https://developers.google.com/cast/support) 정식 출시 전
Shaka Player에 대해서는 어떤 보증도 하지 않습니다.
호환성이 있으므로 이 플래그를
기본 설정을 사용하는 것이 좋습니다.
버전 코드
(숫자 또는 정의되지 않음)
수신자를 나타내는 내부 버전 번호로 사용되는 정수입니다.
있습니다. 이 번호는 수신자를 구분하는 용도로만 사용됩니다.
버전 출시를 참조하세요. 입력될 때마다
롤백이 발생할 경우 해당 출시 버전에 구속된 상태로 유지됩니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-07-25(UTC)"],[[["\u003cp\u003e\u003ccode\u003eCastReceiverOptions\u003c/code\u003e allows developers to customize the behavior of their Cast receiver application.\u003c/p\u003e\n"],["\u003cp\u003eIt offers options to configure playback, networking, custom namespaces, UI elements, and supported media commands.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can define custom behavior by setting properties like \u003ccode\u003eplaybackConfig\u003c/code\u003e, \u003ccode\u003esupportedCommands\u003c/code\u003e, \u003ccode\u003euiConfig\u003c/code\u003e, and more.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eCastReceiverOptions\u003c/code\u003e object is used when initializing the Cast receiver application framework.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can utilize this object to specify Shaka player versions and control the loading of media players like MPL and Shaka.\u003c/p\u003e\n"]]],["The `CastReceiverOptions` class configures the Cast receiver context. Key actions include setting `adBreakPreloadTime`, defining `customNamespaces`, and managing `disableIdleTimeout`. It configures media playback with properties like `mediaElement`, `playbackConfig`, `preferredPlaybackRate`, and track language. Options manage player behavior, like loading MPL or Shaka (`skipMplLoad`, `skipShakaLoad`). Additional settings include `maxInactivity`, `supportedCommands`, and `uiConfig` for customization, `versionCode` for internal tracking, and enabling specific feature like `useShakaForHls`.\n"],null,["# Class: CastReceiverOptions\n\ncast.[framework](/cast/docs/reference/web_receiver/cast.framework).CastReceiverOptions\n======================================================================================\n\nclass static\n\nCast receiver context options.\nAll properties are optional.\n\nConstructor\n-----------\n\n### CastReceiverOptions\n\nnew\nCastReceiverOptions()\n\nProperties\n----------\n\n### adBreakPreloadTime\n\n(number or undefined)\n\nHow far in advance we should preload the contents of an individual ad\nbreak, in seconds. This allows you to avoid preloading an ad break too\nfar in advance, and thus confuse your ad metrics.\nIf not provided, a default of 5 seconds is used.\n\n### customNamespaces\n\nnon-null Object with non-null [cast.framework.system.MessageType](/cast/docs/reference/web_receiver/cast.framework.system#.MessageType) properties\n\nMap of custom message namespaces and their types. Custom\nmessage namespaces must be initialized before the application\nstarts, so they must be provided in the receiver options.\n(The default message type is JSON if not provided here).\n\n### disableIdleTimeout\n\n(boolean or undefined)\n\nIf true, prevents the receiver from being closed when it becomes idle\nafter active playback stops. This property should be used only for\nnon-media apps.\n\n### enforceSupportedCommands\n\nconstant\n\nboolean\n\nIf true, any media command that is not in the supportedCommands map will\ngenerate an error. The cast.framework.messages.ErrorReason will be set\nto NOT_SUPPORTED. Default value is false, which allows media commands\nto be executed without checking the map.\n\n### localSenderId\n\n(string or undefined)\n\nSender ID used for local requests. Default value is 'local'.\n\n### maxInactivity\n\n(number or undefined)\n\nMaximum time in seconds before closing an idle\nsender connection. Setting this value enables a heartbeat message to keep\nthe connection alive. Used to detect unresponsive senders faster than\ntypical TCP timeouts. The minimum value is 5 seconds; no upper\nbound is enforced, but it typically takes minutes before platform TCP\ntimeouts come into play. Default value is 10 seconds.\n\n### mediaElement\n\n(non-null HTMLMediaElement or undefined)\n\nMedia element to play content with. Default behavior is to use\nthe first media element found in the page.\n\n### playbackConfig\n\n(non-null [cast.framework.PlaybackConfig](/cast/docs/reference/web_receiver/cast.framework.PlaybackConfig) or undefined)\n\nA playback configuration with custom parameters.\n\n### playWatchedBreak\n\n(boolean or undefined)\n\nIf true, a client-stitched break will play even if it was already\nwatched.\n\n### preferredPlaybackRate\n\n(number or undefined)\n\nThe playback rate to use if unspecified in the load request. Allowable\nrange is 0.5 to 2, with 1 being normal speed.\n\n### preferredTextLanguage\n\n(string or undefined)\n\nLanguage to use for the text track if the load request does not\nspecify an active track.\n\n### queue\n\n(non-null [cast.framework.QueueBase](/cast/docs/reference/web_receiver/cast.framework.QueueBase) or undefined)\n\nCustom queue implementation.\n\n### shakaVariant\n\n(non-null [cast.framework.ShakaVariant](/cast/docs/reference/web_receiver/cast.framework#.ShakaVariant) or undefined)\n\nWhich build of Shaka Player should be loaded. Set to\n`cast.framework.ShakaVariant.DEBUG` to load a debug build.\n\n### shakaVersion\n\n(string or undefined)\n\nShaka version in the MAJOR.MINOR.PATCH format, for example \"4.9.2\" (the\ncurrent default).\n\nSupported versions are \\\u003e=4.9.2 \\\u003c5.0.0.\nDeprecated but still compatible versions are \\\u003e=2.5.6 \\\u003c4.9.2.\n\nNOTE: Shaka Player versions older than the default are not recommended,\nas many bugs have been fixed in the latest versions. Newer versions may\nbe specified here to opt-in to additional fixes or features that are not\nyet available by default. However, please be aware that future releases\nof the Web Receiver SDK may change the range of supported versions and\nforce the use of a version other than what you specify here. This flag\nshould be used only as a temporary measure, and under guidance from the\nCast support team. (https://developers.google.com/cast/support) Use at\nyour own risk.\n\n### skipMplLoad\n\n(boolean or undefined)\n\nIf true, prevents the receiver from loading the MPL player.\n\n### skipPlayersLoad\n\n(boolean or undefined)\n\nIf true, prevents the receiver from loading the MPL or Shaka player\nlibraries. Equivalent to setting both skipMplLoad and skipShakaLoad\nto true.\n\n### skipShakaLoad\n\n(boolean or undefined)\n\nIf true, prevents the receiver from loading the Shaka player.\n\n### statusText\n\n(string or undefined)\n\nText that represents the application status. It should meet\ninternationalization rules, as it may be displayed by the sender\napplication.\n\n### supportedCommands\n\n(number or undefined)\n\nA bitmask of media commands\nsupported by the application. LOAD, PLAY, STOP, GET_STATUS must always\nbe supported. If this value is not provided, then PAUSE, SEEK,\nSTREAM_VOLUME, STREAM_MUTE, EDIT_TRACKS, and PLAYBACK_RATE are also\nassumed to be supported.\n\nSee also\n: [cast.framework.messages.Command](/cast/docs/reference/web_receiver/cast.framework.messages#.Command)\n\n### uiConfig\n\n(non-null [cast.framework.ui.UiConfig](/cast/docs/reference/web_receiver/cast.framework.ui.UiConfig) or undefined)\n\nUI Configuration.\n\n### useLegacyDashSupport\n\n(boolean or undefined)\n\nIf `true`, use MPL for DASH content.\n\n### useShakaForHls\n\n(boolean or undefined)\n\nIf `true`, use Shaka Player for HLS content. Defaults to `false`.\n\nNOTE: Shaka Player is not the default for HLS content because there are\nstill missing features, and because we want to ensure that it is\nperformant and broadly compatible with HLS receivers before making it the\ndefault. If you opt into Shaka Player for HLS before the official\nlaunch, we would ask that you please report any issues you encounter.\n(https://developers.google.com/cast/support) Before the full launch\nof Shaka Player for HLS, we make no guarantees about Shaka Player\ncompatibility for HLS, and we may advise you to revert this flag to its\ndefault setting if you encounter non-trivial issues.\n\n### versionCode\n\n(number or undefined)\n\nAn integer used as an internal version number to represent your receiver\nversion. This number is used only to distinguish between receiver\nreleases when collecting metrics. It should be incremented with each\nrelease and remain bound to that release in the event of a rollback."]]