GCKSessionTraits 클래스
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
세션의 특성과 기능을 설명하는 객체입니다.
- 다음 이후:
- 3.0
NSObject, <NS copy> 및 <NSSecureCoding>을 상속합니다.
- (instancetype) initWithMinimumVolume: |
|
(float) |
minimumVolume |
maximumVolume: |
|
(float) |
maximumVolume |
volumeIncrement: |
|
(float) |
volumeIncrement |
supportsMuting: |
|
(BOOL) |
supportsMuting |
|
|
| |
편의 이니셜라이저입니다.
볼륨 범위를 [0.0, 1.0]으로, 볼륨 증가를 0.05 (5%)로,supportMuting 플래그를 YES
로 설정합니다.
최소 볼륨 값입니다.
음수가 아니고 최대 볼륨 이하여야 합니다.
최대 볼륨 값입니다.
음수가 아니고 최소 볼륨 이상이어야 합니다.
- (float) volumeIncrement |
|
readnonatomicassign |
볼륨 높이기/낮추기 조정의 볼륨 증가입니다.
고정된 볼륨을 나타내는 0일 수 있습니다. 음수가 아니고 최대 볼륨과 최소 볼륨 간의 차이 이하여야 합니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-25(UTC)
[null,null,["최종 업데이트: 2025-07-25(UTC)"],[[["\u003cp\u003e\u003ccode\u003eGCKSessionTraits\u003c/code\u003e describes the capabilities of a Cast session, such as volume control and mute support.\u003c/p\u003e\n"],["\u003cp\u003eIt provides properties for minimum/maximum volume, volume increment, and mute support.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can use \u003ccode\u003eGCKSessionTraits\u003c/code\u003e to understand and manage the audio aspects of a Cast session.\u003c/p\u003e\n"],["\u003cp\u003eThis class inherits from \u003ccode\u003eNSObject\u003c/code\u003e, \u003ccode\u003eNSCopying\u003c/code\u003e, and \u003ccode\u003eNSSecureCoding\u003c/code\u003e, offering standard object functionalities.\u003c/p\u003e\n"],["\u003cp\u003eIncludes designated and convenience initializers to create \u003ccode\u003eGCKSessionTraits\u003c/code\u003e instances with default or custom settings.\u003c/p\u003e\n"]]],["The GCKSessionTraits class defines session capabilities, including volume control and muting. Key actions involve initializing session traits with minimum/maximum volume, volume increment, and muting support. It includes properties for `minimumVolume`, `maximumVolume`, `volumeIncrement`, and `supportsMuting`. It allows determining if a device has fixed volume using the method `isFixedVolume`. The convenience initializer sets default values for volume range, increment, and muting support.\n"],null,["# GCKSessionTraits Class\n\n[Instance Methods](#pub-methods) \\| [Properties](#properties) \nGCKSessionTraits Class Reference \n\nOverview\n--------\n\nAn object describing the traits and capabilities of a session.\n\nSince\n: 3.0\n\nInherits NSObject, \\\u003cNSCopying\\\u003e, and \\\u003cNSSecureCoding\\\u003e.\n\n|----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Instance Method Summary ----------------------- ||\n| (instancetype) | - [initWithMinimumVolume:maximumVolume:volumeIncrement:supportsMuting:](/cast/docs/reference/ios/interface_g_c_k_session_traits#aead7a055e391c18ce12151283ce46024) |\n| | Designated initializer. [More...](#aead7a055e391c18ce12151283ce46024) |\n| ||\n| (instancetype) | - [init](/cast/docs/reference/ios/interface_g_c_k_session_traits#acc7ceb4bd60b0e183835a28de81f30a4) |\n| | Convenience initializer. [More...](#acc7ceb4bd60b0e183835a28de81f30a4) |\n| ||\n| (BOOL) | - [isFixedVolume](/cast/docs/reference/ios/interface_g_c_k_session_traits#aefb739780f4ded760ebbeea03e64deb8) |\n| | Whether this is a fixed volume device. [More...](#aefb739780f4ded760ebbeea03e64deb8) |\n| ||\n\n|-------|--------------------------------------------------------------------------------------------------------------|\n| Property Summary ---------------- ||\n| float | [minimumVolume](/cast/docs/reference/ios/interface_g_c_k_session_traits#ac81be4b49f074d03ed2d7402545d8b48) |\n| | The minimum volume value. [More...](#ac81be4b49f074d03ed2d7402545d8b48) |\n| ||\n| float | [maximumVolume](/cast/docs/reference/ios/interface_g_c_k_session_traits#a804c278bdb1c889d0e3f8c2befb94f95) |\n| | The maximum volume value. [More...](#a804c278bdb1c889d0e3f8c2befb94f95) |\n| ||\n| float | [volumeIncrement](/cast/docs/reference/ios/interface_g_c_k_session_traits#af42670541270cf14d58d9f771112309b) |\n| | The volume increment for up/down volume adjustments. [More...](#af42670541270cf14d58d9f771112309b) |\n| ||\n| BOOL | [supportsMuting](/cast/docs/reference/ios/interface_g_c_k_session_traits#a264fc04b795b36bb41a42fc2c54f2380) |\n| | Whether the audio can be muted. [More...](#a264fc04b795b36bb41a42fc2c54f2380) |\n| ||\n\nMethod Detail\n-------------\n\n|-----------------------------------------|---|---------|-------------------|\n| - (instancetype) initWithMinimumVolume: | | (float) | *minimumVolume* |\n| maximumVolume: | | (float) | *maximumVolume* |\n| volumeIncrement: | | (float) | *volumeIncrement* |\n| supportsMuting: | | (BOOL) | *supportsMuting* |\n| | | | |\n\nDesignated initializer. \n\n|-----------------------|---|---|---|\n| - (instancetype) init | | | |\n\nConvenience initializer.\n\nSets the volume range to \\[0.0, 1.0\\], the volume increment to 0.05 (5%), and the supportsMuting flag to `YES`. \n\n|------------------------|---|---|---|\n| - (BOOL) isFixedVolume | | | |\n\nWhether this is a fixed volume device.\n\nProperty Detail\n---------------\n\n|---------------------------------------------------------|---------------------|\n| |-------------------------| | - (float) minimumVolume | | readnonatomicassign |\n\nThe minimum volume value.\n\nMust be non-negative and less than or equal to the maximum volume. \n\n|---------------------------------------------------------|---------------------|\n| |-------------------------| | - (float) maximumVolume | | readnonatomicassign |\n\nThe maximum volume value.\n\nMust be non-negative and greater than or equal to the minimum volume. \n\n|-------------------------------------------------------------|---------------------|\n| |---------------------------| | - (float) volumeIncrement | | readnonatomicassign |\n\nThe volume increment for up/down volume adjustments.\n\nMay be 0 to indicate fixed volume. Must be non-negative and less than or equal to the difference between the maximum volume and minimum volume. \n\n|---------------------------------------------------------|---------------------|\n| |-------------------------| | - (BOOL) supportsMuting | | readnonatomicassign |\n\nWhether the audio can be muted."]]