Repository Public MIT
1{2 "accessibility" : [3 "The button is labelled \"Mute\" or \"Unmute\" (also its tooltip on macOS) and has a 44-point target on iOS.",4 "The slider is labelled \"Volume\"; its value is spoken as a localised percentage, or \"Muted\" at 0. It is adjustable with VoiceOver.",5 "The level is conveyed by the symbol's shape and the spoken value, not by colour."6 ],7 "category" : "media",8 "changelog" : [9 {10 "changes" : [11 "Initial release."12 ],13 "date" : "2026-12-02",14 "version" : "1.0.0"15 }16 ],17 "dependencies" : [18 {19 "id" : "glass-foundation",20 "version" : "1.0.0"21 }22 ],23 "description" : "Volume of the application's own playback, with mute.",24 "examples" : [25 {26 "code" : "import SwiftUI\nimport SPGlassKit\n\npublic struct GlassVolumeControlExample: GlassExample {\n public static let componentID = \"glass-volume-control\"\n @State private var musicVolume = 0.65\n @State private var effectsVolume = 0.0\n\n public init() {}\n\n public var body: some View {\n Form {\n Section(\"Music\") {\n GlassVolumeControl(volume: $musicVolume)\n LabeledContent(\"Level applied to the player\", value: musicVolume, format: .percent.precision(.fractionLength(0)))\n }\n Section(\"Effects (starts muted)\") {\n GlassVolumeControl(volume: $effectsVolume, unmuteLevel: 0.4)\n }\n Section(\"Disabled\") {\n GlassVolumeControl(volume: .constant(0.3))\n .disabled(true)\n }\n }\n .formStyle(.grouped)\n }\n}\n\n#Preview(\"GlassVolumeControl\") { GlassVolumeControlExample().glassTheme(.emerald) }\n",27 "title" : "GlassVolumeControl example"28 }29 ],30 "files" : [31 {32 "bytes" : 6390,33 "path" : "Media/Media/GlassVolumeControl.swift",34 "sha256" : "15cc6fa495eb07e067d9b4a46b6d356782505f6279b12ea7e56d8bd5eaa44174"35 }36 ],37 "frameworks" : [3839 ],40 "id" : "glass-volume-control",41 "kind" : "native-wrapper",42 "license" : "MIT",43 "minimumOS" : {44 "iOS" : "26.0",45 "iPadOS" : "26.0",46 "macOS" : "26.0"47 },48 "name" : "GlassVolumeControl",49 "platforms" : [50 "iOS",51 "iPadOS",52 "macOS"53 ],54 "schemaVersion" : 1,55 "sha256" : "fa2fbc37f6009ce42951b0cef3b9c781d06cec904bb6da65de0af72f85b21a04",56 "symbols" : [57 "GlassVolumeControl",58 "GlassVolumeState"59 ],60 "version" : "1.0.0"61}62