GCKSessionTraits Sınıfı
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Bir oturumun özelliklerini ve yeteneklerini açıklayan bir nesne.
- yılından beri
- 3,0
NSNesne, <NSKopyalama> ve <NSSecureCoding> öğelerini devralır.
- (instancetype) initWithMinimumVolume: |
|
(float) |
minimumVolume |
maximumVolume: |
|
(float) |
maximumVolume |
volumeIncrement: |
|
(float) |
volumeIncrement |
supportsMuting: |
|
(BOOL) |
supportsMuting |
|
|
| |
Kolaylık başlatıcı.
Ses düzeyi aralığını [0,0, 1,0], ses düzeyi artışını 0,05 (%5) ve Support Ses kapatma işaretini YES
olarak ayarlar.
Bunun sabit ses kapasiteli bir cihaz olup olmadığı.
Minimum ses seviyesi değeri.
Negatif olmamalıdır ve maksimum hacimden küçük ya da bu değere eşit olmalıdır.
Maksimum ses seviyesi değeri.
Negatif olmamalıdır ve minimum hacimden büyük ya da bu değere eşit olmalıdır.
- (float) volumeIncrement |
|
readnonatomicassign |
Sesi artırma/azaltma ayarlamaları için ses seviyesi artışı.
Sabit hacmi belirtmek için 0 olabilir. Negatif olmayan bir değer olmalı ve maksimum ses düzeyi ile minimum hacim arasındaki farktan daha küçük ya da bu farka eşit olmalıdır.
Sesin kapatılıp kapatılamayacağı
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-07-25 UTC.
[null,null,["Son güncelleme tarihi: 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."]]