Web Receiver SDK에는 미디어 플레이어도 내장되어 있어 원활하고 간편한 재생 환경을 제공합니다. 또한 플레이어 UI를 맞춤설정할 수 있고 웹 수신기에 메시지 및 메서드를 가로채고 재정의하여 맞춤 비즈니스 로직을 실행할 수 있는 기능이 제공됩니다.
다음과 같은 방법으로 Web Receiver 애플리케이션을 구현할 수 있습니다.
스타일 지정 미디어 웹 수신기 사용: 오디오 및 동영상 콘텐츠의 미디어 플레이어 UI를 제공하는 사전 빌드된 웹 수신기 애플리케이션입니다. Web Receiver 애플리케이션의 기본 UI를 제공하지만 CSS 파일을 사용하여 UI의 여러 요소를 맞춤설정할 수 있습니다.
맞춤 웹 수신기 개발: TV에서 앱 콘텐츠의 표시를 처리하기 위해 호스팅해야 하는 맞춤 제작 HTML5 앱입니다. 앱에서 오디오/동영상 미디어 이외의 콘텐츠를 표시하려는 경우 또는 스타일 미디어 수신기가 앱에 필요한 미디어 유형을 지원하지 않는 경우 맞춤 수신기를 만들어야 할 수 있습니다.
웹 수신기를 구현하지 않도록 선택한 경우 애플리케이션에서 기본 미디어 웹 수신기를 사용할 수 있습니다.
웹 수신기 선택
Web Receiver SDK는 비즈니스 요구사항을 충족하는 여러 유형의 수신기를 제공합니다. 다양한 기능을 비교하려면 수신자 앱 유형 가이드를 참고하세요.)
스타일 미디어 웹 수신기
Styled Media Web Receiver는 Google에서 호스팅하는 사전 빌드된 웹 수신기 애플리케이션으로, 오디오 및 동영상 콘텐츠를 스트리밍하도록 설계되었습니다. CSS 파일을 사용하여 자체 색상 및 브랜딩 애셋으로 인터페이스의 스타일을 지정할 수 있습니다.
스타일 미디어 웹 수신기를 사용하려면 새 애플리케이션을 등록할 때 스타일 미디어 웹 수신기를 선택하고 원하는 경우 웹 수신기 애플리케이션 UI의 맞춤 디자인을 정의하는 CSS 파일의 URL을 제공합니다.
스타일 미디어 웹 수신기 애플리케이션 UI를 맞춤설정할 수 있는 CSS 스타일에 관한 자세한 내용은 스타일 미디어 수신기 가이드를 참고하세요.
맞춤 웹 수신기
앱이 이미지 갤러리와 같은 콘텐츠를 제공하거나 DRM 또는 맞춤 비즈니스 로직이 필요한 경우 맞춤 웹 수신기 애플리케이션을 빌드해야 합니다. 맞춤 웹 수신기는 자체 서버에서 호스팅하는 HTML5 앱으로, 자바스크립트 Web Receiver API를 사용하여 구현해야 합니다.
Web Receiver API로 웹 수신기 애플리케이션을 빌드하는 방법에 관한 자세한 내용은 맞춤 웹 수신자 가이드를 참고하세요.
기본 미디어 웹 수신자
세 번째 옵션은 기본 미디어 웹 수신자입니다. Google에서 호스팅하는 사전 빌드된 웹 수신기 애플리케이션으로, 오디오 및 동영상 콘텐츠를 스트리밍하도록 설계되었습니다. Google Cast SDK 개발자 콘솔에 등록할 필요는 없지만 기본 미디어 웹 수신기에서 UI를 맞춤설정할 수 없음
앱 ID를 받도록 개발자 콘솔에 등록하는 대신 기본 앱 ID로 기본 미디어 웹 수신자를 사용할 수 있습니다.
[null,null,["최종 업데이트: 2022-11-04(UTC)"],[[["\u003cp\u003eA Web Receiver application is an HTML5/JavaScript application that runs on devices like Chromecast, displaying content, handling sender messages, and enabling custom functionalities.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can choose from three Web Receiver options: the Styled Media Web Receiver (pre-built and customizable with CSS), the Custom Web Receiver (for bespoke content and logic), and the Default Media Web Receiver (basic, uncustomizable media streaming).\u003c/p\u003e\n"],["\u003cp\u003eThe Styled Media Web Receiver is hosted by Google and suitable for streaming audio and video, offering customization through a CSS file for branding.\u003c/p\u003e\n"],["\u003cp\u003eCustom Web Receivers are self-hosted, built using the Web Receiver API, and necessary for content beyond audio/video or when specific requirements aren't met by the Styled Media Receiver.\u003c/p\u003e\n"],["\u003cp\u003eThe Default Media Web Receiver is a basic, uncustomizable option for audio and video streaming, hosted by Google and requiring no registration, suitable for simple use cases.\u003c/p\u003e\n"]]],[],null,["# Web Receiver Overview\n\nWeb Receiver application\n------------------------\n\nA Web Receiver application is an HTML5/JavaScript application that runs on the\nWeb Receiver device, such as a Chromecast. The Web Receiver application performs\nthe following functions:\n\n- Provides an interface to display the app's content on the TV.\n- Handles messages from the sender application to control content on the Web Receiver device.\n- Handles custom messages from the sender application that are application-specific.\n\nThe Web Receiver provides\n[additional functionality](#web_receiver_features_overview).\n\nWeb Receiver SDK\n----------------\n\nThe Web Receiver SDK also comes with a built-in media player, which provides a\nseamless and easy playback experience. It also allows you to customize the\nplayer UI and provides your Web Receiver with the ability to intercept and\noverride messages and methods to execute your custom business logic.\n\nYou can implement your Web Receiver application in the following ways:\n\n- Use the [Styled Media Web Receiver](#styled_media_web_receiver): This is a pre-built Web Receiver application that provides a media player UI for audio and video content. It provides a default UI for the Web Receiver application, but you can customize several elements in the UI with a CSS file.\n- Develop a [Custom Web Receiver](#custom_web_receiver): This is a custom built HTML5 app that you must host to handle the display of your app content on the TV. You may need to create a Custom Receiver if your app wants to display content other than audio/video media or if the Styled Media Receiver does not support the media types your app requires.\n\nIf you choose not to implement a Web Receiver, your application can use the\n[Default Media Web Receiver](#default_media_web_receiver).\n| **Note:** All Web Receivers support the media types described in [Supported Media](/cast/docs/media).\n\nChoose a Web Receiver\n---------------------\n\nThe Web Receiver SDK provides different types of receivers to meet your business\nneeds. For a comparison of the different capabilities, see the\n[types of Receiver apps guide](/cast/docs/overview#types_of_receiver_apps)).\n\n### Styled Media Web Receiver\n\nThe Styled Media Web Receiver is a pre-built Web Receiver application hosted by\nGoogle that is designed for streaming audio and video content. You can style the\ninterface with your own colors and branding assets using a CSS file.\n\nTo use the Styled Media Web Receiver, select Styled Media Web Receiver when\n[registering a new application](/cast/docs/registration) and (optionally)\nprovide the URL to a CSS file that defines a custom look for the Web Receiver\napplication's UI.\n\nFor details about the CSS styles that allow you to customize the Styled Media\nWeb Receiver application's UI, see the\n[Styled Media Receiver](/cast/docs/styled_receiver) guide.\n\n### Custom Web Receiver\n\nIf your app provides content such as an image gallery, requires DRM, or custom\nbusiness logic, then you need to build a Custom Web Receiver application. A\nCustom Web Receiver is an HTML5 app that you host on your own servers and that\nmust be implemented using the JavaScript\n[Web Receiver API](/cast/docs/reference/caf_receiver).\n\nFor details about how to build your Web Receiver application with the Web\nReceiver API, see the [Custom Web Receiver](/cast/docs/caf_receiver/basic)\nguide.\n\n### Default Media Web Receiver\n\nA third option available is the Default Media Web Receiver. This is a pre-built\nWeb Receiver application hosted by Google that is designed for streaming your\naudio and video content. It does not require you to register with the Google\nCast SDK Developer Console, but you **cannot customize any of the UI** in the\nDefault Media Web Receiver.\n\nInstead of registering with the developer console to receive an app ID, you can\nuse the Default Media Web Receiver with the default app ID:\n\n- For Android apps: `CastMediaControlIntent.DEFAULT_MEDIA_RECEIVER_APPLICATION_ID`\n- For Web apps: `chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID`\n- For iOS apps:\n - \\\u003c=v4.0.0 `kGCKMediaDefaultReceiverApplicationID`\n - \\\u003e=v4.0.2 `kGCKDefaultMediaReceiverApplicationID`\n\nFrom your sender app, you start the Default Media Web Receiver app on the Cast\ndevice and then use it to load the URL to your media."]]