SPB Git

Repository Public MIT

manifest.json 4.0 KB 84 lines json

1{2  "accessibility" : [3    "The controls are the system's and keep their own labels, captions menu and keyboard support.",4    "The player carries the label given by the host; in the unavailable state the label is kept and the value is \"Media unavailable\" (symbol and text, not colour)."5  ],6  "category" : "media",7  "changelog" : [8    {9      "changes" : [10        "Release 1.1.0: see the project changelog."11      ],12      "date" : "2026-12-03",13      "version" : "1.1.0"14    },15    {16      "changes" : [17        "Initial release."18      ],19      "date" : "2026-12-02",20      "version" : "1.0.0"21    }22  ],23  "dependencies" : [24    {25      "id" : "glass-audio-player",26      "version" : "1.1.0"27    },28    {29      "id" : "glass-foundation",30      "version" : "1.1.0"31    },32    {33      "id" : "glass-media-support",34      "version" : "1.1.0"35    }36  ],37  "description" : "AVKit video player with system controls and full screen where the platform offers it.",38  "examples" : [39    {40      "code" : "import SwiftUI\nimport AVFoundation\nimport SPGlassKit\n\npublic struct GlassVideoPlayerExample: GlassExample {\n    public static let componentID = \"glass-video-player\"\n    /// An empty player: the repository ships no media file, so the example shows the states without a video.\n    @State private var emptyPlayer = AVPlayer()\n    /// A silent clock: it drives the glass controls drawn over a poster.\n    @State private var playback = SampleAudioPlayback(duration: 134)\n\n    public init() {}\n\n    public var body: some View {\n        ScrollView {\n            VStack(alignment: .leading, spacing: 16) {\n                Text(\"Glass controls over a drawn poster\")\n                    .font(.headline)\n                GlassVideoControls(playback: playback, title: \"The Shore House · Trailer\") {\n                    SampleArtwork(3)\n                }\n\n                Text(\"No player\")\n                    .font(.headline)\n                GlassVideoPlayer(player: nil, accessibilityLabel: \"Trailer\")\n\n                Text(\"Player without an item, 4:3\")\n                    .font(.headline)\n                GlassVideoPlayer(player: emptyPlayer, aspectRatio: 4.0 / 3.0, accessibilityLabel: \"Lecture recording\")\n\n                Text(\"Missing URL\")\n                    .font(.headline)\n                GlassVideoPlayer(url: nil)\n\n                Text(\"Sample data · give the player a real URL to see the system controls.\")\n                    .font(.caption)\n                    .foregroundStyle(.secondary)\n            }\n            .padding()\n        }\n        .task(id: playback.isPlaying) {\n            // The fake engine has no clock of its own: tick it while it is \"playing\".\n            while playback.isPlaying, !Task.isCancelled {\n                try? await Task.sleep(for: .milliseconds(500))\n                if !Task.isCancelled { playback.advance(by: 0.5) }\n            }\n        }\n    }\n}\n\n#Preview(\"GlassVideoPlayer\") { GlassVideoPlayerExample().glassTheme(.obsidian) }\n",41      "title" : "GlassVideoPlayer example"42    }43  ],44  "files" : [45    {46      "bytes" : 12514,47      "path" : "Media/Media/GlassVideoPlayer+Controls.swift",48      "sha256" : "77a891fc6bcf86f95d072feb0cf0772f7c08cb7c4dfb364753654483b240ae1b"49    },50    {51      "bytes" : 6328,52      "path" : "Media/Media/GlassVideoPlayer.swift",53      "sha256" : "2ca85909ad9574ac46bd654190e10b1b97cd020edace0cf9eca1d4760dcfdf33"54    }55  ],56  "frameworks" : [57    "AVKit"58  ],59  "id" : "glass-video-player",60  "kind" : "native-wrapper",61  "license" : "MIT",62  "minimumOS" : {63    "iOS" : "26.0",64    "iPadOS" : "26.0",65    "macOS" : "26.0"66  },67  "name" : "GlassVideoPlayer",68  "platforms" : [69    "iOS",70    "iPadOS",71    "macOS"72  ],73  "schemaVersion" : 1,74  "sha256" : "9ef6c6dc0f57192b0c6cdf949449d3caf4a84ce9408fe680759c0b288991e71d",75  "symbols" : [76    "GlassVideoControls",77    "GlassVideoControlsVisibility",78    "GlassVideoPlayer",79    "GlassVideoAvailability",80    "GlassVideoLayout"81  ],82  "version" : "1.1.0"83}84
Files main
Menu

Theme