탭이 이미 전송되고 있을 때 API 초기화 시 애플리케이션을 시작할지 여부를 요청합니다. 삽입된 콘텐츠 (예: iframe)에 있는 앱은 페이지의 기본 앱이 아닌 경우 이 필드를 CAST_THIS_TAB로 설정해야 합니다. 또한 이 값은 페이지에서 확장 프로그램 팝업의 기본 동작을 구성합니다.
[null,null,["최종 업데이트: 2025-07-25(UTC)"],[[["\u003cp\u003e\u003ccode\u003echrome.cast.ApiConfig\u003c/code\u003e holds the configuration for the Cast API and is initialized with parameters like session request, listeners, and policies.\u003c/p\u003e\n"],["\u003cp\u003eIt defines how the application interacts with Cast sessions, including automatic connection (autoJoinPolicy) and behavior when a tab is already casting (defaultActionPolicy).\u003c/p\u003e\n"],["\u003cp\u003eProperties like \u003ccode\u003esessionRequest\u003c/code\u003e and \u003ccode\u003esessionListener\u003c/code\u003e manage session creation and connection, while \u003ccode\u003ereceiverListener\u003c/code\u003e handles receiver availability updates.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can configure \u003ccode\u003eApiConfig\u003c/code\u003e to customize the Cast integration within their applications, controlling aspects like session management and receiver interaction.\u003c/p\u003e\n"]]],[],null,["# Class: ApiConfig\n\nchrome.[cast](/cast/docs/reference/web_sender/chrome.cast).ApiConfig\n====================================================================\n\nclass static\n\nHolds the configuration for the API when initialized.\n\nConstructor\n-----------\n\n### ApiConfig\n\nnew\nApiConfig(sessionRequest, sessionListener, receiverListener, autoJoinPolicy, defaultActionPolicy)\n\n| #### Parameter ||\n|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| sessionRequest | [chrome.cast.SessionRequest](/cast/docs/reference/web_sender/chrome.cast.SessionRequest) The session request. Value must not be null. |\n| sessionListener | function(non-null [chrome.cast.Session](/cast/docs/reference/web_sender/chrome.cast.Session)) A listener to notify when a session is available to the application. |\n| receiverListener | function(non-null [chrome.cast.ReceiverAvailability](/cast/docs/reference/web_sender/chrome.cast#.ReceiverAvailability)) A listener to notify when there is a receiver available. |\n| autoJoinPolicy | Optional [chrome.cast.AutoJoinPolicy](/cast/docs/reference/web_sender/chrome.cast#.AutoJoinPolicy) The auto join policy for the application. Value must not be null. |\n| defaultActionPolicy | Optional [chrome.cast.DefaultActionPolicy](/cast/docs/reference/web_sender/chrome.cast#.DefaultActionPolicy) The default action to take when the user is already casting when the application is initialized. Value must not be null. |\n\nProperties\n----------\n\n### autoJoinPolicy\n\nnon-null [chrome.cast.AutoJoinPolicy](/cast/docs/reference/web_sender/chrome.cast#.AutoJoinPolicy)\n\nDetermines whether the SDK will automatically connect to a running\nsession after initialization.\n\n### defaultActionPolicy\n\nnon-null [chrome.cast.DefaultActionPolicy](/cast/docs/reference/web_sender/chrome.cast#.DefaultActionPolicy)\n\nRequests whether the application should be launched on API initialization\nwhen the tab is already being cast. Apps in embedded content (like\niframes) should set this field to CAST_THIS_TAB if they are not the main\napp on the page. This value also configures the default behavior of the\nextension popup for the page.\n\n### receiverListener\n\nfunction(non-null [chrome.cast.ReceiverAvailability](/cast/docs/reference/web_sender/chrome.cast#.ReceiverAvailability))\n\nFunction invoked when the availability of a Cast receiver that supports\nthe application in sessionRequest is known or changes. This function\nwill always be invoked at least once after initialization completes.\n\n### sessionListener\n\nfunction(non-null [chrome.cast.Session](/cast/docs/reference/web_sender/chrome.cast.Session))\n\nListener invoked when a session is created or connected by the SDK.\nThis function may be invoked after initialization, if there is a\nsession that is automatically created or connected. Note that\nrequestSession method does not cause this listener to be invoked,\nsince it has its own success callback.\n\n### sessionRequest\n\nnon-null [chrome.cast.SessionRequest](/cast/docs/reference/web_sender/chrome.cast.SessionRequest)\n\nDescribes the session to launch or the session to connect."]]