The Swift Package Index logo.Swift Package Index

Build Information

Successful build of KSPlayer, reference 2.3.4 (bdfa2d), with Swift 6.4 for macOS (SPM) on 21 Sep 2026 21:54:43 UTC.

Swift 6 data race errors: 0

Build Command

env DEVELOPER_DIR=/Applications/Xcode-27.0.0-Release.Candidate.app xcrun swift build --arch arm64

Build Log

543 |         mediaType = track.assetTrack?.mediaType ?? .video
544 |         name = track.assetTrack?.languageCode ?? ""
    |                      `- warning: main actor-isolated property 'assetTrack' can not be referenced from a nonisolated context
545 |         languageCode = track.assetTrack?.languageCode
546 |         nominalFrameRate = track.assetTrack?.nominalFrameRate ?? 24.0
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX27.0.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVPlayerItemTrack.h:45:57: note: property declared here
 43 | 	notification queue.  By default, this queue is the main queue.
 44 | */
 45 | @property (nonatomic, readonly, nullable) AVAssetTrack *assetTrack;
    |                                                         `- note: property declared here
 46 |
 47 | /*!
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSAVPlayer.swift:545:30: warning: main actor-isolated property 'assetTrack' can not be referenced from a nonisolated context
543 |         mediaType = track.assetTrack?.mediaType ?? .video
544 |         name = track.assetTrack?.languageCode ?? ""
545 |         languageCode = track.assetTrack?.languageCode
    |                              `- warning: main actor-isolated property 'assetTrack' can not be referenced from a nonisolated context
546 |         nominalFrameRate = track.assetTrack?.nominalFrameRate ?? 24.0
547 |         bitRate = Int64(track.assetTrack?.estimatedDataRate ?? 0)
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX27.0.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVPlayerItemTrack.h:45:57: note: property declared here
 43 | 	notification queue.  By default, this queue is the main queue.
 44 | */
 45 | @property (nonatomic, readonly, nullable) AVAssetTrack *assetTrack;
    |                                                         `- note: property declared here
 46 |
 47 | /*!
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSAVPlayer.swift:546:34: warning: main actor-isolated property 'assetTrack' can not be referenced from a nonisolated context
544 |         name = track.assetTrack?.languageCode ?? ""
545 |         languageCode = track.assetTrack?.languageCode
546 |         nominalFrameRate = track.assetTrack?.nominalFrameRate ?? 24.0
    |                                  `- warning: main actor-isolated property 'assetTrack' can not be referenced from a nonisolated context
547 |         bitRate = Int64(track.assetTrack?.estimatedDataRate ?? 0)
548 |         #if os(xrOS)
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX27.0.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVPlayerItemTrack.h:45:57: note: property declared here
 43 | 	notification queue.  By default, this queue is the main queue.
 44 | */
 45 | @property (nonatomic, readonly, nullable) AVAssetTrack *assetTrack;
    |                                                         `- note: property declared here
 46 |
 47 | /*!
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSAVPlayer.swift:547:31: warning: main actor-isolated property 'assetTrack' can not be referenced from a nonisolated context
545 |         languageCode = track.assetTrack?.languageCode
546 |         nominalFrameRate = track.assetTrack?.nominalFrameRate ?? 24.0
547 |         bitRate = Int64(track.assetTrack?.estimatedDataRate ?? 0)
    |                               `- warning: main actor-isolated property 'assetTrack' can not be referenced from a nonisolated context
548 |         #if os(xrOS)
549 |         isPlayable = false
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX27.0.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVPlayerItemTrack.h:45:57: note: property declared here
 43 | 	notification queue.  By default, this queue is the main queue.
 44 | */
 45 | @property (nonatomic, readonly, nullable) AVAssetTrack *assetTrack;
    |                                                         `- note: property declared here
 46 |
 47 | /*!
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSAVPlayer.swift:551:28: warning: main actor-isolated property 'assetTrack' can not be referenced from a nonisolated context
549 |         isPlayable = false
550 |         #else
551 |         isPlayable = track.assetTrack?.isPlayable ?? false
    |                            `- warning: main actor-isolated property 'assetTrack' can not be referenced from a nonisolated context
552 |         #endif
553 |         // swiftlint:disable force_cast
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX27.0.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVPlayerItemTrack.h:45:57: note: property declared here
 43 | 	notification queue.  By default, this queue is the main queue.
 44 | */
 45 | @property (nonatomic, readonly, nullable) AVAssetTrack *assetTrack;
    |                                                         `- note: property declared here
 46 |
 47 | /*!
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSAVPlayer.swift:554:30: warning: main actor-isolated property 'assetTrack' can not be referenced from a nonisolated context
552 |         #endif
553 |         // swiftlint:disable force_cast
554 |         if let first = track.assetTrack?.formatDescriptions.first {
    |                              `- warning: main actor-isolated property 'assetTrack' can not be referenced from a nonisolated context
555 |             formatDescription = first as! CMFormatDescription
556 |         } else {
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX27.0.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVPlayerItemTrack.h:45:57: note: property declared here
 43 | 	notification queue.  By default, this queue is the main queue.
 44 | */
 45 | @property (nonatomic, readonly, nullable) AVAssetTrack *assetTrack;
    |                                                         `- note: property declared here
 46 |
 47 | /*!
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSAVPlayer.swift:586:17: warning: capture of 'handler' with non-Sendable type '(CGImage?) -> Void' in a '@Sendable' closure [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures\SendableClosureCaptures]8;;\]
584 |         imageGenerator.generateCGImagesAsynchronously(forTimes: [NSValue(time: currentTime)]) { _, cgImage, _, _, _ in
585 |             if let cgImage {
586 |                 handler(cgImage)
    |                 |- warning: capture of 'handler' with non-Sendable type '(CGImage?) -> Void' in a '@Sendable' closure [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures\SendableClosureCaptures]8;;\]
    |                 `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
587 |             } else {
588 |                 handler(nil)
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSOptions.swift:458:16: warning: static property 'firstPlayerType' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
456 |
457 | public extension KSOptions {
458 |     static var firstPlayerType: MediaPlayerProtocol.Type = KSAVPlayer.self
    |                |- warning: static property 'firstPlayerType' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
    |                |- note: convert 'firstPlayerType' to a 'let' constant to make 'Sendable' shared state immutable
    |                |- note: add '@MainActor' to make static property 'firstPlayerType' part of global actor 'MainActor'
    |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
459 |     static var secondPlayerType: MediaPlayerProtocol.Type? = KSMEPlayer.self
460 |     /// 最低缓存视频时间
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSOptions.swift:459:16: warning: static property 'secondPlayerType' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
457 | public extension KSOptions {
458 |     static var firstPlayerType: MediaPlayerProtocol.Type = KSAVPlayer.self
459 |     static var secondPlayerType: MediaPlayerProtocol.Type? = KSMEPlayer.self
    |                |- warning: static property 'secondPlayerType' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
    |                |- note: convert 'secondPlayerType' to a 'let' constant to make 'Sendable' shared state immutable
    |                |- note: add '@MainActor' to make static property 'secondPlayerType' part of global actor 'MainActor'
    |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
460 |     /// 最低缓存视频时间
461 |     static var preferredForwardBufferDuration = 3.0
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSOptions.swift:461:16: warning: static property 'preferredForwardBufferDuration' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
459 |     static var secondPlayerType: MediaPlayerProtocol.Type? = KSMEPlayer.self
460 |     /// 最低缓存视频时间
461 |     static var preferredForwardBufferDuration = 3.0
    |                |- warning: static property 'preferredForwardBufferDuration' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
    |                |- note: convert 'preferredForwardBufferDuration' to a 'let' constant to make 'Sendable' shared state immutable
    |                |- note: add '@MainActor' to make static property 'preferredForwardBufferDuration' part of global actor 'MainActor'
    |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
462 |     /// 最大缓存视频时间
463 |     static var maxBufferDuration = 30.0
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSOptions.swift:463:16: warning: static property 'maxBufferDuration' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
461 |     static var preferredForwardBufferDuration = 3.0
462 |     /// 最大缓存视频时间
463 |     static var maxBufferDuration = 30.0
    |                |- warning: static property 'maxBufferDuration' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
    |                |- note: convert 'maxBufferDuration' to a 'let' constant to make 'Sendable' shared state immutable
    |                |- note: add '@MainActor' to make static property 'maxBufferDuration' part of global actor 'MainActor'
    |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
464 |     /// 是否开启秒开
465 |     static var isSecondOpen = false
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSOptions.swift:465:16: warning: static property 'isSecondOpen' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
463 |     static var maxBufferDuration = 30.0
464 |     /// 是否开启秒开
465 |     static var isSecondOpen = false
    |                |- warning: static property 'isSecondOpen' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
    |                |- note: convert 'isSecondOpen' to a 'let' constant to make 'Sendable' shared state immutable
    |                |- note: add '@MainActor' to make static property 'isSecondOpen' part of global actor 'MainActor'
    |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
466 |     /// 开启精确seek
467 |     static var isAccurateSeek = false
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSOptions.swift:467:16: warning: static property 'isAccurateSeek' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
465 |     static var isSecondOpen = false
466 |     /// 开启精确seek
467 |     static var isAccurateSeek = false
    |                |- warning: static property 'isAccurateSeek' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
    |                |- note: convert 'isAccurateSeek' to a 'let' constant to make 'Sendable' shared state immutable
    |                |- note: add '@MainActor' to make static property 'isAccurateSeek' part of global actor 'MainActor'
    |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
468 |     /// Applies to short videos only
469 |     static var isLoopPlay = false
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSOptions.swift:469:16: warning: static property 'isLoopPlay' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
467 |     static var isAccurateSeek = false
468 |     /// Applies to short videos only
469 |     static var isLoopPlay = false
    |                |- warning: static property 'isLoopPlay' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
    |                |- note: convert 'isLoopPlay' to a 'let' constant to make 'Sendable' shared state immutable
    |                |- note: add '@MainActor' to make static property 'isLoopPlay' part of global actor 'MainActor'
    |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
470 |     /// 是否自动播放,默认true
471 |     static var isAutoPlay = true
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSOptions.swift:471:16: warning: static property 'isAutoPlay' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
469 |     static var isLoopPlay = false
470 |     /// 是否自动播放,默认true
471 |     static var isAutoPlay = true
    |                |- warning: static property 'isAutoPlay' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
    |                |- note: convert 'isAutoPlay' to a 'let' constant to make 'Sendable' shared state immutable
    |                |- note: add '@MainActor' to make static property 'isAutoPlay' part of global actor 'MainActor'
    |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
472 |     /// seek完是否自动播放
473 |     static var isSeekedAutoPlay = true
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSOptions.swift:473:16: warning: static property 'isSeekedAutoPlay' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
471 |     static var isAutoPlay = true
472 |     /// seek完是否自动播放
473 |     static var isSeekedAutoPlay = true
    |                |- warning: static property 'isSeekedAutoPlay' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
    |                |- note: convert 'isSeekedAutoPlay' to a 'let' constant to make 'Sendable' shared state immutable
    |                |- note: add '@MainActor' to make static property 'isSeekedAutoPlay' part of global actor 'MainActor'
    |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
474 |     static var hardwareDecode = true
475 |     // 默认不用自研的硬解,因为有些视频的AVPacket的pts顺序是不对的,只有解码后的AVFrame里面的pts是对的。
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSOptions.swift:474:16: warning: static property 'hardwareDecode' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
472 |     /// seek完是否自动播放
473 |     static var isSeekedAutoPlay = true
474 |     static var hardwareDecode = true
    |                |- warning: static property 'hardwareDecode' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
    |                |- note: convert 'hardwareDecode' to a 'let' constant to make 'Sendable' shared state immutable
    |                |- note: add '@MainActor' to make static property 'hardwareDecode' part of global actor 'MainActor'
    |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
475 |     // 默认不用自研的硬解,因为有些视频的AVPacket的pts顺序是不对的,只有解码后的AVFrame里面的pts是对的。
476 |     static var asynchronousDecompression = false
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSOptions.swift:476:16: warning: static property 'asynchronousDecompression' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
474 |     static var hardwareDecode = true
475 |     // 默认不用自研的硬解,因为有些视频的AVPacket的pts顺序是不对的,只有解码后的AVFrame里面的pts是对的。
476 |     static var asynchronousDecompression = false
    |                |- warning: static property 'asynchronousDecompression' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
    |                |- note: convert 'asynchronousDecompression' to a 'let' constant to make 'Sendable' shared state immutable
    |                |- note: add '@MainActor' to make static property 'asynchronousDecompression' part of global actor 'MainActor'
    |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
477 |     static var isPipPopViewController = false
478 |     static var canStartPictureInPictureAutomaticallyFromInline = true
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSOptions.swift:477:16: warning: static property 'isPipPopViewController' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
475 |     // 默认不用自研的硬解,因为有些视频的AVPacket的pts顺序是不对的,只有解码后的AVFrame里面的pts是对的。
476 |     static var asynchronousDecompression = false
477 |     static var isPipPopViewController = false
    |                |- warning: static property 'isPipPopViewController' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
    |                |- note: convert 'isPipPopViewController' to a 'let' constant to make 'Sendable' shared state immutable
    |                |- note: add '@MainActor' to make static property 'isPipPopViewController' part of global actor 'MainActor'
    |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
478 |     static var canStartPictureInPictureAutomaticallyFromInline = true
479 |     static var preferredFrame = true
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSOptions.swift:478:16: warning: static property 'canStartPictureInPictureAutomaticallyFromInline' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
476 |     static var asynchronousDecompression = false
477 |     static var isPipPopViewController = false
478 |     static var canStartPictureInPictureAutomaticallyFromInline = true
    |                |- warning: static property 'canStartPictureInPictureAutomaticallyFromInline' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
    |                |- note: convert 'canStartPictureInPictureAutomaticallyFromInline' to a 'let' constant to make 'Sendable' shared state immutable
    |                |- note: add '@MainActor' to make static property 'canStartPictureInPictureAutomaticallyFromInline' part of global actor 'MainActor'
    |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
479 |     static var preferredFrame = true
480 |     static var useSystemHTTPProxy = true
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSOptions.swift:479:16: warning: static property 'preferredFrame' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
477 |     static var isPipPopViewController = false
478 |     static var canStartPictureInPictureAutomaticallyFromInline = true
479 |     static var preferredFrame = true
    |                |- warning: static property 'preferredFrame' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
    |                |- note: convert 'preferredFrame' to a 'let' constant to make 'Sendable' shared state immutable
    |                |- note: add '@MainActor' to make static property 'preferredFrame' part of global actor 'MainActor'
    |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
480 |     static var useSystemHTTPProxy = true
481 |     /// 日志级别
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSOptions.swift:480:16: warning: static property 'useSystemHTTPProxy' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
478 |     static var canStartPictureInPictureAutomaticallyFromInline = true
479 |     static var preferredFrame = true
480 |     static var useSystemHTTPProxy = true
    |                |- warning: static property 'useSystemHTTPProxy' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
    |                |- note: convert 'useSystemHTTPProxy' to a 'let' constant to make 'Sendable' shared state immutable
    |                |- note: add '@MainActor' to make static property 'useSystemHTTPProxy' part of global actor 'MainActor'
    |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
481 |     /// 日志级别
482 |     static var logLevel = LogLevel.warning
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSOptions.swift:482:16: warning: static property 'logLevel' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
480 |     static var useSystemHTTPProxy = true
481 |     /// 日志级别
482 |     static var logLevel = LogLevel.warning
    |                |- warning: static property 'logLevel' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
    |                |- note: convert 'logLevel' to a 'let' constant to make 'Sendable' shared state immutable
    |                |- note: add '@MainActor' to make static property 'logLevel' part of global actor 'MainActor'
    |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
483 |     static var logger: LogHandler = OSLog(lable: "KSPlayer")
484 |     internal static func deviceCpuCount() -> Int {
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSOptions.swift:483:16: warning: static property 'logger' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
481 |     /// 日志级别
482 |     static var logLevel = LogLevel.warning
483 |     static var logger: LogHandler = OSLog(lable: "KSPlayer")
    |                |- warning: static property 'logger' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
    |                |- note: convert 'logger' to a 'let' constant to make 'Sendable' shared state immutable
    |                |- note: add '@MainActor' to make static property 'logger' part of global actor 'MainActor'
    |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
484 |     internal static func deviceCpuCount() -> Int {
485 |         var ncpu = UInt(0)
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSOptions.swift:317:21: warning: variable 'yadifMode' was never mutated; consider changing to 'let' constant [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated\VariableNeverMutated]8;;\]
315 |                 asynchronousDecompression = false
316 |                 let yadif = hardwareDecode ? "yadif_videotoolbox" : "yadif"
317 |                 var yadifMode = KSOptions.yadifMode
    |                     `- warning: variable 'yadifMode' was never mutated; consider changing to 'let' constant [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated\VariableNeverMutated]8;;\]
318 | //                if let assetTrack = assetTrack as? FFmpegAssetTrack {
319 | //                    if assetTrack.realFrameRate.num == 2 * assetTrack.avgFrameRate.num, assetTrack.realFrameRate.den == assetTrack.avgFrameRate.den {
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSPictureInPictureController.swift:12:24: warning: static property 'pipController' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
 10 | @available(tvOS 14.0, *)
 11 | public class KSPictureInPictureController: AVPictureInPictureController {
 12 |     private static var pipController: KSPictureInPictureController?
    |                        |- warning: static property 'pipController' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
    |                        |- note: convert 'pipController' to a 'let' constant to make 'Sendable' shared state immutable
    |                        |- note: add '@MainActor' to make static property 'pipController' part of global actor 'MainActor'
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 13 |     private var originalViewController: UIViewController?
 14 |     private var view: KSPlayerLayer?
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSPlayerLayer.swift:84:35: warning: capture of 'self' with non-Sendable type 'KSPlayerLayer?' in a '@Sendable' closure [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures\SendableClosureCaptures]8;;\]
 65 | }
 66 |
 67 | open class KSPlayerLayer: NSObject {
    |            `- note: class 'KSPlayerLayer' does not conform to the 'Sendable' protocol
 68 |     public weak var delegate: KSPlayerLayerDelegate?
 69 |     @Published
    :
 82 |                     // 一定要async才不会pip之后就暂停播放
 83 |                     DispatchQueue.main.async { [weak self] in
 84 |                         guard let self else { return }
    |                                   `- warning: capture of 'self' with non-Sendable type 'KSPlayerLayer?' in a '@Sendable' closure [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures\SendableClosureCaptures]8;;\]
 85 |                         pipController.start(view: self)
 86 |                     }
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSPlayerLayer.swift:85:25: warning: capture of 'pipController' with non-Sendable type 'KSPictureInPictureController' in a '@Sendable' closure [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures\SendableClosureCaptures]8;;\]
 83 |                     DispatchQueue.main.async { [weak self] in
 84 |                         guard let self else { return }
 85 |                         pipController.start(view: self)
    |                         `- warning: capture of 'pipController' with non-Sendable type 'KSPictureInPictureController' in a '@Sendable' closure [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures\SendableClosureCaptures]8;;\]
 86 |                     }
 87 |                 } else {
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSPictureInPictureController.swift:11:14: note: class 'KSPictureInPictureController' does not conform to the 'Sendable' protocol
  9 |
 10 | @available(tvOS 14.0, *)
 11 | public class KSPictureInPictureController: AVPictureInPictureController {
    |              `- note: class 'KSPictureInPictureController' does not conform to the 'Sendable' protocol
 12 |     private static var pipController: KSPictureInPictureController?
 13 |     private var originalViewController: UIViewController?
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSPlayerLayer.swift:102:73: warning: main actor-isolated property 'superview' can not be referenced from a nonisolated context
100 |             runOnMainThread { [weak self] in
101 |                 guard let self else { return }
102 |                 if let oldView = oldValue.view, let superview = oldView.superview, let view = player.view {
    |                                                                         `- warning: main actor-isolated property 'superview' can not be referenced from a nonisolated context
103 |                     #if canImport(UIKit)
104 |                     superview.insertSubview(view, belowSubview: oldView)
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX27.0.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSView.h:87:59: note: property declared here
 85 |
 86 | @property (nullable, readonly, unsafe_unretained) NSWindow *window;
 87 | @property (nullable, readonly, unsafe_unretained) NSView *superview;
    |                                                           `- note: property declared here
 88 | @property (copy) NSArray<__kindof NSView *> *subviews;
 89 | - (BOOL)isDescendantOf:(NSView *)view;
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSPlayerLayer.swift:106:31: warning: call to main actor-isolated instance method 'addSubview(_:positioned:relativeTo:)' in a synchronous nonisolated context [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/actor-isolated-call\ActorIsolatedCall]8;;\]
104 |                     superview.insertSubview(view, belowSubview: oldView)
105 |                     #else
106 |                     superview.addSubview(view, positioned: .below, relativeTo: oldView)
    |                               `- warning: call to main actor-isolated instance method 'addSubview(_:positioned:relativeTo:)' in a synchronous nonisolated context [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/actor-isolated-call\ActorIsolatedCall]8;;\]
107 |                     #endif
108 |                     view.translatesAutoresizingMaskIntoConstraints = false
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX27.0.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSView.h:102:1: note: calls to instance method 'addSubview(_:positioned:relativeTo:)' from outside of its actor context are implicitly asynchronous
100 |
101 | - (void)addSubview:(NSView *)view;
102 | - (void)addSubview:(NSView *)view positioned:(NSWindowOrderingMode)place relativeTo:(nullable NSView *)otherView;
    | |- note: calls to instance method 'addSubview(_:positioned:relativeTo:)' from outside of its actor context are implicitly asynchronous
    | `- note: main actor isolation inferred from inheritance from class 'NSResponder'
103 | - (void)sortSubviewsUsingFunction:(NSComparisonResult (NS_NOESCAPE *)(__kindof NSView *, __kindof NSView *,  void * _Nullable))compare context:(nullable void *)context;
104 |
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSPlayerLayer.swift:108:26: warning: main actor-isolated property 'translatesAutoresizingMaskIntoConstraints' can not be mutated from a nonisolated context
106 |                     superview.addSubview(view, positioned: .below, relativeTo: oldView)
107 |                     #endif
108 |                     view.translatesAutoresizingMaskIntoConstraints = false
    |                          `- warning: main actor-isolated property 'translatesAutoresizingMaskIntoConstraints' can not be mutated from a nonisolated context
109 |                     NSLayoutConstraint.activate([
110 |                         view.topAnchor.constraint(equalTo: superview.topAnchor),
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX27.0.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSLayoutConstraint.h:276:16: note: mutation of this property is only permitted within the actor
274 | /* by default, the autoresizing mask on a view gives rise to constraints that fully determine the view's position.  To do anything interesting with constraints, you need to turn that off. IB will turn it off.
275 |  */
276 | @property BOOL translatesAutoresizingMaskIntoConstraints API_AVAILABLE(macos(10.7));
    |                `- note: mutation of this property is only permitted within the actor
277 |
278 | /* constraint based layout engages lazily when someone tries to use it.  If you do all of your constraint set up in -updateConstraints, you might never even receive updateConstraints if no one makes a constraint.  To fix this chicken and egg problem, override this method to return YES if your view needs the window to use constraint based layout.
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSPlayerLayer.swift:110:30: warning: main actor-isolated property 'topAnchor' can not be referenced from a nonisolated context
108 |                     view.translatesAutoresizingMaskIntoConstraints = false
109 |                     NSLayoutConstraint.activate([
110 |                         view.topAnchor.constraint(equalTo: superview.topAnchor),
    |                              `- warning: main actor-isolated property 'topAnchor' can not be referenced from a nonisolated context
111 |                         view.leadingAnchor.constraint(equalTo: superview.leadingAnchor),
112 |                         view.bottomAnchor.constraint(equalTo: superview.bottomAnchor),
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX27.0.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSLayoutConstraint.h:228:51: note: property declared here
226 | @property (readonly, strong) NSLayoutXAxisAnchor *leftAnchor API_AVAILABLE(macos(10.11));
227 | @property (readonly, strong) NSLayoutXAxisAnchor *rightAnchor API_AVAILABLE(macos(10.11));
228 | @property (readonly, strong) NSLayoutYAxisAnchor *topAnchor API_AVAILABLE(macos(10.11));
    |                                                   `- note: property declared here
229 | @property (readonly, strong) NSLayoutYAxisAnchor *bottomAnchor API_AVAILABLE(macos(10.11));
230 | @property (readonly, strong) NSLayoutDimension *widthAnchor API_AVAILABLE(macos(10.11));
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSPlayerLayer.swift:110:70: warning: main actor-isolated property 'topAnchor' can not be referenced from a nonisolated context
108 |                     view.translatesAutoresizingMaskIntoConstraints = false
109 |                     NSLayoutConstraint.activate([
110 |                         view.topAnchor.constraint(equalTo: superview.topAnchor),
    |                                                                      `- warning: main actor-isolated property 'topAnchor' can not be referenced from a nonisolated context
111 |                         view.leadingAnchor.constraint(equalTo: superview.leadingAnchor),
112 |                         view.bottomAnchor.constraint(equalTo: superview.bottomAnchor),
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX27.0.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSLayoutConstraint.h:228:51: note: property declared here
226 | @property (readonly, strong) NSLayoutXAxisAnchor *leftAnchor API_AVAILABLE(macos(10.11));
227 | @property (readonly, strong) NSLayoutXAxisAnchor *rightAnchor API_AVAILABLE(macos(10.11));
228 | @property (readonly, strong) NSLayoutYAxisAnchor *topAnchor API_AVAILABLE(macos(10.11));
    |                                                   `- note: property declared here
229 | @property (readonly, strong) NSLayoutYAxisAnchor *bottomAnchor API_AVAILABLE(macos(10.11));
230 | @property (readonly, strong) NSLayoutDimension *widthAnchor API_AVAILABLE(macos(10.11));
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSPlayerLayer.swift:111:30: warning: main actor-isolated property 'leadingAnchor' can not be referenced from a nonisolated context
109 |                     NSLayoutConstraint.activate([
110 |                         view.topAnchor.constraint(equalTo: superview.topAnchor),
111 |                         view.leadingAnchor.constraint(equalTo: superview.leadingAnchor),
    |                              `- warning: main actor-isolated property 'leadingAnchor' can not be referenced from a nonisolated context
112 |                         view.bottomAnchor.constraint(equalTo: superview.bottomAnchor),
113 |                         view.trailingAnchor.constraint(equalTo: superview.trailingAnchor),
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX27.0.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSLayoutConstraint.h:224:51: note: property declared here
222 |  See NSLayoutAnchor.h for more details.
223 |  */
224 | @property (readonly, strong) NSLayoutXAxisAnchor *leadingAnchor API_AVAILABLE(macos(10.11));
    |                                                   `- note: property declared here
225 | @property (readonly, strong) NSLayoutXAxisAnchor *trailingAnchor API_AVAILABLE(macos(10.11));
226 | @property (readonly, strong) NSLayoutXAxisAnchor *leftAnchor API_AVAILABLE(macos(10.11));
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSPlayerLayer.swift:111:74: warning: main actor-isolated property 'leadingAnchor' can not be referenced from a nonisolated context
109 |                     NSLayoutConstraint.activate([
110 |                         view.topAnchor.constraint(equalTo: superview.topAnchor),
111 |                         view.leadingAnchor.constraint(equalTo: superview.leadingAnchor),
    |                                                                          `- warning: main actor-isolated property 'leadingAnchor' can not be referenced from a nonisolated context
112 |                         view.bottomAnchor.constraint(equalTo: superview.bottomAnchor),
113 |                         view.trailingAnchor.constraint(equalTo: superview.trailingAnchor),
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX27.0.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSLayoutConstraint.h:224:51: note: property declared here
222 |  See NSLayoutAnchor.h for more details.
223 |  */
224 | @property (readonly, strong) NSLayoutXAxisAnchor *leadingAnchor API_AVAILABLE(macos(10.11));
    |                                                   `- note: property declared here
225 | @property (readonly, strong) NSLayoutXAxisAnchor *trailingAnchor API_AVAILABLE(macos(10.11));
226 | @property (readonly, strong) NSLayoutXAxisAnchor *leftAnchor API_AVAILABLE(macos(10.11));
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSPlayerLayer.swift:112:30: warning: main actor-isolated property 'bottomAnchor' can not be referenced from a nonisolated context
110 |                         view.topAnchor.constraint(equalTo: superview.topAnchor),
111 |                         view.leadingAnchor.constraint(equalTo: superview.leadingAnchor),
112 |                         view.bottomAnchor.constraint(equalTo: superview.bottomAnchor),
    |                              `- warning: main actor-isolated property 'bottomAnchor' can not be referenced from a nonisolated context
113 |                         view.trailingAnchor.constraint(equalTo: superview.trailingAnchor),
114 |                     ])
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX27.0.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSLayoutConstraint.h:229:51: note: property declared here
227 | @property (readonly, strong) NSLayoutXAxisAnchor *rightAnchor API_AVAILABLE(macos(10.11));
228 | @property (readonly, strong) NSLayoutYAxisAnchor *topAnchor API_AVAILABLE(macos(10.11));
229 | @property (readonly, strong) NSLayoutYAxisAnchor *bottomAnchor API_AVAILABLE(macos(10.11));
    |                                                   `- note: property declared here
230 | @property (readonly, strong) NSLayoutDimension *widthAnchor API_AVAILABLE(macos(10.11));
231 | @property (readonly, strong) NSLayoutDimension *heightAnchor API_AVAILABLE(macos(10.11));
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSPlayerLayer.swift:112:73: warning: main actor-isolated property 'bottomAnchor' can not be referenced from a nonisolated context
110 |                         view.topAnchor.constraint(equalTo: superview.topAnchor),
111 |                         view.leadingAnchor.constraint(equalTo: superview.leadingAnchor),
112 |                         view.bottomAnchor.constraint(equalTo: superview.bottomAnchor),
    |                                                                         `- warning: main actor-isolated property 'bottomAnchor' can not be referenced from a nonisolated context
113 |                         view.trailingAnchor.constraint(equalTo: superview.trailingAnchor),
114 |                     ])
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX27.0.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSLayoutConstraint.h:229:51: note: property declared here
227 | @property (readonly, strong) NSLayoutXAxisAnchor *rightAnchor API_AVAILABLE(macos(10.11));
228 | @property (readonly, strong) NSLayoutYAxisAnchor *topAnchor API_AVAILABLE(macos(10.11));
229 | @property (readonly, strong) NSLayoutYAxisAnchor *bottomAnchor API_AVAILABLE(macos(10.11));
    |                                                   `- note: property declared here
230 | @property (readonly, strong) NSLayoutDimension *widthAnchor API_AVAILABLE(macos(10.11));
231 | @property (readonly, strong) NSLayoutDimension *heightAnchor API_AVAILABLE(macos(10.11));
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSPlayerLayer.swift:113:30: warning: main actor-isolated property 'trailingAnchor' can not be referenced from a nonisolated context
111 |                         view.leadingAnchor.constraint(equalTo: superview.leadingAnchor),
112 |                         view.bottomAnchor.constraint(equalTo: superview.bottomAnchor),
113 |                         view.trailingAnchor.constraint(equalTo: superview.trailingAnchor),
    |                              `- warning: main actor-isolated property 'trailingAnchor' can not be referenced from a nonisolated context
114 |                     ])
115 |                 }
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX27.0.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSLayoutConstraint.h:225:51: note: property declared here
223 |  */
224 | @property (readonly, strong) NSLayoutXAxisAnchor *leadingAnchor API_AVAILABLE(macos(10.11));
225 | @property (readonly, strong) NSLayoutXAxisAnchor *trailingAnchor API_AVAILABLE(macos(10.11));
    |                                                   `- note: property declared here
226 | @property (readonly, strong) NSLayoutXAxisAnchor *leftAnchor API_AVAILABLE(macos(10.11));
227 | @property (readonly, strong) NSLayoutXAxisAnchor *rightAnchor API_AVAILABLE(macos(10.11));
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSPlayerLayer.swift:113:75: warning: main actor-isolated property 'trailingAnchor' can not be referenced from a nonisolated context
111 |                         view.leadingAnchor.constraint(equalTo: superview.leadingAnchor),
112 |                         view.bottomAnchor.constraint(equalTo: superview.bottomAnchor),
113 |                         view.trailingAnchor.constraint(equalTo: superview.trailingAnchor),
    |                                                                           `- warning: main actor-isolated property 'trailingAnchor' can not be referenced from a nonisolated context
114 |                     ])
115 |                 }
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX27.0.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSLayoutConstraint.h:225:51: note: property declared here
223 |  */
224 | @property (readonly, strong) NSLayoutXAxisAnchor *leadingAnchor API_AVAILABLE(macos(10.11));
225 | @property (readonly, strong) NSLayoutXAxisAnchor *trailingAnchor API_AVAILABLE(macos(10.11));
    |                                                   `- note: property declared here
226 | @property (readonly, strong) NSLayoutXAxisAnchor *leftAnchor API_AVAILABLE(macos(10.11));
227 | @property (readonly, strong) NSLayoutXAxisAnchor *rightAnchor API_AVAILABLE(macos(10.11));
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSPlayerLayer.swift:116:32: warning: call to main actor-isolated instance method 'removeFromSuperview()' in a synchronous nonisolated context [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/actor-isolated-call\ActorIsolatedCall]8;;\]
114 |                     ])
115 |                 }
116 |                 oldValue.view?.removeFromSuperview()
    |                                `- warning: call to main actor-isolated instance method 'removeFromSuperview()' in a synchronous nonisolated context [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/actor-isolated-call\ActorIsolatedCall]8;;\]
117 |             }
118 |             player.playbackRate = oldValue.playbackRate
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX27.0.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSView.h:115:1: note: calls to instance method 'removeFromSuperview()' from outside of its actor context are implicitly asynchronous
113 | - (void)willRemoveSubview:(NSView *)subview;
114 |
115 | - (void)removeFromSuperview;
    | |- note: calls to instance method 'removeFromSuperview()' from outside of its actor context are implicitly asynchronous
    | `- note: main actor isolation inferred from inheritance from class 'NSResponder'
116 | - (void)replaceSubview:(NSView *)oldView with:(NSView *)newView;
117 | - (void)removeFromSuperviewWithoutNeedingDisplay;
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSPlayerLayer.swift:176:19: warning: capture of 'self' with non-Sendable type 'KSPlayerLayer?' in a '@Sendable' closure [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures\SendableClosureCaptures]8;;\]
 65 | }
 66 |
 67 | open class KSPlayerLayer: NSObject {
    |            `- note: class 'KSPlayerLayer' does not conform to the 'Sendable' protocol
 68 |     public weak var delegate: KSPlayerLayerDelegate?
 69 |     @Published
    :
174 |
175 |     private lazy var timer: Timer = .scheduledTimer(withTimeInterval: 0.1, repeats: true) { [weak self] _ in
176 |         guard let self, self.player.isReadyToPlay else {
    |                   `- warning: capture of 'self' with non-Sendable type 'KSPlayerLayer?' in a '@Sendable' closure [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures\SendableClosureCaptures]8;;\]
177 |             return
178 |         }
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSPlayerLayer.swift:179:24: warning: call to main actor-isolated instance method 'player(layer:currentTime:totalTime:)' in a synchronous nonisolated context [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/actor-isolated-call\ActorIsolatedCall]8;;\]
 60 | public protocol KSPlayerLayerDelegate: AnyObject {
 61 |     func player(layer: KSPlayerLayer, state: KSPlayerState)
 62 |     func player(layer: KSPlayerLayer, currentTime: TimeInterval, totalTime: TimeInterval)
    |          `- note: calls to instance method 'player(layer:currentTime:totalTime:)' from outside of its actor context are implicitly asynchronous
 63 |     func player(layer: KSPlayerLayer, finish error: Error?)
 64 |     func player(layer: KSPlayerLayer, bufferedCount: Int, consumeTime: TimeInterval)
    :
177 |             return
178 |         }
179 |         self.delegate?.player(layer: self, currentTime: self.player.currentPlaybackTime, totalTime: self.player.duration)
    |                        `- warning: call to main actor-isolated instance method 'player(layer:currentTime:totalTime:)' in a synchronous nonisolated context [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/actor-isolated-call\ActorIsolatedCall]8;;\]
180 |         if self.player.playbackState == .playing, self.player.loadState == .playable, self.state == .buffering {
181 |             // 一个兜底保护,正常不能走到这里
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSPlayerLayer.swift:488:5: warning: non-'@objc' instance method declared in extension cannot be overridden; use 'public' instead; this will be an error in a future Swift language mode
486 |
487 | extension KSPlayerLayer {
488 |     open func prepareToPlay() {
    |     `- warning: non-'@objc' instance method declared in extension cannot be overridden; use 'public' instead; this will be an error in a future Swift language mode
489 |         state = .preparing
490 |         startTime = CACurrentMediaTime()
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSPlayerLayer.swift:169:36: warning: call to main actor-isolated instance method 'player(layer:state:)' in a synchronous nonisolated context [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/actor-isolated-call\ActorIsolatedCall]8;;\]
 59 | @MainActor
 60 | public protocol KSPlayerLayerDelegate: AnyObject {
 61 |     func player(layer: KSPlayerLayer, state: KSPlayerState)
    |          `- note: calls to instance method 'player(layer:state:)' from outside of its actor context are implicitly asynchronous
 62 |     func player(layer: KSPlayerLayer, currentTime: TimeInterval, totalTime: TimeInterval)
 63 |     func player(layer: KSPlayerLayer, finish error: Error?)
    :
167 |                     guard let self else { return }
168 |                     KSLog("playerStateDidChange - \(newValue)")
169 |                     self.delegate?.player(layer: self, state: newValue)
    |                                    `- warning: call to main actor-isolated instance method 'player(layer:state:)' in a synchronous nonisolated context [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/actor-isolated-call\ActorIsolatedCall]8;;\]
170 |                 }
171 |             }
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSPlayerLayer.swift:281:34: warning: main actor-isolated property 'isIdleTimerDisabled' can not be mutated from a nonisolated context
279 |     open func play() {
280 |         runOnMainThread {
281 |             UIApplication.shared.isIdleTimerDisabled = true
    |                                  `- warning: main actor-isolated property 'isIdleTimerDisabled' can not be mutated from a nonisolated context
282 |         }
283 |         isAutoPlay = true
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/Core/AppKitExtend.swift:315:9: note: mutation of this property is only permitted within the actor
313 |     }
314 |
315 |     var isIdleTimerDisabled: Bool {
    |         `- note: mutation of this property is only permitted within the actor
316 |         get {
317 |             UIApplication.isIdleTimerDisabled
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSPlayerLayer.swift:281:27: warning: main actor-isolated class property 'shared' can not be mutated from a nonisolated context
279 |     open func play() {
280 |         runOnMainThread {
281 |             UIApplication.shared.isIdleTimerDisabled = true
    |                           `- warning: main actor-isolated class property 'shared' can not be mutated from a nonisolated context
282 |         }
283 |         isAutoPlay = true
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX27.0.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSApplication.h:198:61: note: mutation of this class property is only permitted within the actor
196 | APPKIT_EXTERN __kindof NSApplication * _Null_unspecified NSApp NS_SWIFT_UI_ACTOR;
197 |
198 | @property (class, readonly, strong) __kindof NSApplication *sharedApplication;
    |                                                             `- note: mutation of this class property is only permitted within the actor
199 | @property (nullable, weak) id<NSApplicationDelegate> delegate;
200 |
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSPlayerLayer.swift:314:34: warning: main actor-isolated property 'isIdleTimerDisabled' can not be mutated from a nonisolated context
312 |         MPNowPlayingInfoCenter.default().playbackState = .paused
313 |         runOnMainThread {
314 |             UIApplication.shared.isIdleTimerDisabled = false
    |                                  `- warning: main actor-isolated property 'isIdleTimerDisabled' can not be mutated from a nonisolated context
315 |         }
316 |     }
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/Core/AppKitExtend.swift:315:9: note: mutation of this property is only permitted within the actor
313 |     }
314 |
315 |     var isIdleTimerDisabled: Bool {
    |         `- note: mutation of this property is only permitted within the actor
316 |         get {
317 |             UIApplication.isIdleTimerDisabled
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSPlayerLayer.swift:314:27: warning: main actor-isolated class property 'shared' can not be mutated from a nonisolated context
312 |         MPNowPlayingInfoCenter.default().playbackState = .paused
313 |         runOnMainThread {
314 |             UIApplication.shared.isIdleTimerDisabled = false
    |                           `- warning: main actor-isolated class property 'shared' can not be mutated from a nonisolated context
315 |         }
316 |     }
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX27.0.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSApplication.h:198:61: note: mutation of this class property is only permitted within the actor
196 | APPKIT_EXTERN __kindof NSApplication * _Null_unspecified NSApp NS_SWIFT_UI_ACTOR;
197 |
198 | @property (class, readonly, strong) __kindof NSApplication *sharedApplication;
    |                                                             `- note: mutation of this class property is only permitted within the actor
199 | @property (nullable, weak) id<NSApplicationDelegate> delegate;
200 |
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSPlayerLayer.swift:328:34: warning: main actor-isolated property 'isIdleTimerDisabled' can not be mutated from a nonisolated context
326 |         MPNowPlayingInfoCenter.default().nowPlayingInfo = nil
327 |         runOnMainThread {
328 |             UIApplication.shared.isIdleTimerDisabled = false
    |                                  `- warning: main actor-isolated property 'isIdleTimerDisabled' can not be mutated from a nonisolated context
329 |         }
330 |     }
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/Core/AppKitExtend.swift:315:9: note: mutation of this property is only permitted within the actor
313 |     }
314 |
315 |     var isIdleTimerDisabled: Bool {
    |         `- note: mutation of this property is only permitted within the actor
316 |         get {
317 |             UIApplication.isIdleTimerDisabled
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSPlayerLayer.swift:328:27: warning: main actor-isolated class property 'shared' can not be mutated from a nonisolated context
326 |         MPNowPlayingInfoCenter.default().nowPlayingInfo = nil
327 |         runOnMainThread {
328 |             UIApplication.shared.isIdleTimerDisabled = false
    |                           `- warning: main actor-isolated class property 'shared' can not be mutated from a nonisolated context
329 |         }
330 |     }
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX27.0.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSApplication.h:198:61: note: mutation of this class property is only permitted within the actor
196 | APPKIT_EXTERN __kindof NSApplication * _Null_unspecified NSApp NS_SWIFT_UI_ACTOR;
197 |
198 | @property (class, readonly, strong) __kindof NSApplication *sharedApplication;
    |                                                             `- note: mutation of this class property is only permitted within the actor
199 | @property (nullable, weak) id<NSApplicationDelegate> delegate;
200 |
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSAVPlayer.swift:313:32: warning: sending value of non-Sendable type 'any MediaPlayerDelegate' risks causing data races; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/region-isolation\RegionIsolation]8;;\::]8;;https://docs.swift.org/compiler/documentation/diagnostics/sending-risks-data-race\SendingRisksDataRace]8;;\]
311 |             loopCountObservation = playerLooper?.observe(\.loopCount) { [weak self] playerLooper, _ in
312 |                 guard let self else { return }
313 |                 self.delegate?.playBack(player: self, loopCount: playerLooper.loopCount)
    |                                |- warning: sending value of non-Sendable type 'any MediaPlayerDelegate' risks causing data races; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/region-isolation\RegionIsolation]8;;\::]8;;https://docs.swift.org/compiler/documentation/diagnostics/sending-risks-data-race\SendingRisksDataRace]8;;\]
    |                                `- note: sending main actor-isolated value of non-Sendable type 'any MediaPlayerDelegate' to main actor-isolated instance method 'playBack(player:loopCount:)' risks causing races in between main actor-isolated and main actor-isolated uses
314 |             }
315 |             loopStatusObservation = playerLooper?.observe(\.status) { [weak self] playerLooper, _ in
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSPlayerLayer.swift:84:25: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/region-isolation\RegionIsolation]8;;\::]8;;https://docs.swift.org/compiler/documentation/diagnostics/sending-risks-data-race\SendingRisksDataRace]8;;\]
 82 |                     // 一定要async才不会pip之后就暂停播放
 83 |                     DispatchQueue.main.async { [weak self] in
 84 |                         guard let self else { return }
    |                         |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/region-isolation\RegionIsolation]8;;\::]8;;https://docs.swift.org/compiler/documentation/diagnostics/sending-risks-data-race\SendingRisksDataRace]8;;\]
    |                         `- note: 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against code in the current isolation context
 85 |                         pipController.start(view: self)
 86 |                     }
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSPlayerLayer.swift:85:39: warning: sending 'pipController' risks causing data races; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/region-isolation\RegionIsolation]8;;\::]8;;https://docs.swift.org/compiler/documentation/diagnostics/sending-risks-data-race\SendingRisksDataRace]8;;\]
 83 |                     DispatchQueue.main.async { [weak self] in
 84 |                         guard let self else { return }
 85 |                         pipController.start(view: self)
    |                                       |- warning: sending 'pipController' risks causing data races; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/region-isolation\RegionIsolation]8;;\::]8;;https://docs.swift.org/compiler/documentation/diagnostics/sending-risks-data-race\SendingRisksDataRace]8;;\]
    |                                       `- note: 'pipController' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against code in the current isolation context
 86 |                     }
 87 |                 } else {
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSPlayerLayer.swift:169:36: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/region-isolation\RegionIsolation]8;;\::]8;;https://docs.swift.org/compiler/documentation/diagnostics/sending-risks-data-race\SendingRisksDataRace]8;;\]
167 |                     guard let self else { return }
168 |                     KSLog("playerStateDidChange - \(newValue)")
169 |                     self.delegate?.player(layer: self, state: newValue)
    |                                    |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/region-isolation\RegionIsolation]8;;\::]8;;https://docs.swift.org/compiler/documentation/diagnostics/sending-risks-data-race\SendingRisksDataRace]8;;\]
    |                                    `- note: sending 'self' to main actor-isolated instance method 'player(layer:state:)' risks causing data races between main actor-isolated code and code in the current isolation context
170 |                 }
171 |             }
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSPlayerLayer.swift:169:36: warning: sending 'newValue' risks causing data races; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/region-isolation\RegionIsolation]8;;\::]8;;https://docs.swift.org/compiler/documentation/diagnostics/sending-risks-data-race\SendingRisksDataRace]8;;\]
167 |                     guard let self else { return }
168 |                     KSLog("playerStateDidChange - \(newValue)")
169 |                     self.delegate?.player(layer: self, state: newValue)
    |                                    |- warning: sending 'newValue' risks causing data races; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/region-isolation\RegionIsolation]8;;\::]8;;https://docs.swift.org/compiler/documentation/diagnostics/sending-risks-data-race\SendingRisksDataRace]8;;\]
    |                                    `- note: sending 'newValue' to main actor-isolated instance method 'player(layer:state:)' risks causing data races between main actor-isolated code and code in the current isolation context
170 |                 }
171 |             }
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSPlayerLayer.swift:169:36: warning: sending value of non-Sendable type 'any KSPlayerLayerDelegate' risks causing data races; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/region-isolation\RegionIsolation]8;;\::]8;;https://docs.swift.org/compiler/documentation/diagnostics/sending-risks-data-race\SendingRisksDataRace]8;;\]
167 |                     guard let self else { return }
168 |                     KSLog("playerStateDidChange - \(newValue)")
169 |                     self.delegate?.player(layer: self, state: newValue)
    |                                    |- warning: sending value of non-Sendable type 'any KSPlayerLayerDelegate' risks causing data races; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/region-isolation\RegionIsolation]8;;\::]8;;https://docs.swift.org/compiler/documentation/diagnostics/sending-risks-data-race\SendingRisksDataRace]8;;\]
    |                                    `- note: sending value of non-Sendable type 'any KSPlayerLayerDelegate' to main actor-isolated instance method 'player(layer:state:)' risks causing races in between code in the current isolation context and main actor-isolated uses
170 |                 }
171 |             }
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSPlayerLayer.swift:179:24: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/region-isolation\RegionIsolation]8;;\::]8;;https://docs.swift.org/compiler/documentation/diagnostics/sending-risks-data-race\SendingRisksDataRace]8;;\]
177 |             return
178 |         }
179 |         self.delegate?.player(layer: self, currentTime: self.player.currentPlaybackTime, totalTime: self.player.duration)
    |                        |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/region-isolation\RegionIsolation]8;;\::]8;;https://docs.swift.org/compiler/documentation/diagnostics/sending-risks-data-race\SendingRisksDataRace]8;;\]
    |                        `- note: sending 'self' to main actor-isolated instance method 'player(layer:currentTime:totalTime:)' risks causing data races between main actor-isolated code and code in the current isolation context
180 |         if self.player.playbackState == .playing, self.player.loadState == .playable, self.state == .buffering {
181 |             // 一个兜底保护,正常不能走到这里
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSPlayerLayer.swift:179:24: warning: sending value of non-Sendable type 'any KSPlayerLayerDelegate' risks causing data races; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/region-isolation\RegionIsolation]8;;\::]8;;https://docs.swift.org/compiler/documentation/diagnostics/sending-risks-data-race\SendingRisksDataRace]8;;\]
177 |             return
178 |         }
179 |         self.delegate?.player(layer: self, currentTime: self.player.currentPlaybackTime, totalTime: self.player.duration)
    |                        |- warning: sending value of non-Sendable type 'any KSPlayerLayerDelegate' risks causing data races; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/region-isolation\RegionIsolation]8;;\::]8;;https://docs.swift.org/compiler/documentation/diagnostics/sending-risks-data-race\SendingRisksDataRace]8;;\]
    |                        `- note: sending value of non-Sendable type 'any KSPlayerLayerDelegate' to main actor-isolated instance method 'player(layer:currentTime:totalTime:)' risks causing races in between code in the current isolation context and main actor-isolated uses
180 |         if self.player.playbackState == .playing, self.player.loadState == .playable, self.state == .buffering {
181 |             // 一个兜底保护,正常不能走到这里
[#ActorIsolatedCall]: <https://docs.swift.org/compiler/documentation/diagnostics/actor-isolated-call>
[#ConformanceIsolation]: <https://docs.swift.org/compiler/documentation/diagnostics/conformance-isolation>
[#MutableGlobalVariable]: <https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable>
[#RegionIsolation]: <https://docs.swift.org/compiler/documentation/diagnostics/region-isolation>
[#SendableClosureCaptures]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures>
[#SendingRisksDataRace]: <https://docs.swift.org/compiler/documentation/diagnostics/sending-risks-data-race>
[#VariableNeverMutated]: <https://docs.swift.org/compiler/documentation/diagnostics/variable-never-mutated>
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/MEPlayer/FFmpegDecode.swift:95:37: warning: initialization of immutable value 'data' was never used; consider replacing with assignment to '_' or removing it [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
 93 |                                 }
 94 |                             } else if sideData.type == AV_FRAME_DATA_DOVI_RPU_BUFFER {
 95 |                                 let data = sideData.data.withMemoryRebound(to: [UInt8].self, capacity: 1) { $0 }
    |                                     `- warning: initialization of immutable value 'data' was never used; consider replacing with assignment to '_' or removing it [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
 96 |                             } else if sideData.type == AV_FRAME_DATA_DOVI_METADATA { // AVDOVIMetadata
 97 |                                 let data = sideData.data.withMemoryRebound(to: AVDOVIMetadata.self, capacity: 1) { $0 }
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/MEPlayer/FFmpegDecode.swift:98:37: warning: initialization of immutable value 'header' was never used; consider replacing with assignment to '_' or removing it [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
 96 |                             } else if sideData.type == AV_FRAME_DATA_DOVI_METADATA { // AVDOVIMetadata
 97 |                                 let data = sideData.data.withMemoryRebound(to: AVDOVIMetadata.self, capacity: 1) { $0 }
 98 |                                 let header = av_dovi_get_header(data)
    |                                     `- warning: initialization of immutable value 'header' was never used; consider replacing with assignment to '_' or removing it [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
 99 |                                 let mapping = av_dovi_get_mapping(data)
100 |                                 let color = av_dovi_get_color(data)
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/MEPlayer/FFmpegDecode.swift:99:37: warning: initialization of immutable value 'mapping' was never used; consider replacing with assignment to '_' or removing it [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
 97 |                                 let data = sideData.data.withMemoryRebound(to: AVDOVIMetadata.self, capacity: 1) { $0 }
 98 |                                 let header = av_dovi_get_header(data)
 99 |                                 let mapping = av_dovi_get_mapping(data)
    |                                     `- warning: initialization of immutable value 'mapping' was never used; consider replacing with assignment to '_' or removing it [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
100 |                                 let color = av_dovi_get_color(data)
101 | //                                frame.corePixelBuffer?.transferFunction = kCVImageBufferTransferFunction_ITU_R_2020
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/MEPlayer/FFmpegDecode.swift:100:37: warning: initialization of immutable value 'color' was never used; consider replacing with assignment to '_' or removing it [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
 98 |                                 let header = av_dovi_get_header(data)
 99 |                                 let mapping = av_dovi_get_mapping(data)
100 |                                 let color = av_dovi_get_color(data)
    |                                     `- warning: initialization of immutable value 'color' was never used; consider replacing with assignment to '_' or removing it [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
101 | //                                frame.corePixelBuffer?.transferFunction = kCVImageBufferTransferFunction_ITU_R_2020
102 |                             } else if sideData.type == AV_FRAME_DATA_DYNAMIC_HDR_PLUS { // AVDynamicHDRPlus
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/MEPlayer/FFmpegDecode.swift:103:37: warning: initialization of immutable value 'data' was never used; consider replacing with assignment to '_' or removing it [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
101 | //                                frame.corePixelBuffer?.transferFunction = kCVImageBufferTransferFunction_ITU_R_2020
102 |                             } else if sideData.type == AV_FRAME_DATA_DYNAMIC_HDR_PLUS { // AVDynamicHDRPlus
103 |                                 let data = sideData.data.withMemoryRebound(to: AVDynamicHDRPlus.self, capacity: 1) { $0 }.pointee
    |                                     `- warning: initialization of immutable value 'data' was never used; consider replacing with assignment to '_' or removing it [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
104 |                             } else if sideData.type == AV_FRAME_DATA_DYNAMIC_HDR_VIVID { // AVDynamicHDRVivid
105 |                                 let data = sideData.data.withMemoryRebound(to: AVDynamicHDRVivid.self, capacity: 1) { $0 }.pointee
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/MEPlayer/FFmpegDecode.swift:105:37: warning: initialization of immutable value 'data' was never used; consider replacing with assignment to '_' or removing it [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
103 |                                 let data = sideData.data.withMemoryRebound(to: AVDynamicHDRPlus.self, capacity: 1) { $0 }.pointee
104 |                             } else if sideData.type == AV_FRAME_DATA_DYNAMIC_HDR_VIVID { // AVDynamicHDRVivid
105 |                                 let data = sideData.data.withMemoryRebound(to: AVDynamicHDRVivid.self, capacity: 1) { $0 }.pointee
    |                                     `- warning: initialization of immutable value 'data' was never used; consider replacing with assignment to '_' or removing it [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
106 |                             } else if sideData.type == AV_FRAME_DATA_MASTERING_DISPLAY_METADATA {
107 |                                 let data = sideData.data.withMemoryRebound(to: AVMasteringDisplayMetadata.self, capacity: 1) { $0 }.pointee
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/MEPlayer/KSMEPlayer.swift:26:27: warning: call to main actor-isolated instance method 'removeFromSuperview()' in a synchronous nonisolated context [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/actor-isolated-call\ActorIsolatedCall]8;;\]
 24 |             oldValue?.invalidate()
 25 |             runOnMainThread {
 26 |                 oldValue?.removeFromSuperview()
    |                           `- warning: call to main actor-isolated instance method 'removeFromSuperview()' in a synchronous nonisolated context [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/actor-isolated-call\ActorIsolatedCall]8;;\]
 27 |             }
 28 |         }
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX27.0.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSView.h:115:1: note: calls to instance method 'removeFromSuperview()' from outside of its actor context are implicitly asynchronous
113 | - (void)willRemoveSubview:(NSView *)subview;
114 |
115 | - (void)removeFromSuperview;
    | |- note: calls to instance method 'removeFromSuperview()' from outside of its actor context are implicitly asynchronous
    | `- note: main actor isolation inferred from inheritance from class 'NSResponder'
116 | - (void)replaceSubview:(NSView *)oldView with:(NSView *)newView;
117 | - (void)removeFromSuperviewWithoutNeedingDisplay;
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/MEPlayer/KSMEPlayer.swift:110:35: warning: call to main actor-isolated instance method 'finish(player:error:)' in a synchronous nonisolated context [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/actor-isolated-call\ActorIsolatedCall]8;;\]
108 |                     runOnMainThread { [weak self] in
109 |                         guard let self else { return }
110 |                         delegate?.finish(player: self, error: nil)
    |                                   `- warning: call to main actor-isolated instance method 'finish(player:error:)' in a synchronous nonisolated context [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/actor-isolated-call\ActorIsolatedCall]8;;\]
111 |                     }
112 |                 }
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/MediaPlayerProtocol.swift:114:10: note: calls to instance method 'finish(player:error:)' from outside of its actor context are implicitly asynchronous
112 |     func changeBuffering(player: some MediaPlayerProtocol, progress: Int)
113 |     func playBack(player: some MediaPlayerProtocol, loopCount: Int)
114 |     func finish(player: some MediaPlayerProtocol, error: Error?)
    |          `- note: calls to instance method 'finish(player:error:)' from outside of its actor context are implicitly asynchronous
115 | }
116 |
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/MEPlayer/KSMEPlayer.swift:291:23: warning: conformance of 'KSMEPlayer' to protocol 'MediaPlayerProtocol' crosses into main actor-isolated code and can cause data races; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/conformance-isolation\ConformanceIsolation]8;;\]
289 | }
290 |
291 | extension KSMEPlayer: MediaPlayerProtocol {
    |                       |- warning: conformance of 'KSMEPlayer' to protocol 'MediaPlayerProtocol' crosses into main actor-isolated code and can cause data races; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/conformance-isolation\ConformanceIsolation]8;;\]
    |                       |- note: isolate this conformance to the main actor with '@MainActor'
    |                       `- note: turn data races into runtime errors with '@preconcurrency'
292 |     public var chapters: [Chapter] {
293 |         playerItem.chapters
    :
427 |
428 |     @MainActor
429 |     public var contentMode: UIViewContentMode {
    |                `- note: main actor-isolated property 'contentMode' cannot satisfy nonisolated requirement
430 |         get {
431 |             view?.contentMode ?? .center
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/MEPlayer/KSMEPlayer.swift:291:1: warning: conformance of 'KSMEPlayer' to protocol 'MediaPlayback' crosses into main actor-isolated code and can cause data races; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/conformance-isolation\ConformanceIsolation]8;;\]
289 | }
290 |
291 | extension KSMEPlayer: MediaPlayerProtocol {
    | |- warning: conformance of 'KSMEPlayer' to protocol 'MediaPlayback' crosses into main actor-isolated code and can cause data races; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/conformance-isolation\ConformanceIsolation]8;;\]
    | |- note: isolate this conformance to the main actor with '@MainActor'
    | `- note: turn data races into runtime errors with '@preconcurrency'
292 |     public var chapters: [Chapter] {
293 |         playerItem.chapters
    :
307 |
308 |     @MainActor
309 |     public var naturalSize: CGSize {
    |                `- note: main actor-isolated property 'naturalSize' cannot satisfy nonisolated requirement
310 |         options.display == .plane ? playerItem.naturalSize : KSOptions.sceneSize
311 |     }
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/MEPlayer/KSMEPlayer.swift:16:14: warning: non-final class 'KSMEPlayer' cannot conform to the 'Sendable' protocol
 14 | #endif
 15 |
 16 | public class KSMEPlayer: NSObject {
    |              `- warning: non-final class 'KSMEPlayer' cannot conform to the 'Sendable' protocol
 17 |     private var loopCount = 1
 18 |     private var playerItem: MEPlayerItem
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/MEPlayer/KSMEPlayer.swift:17:17: warning: stored property 'loopCount' of 'Sendable'-conforming class 'KSMEPlayer' is mutable
 15 |
 16 | public class KSMEPlayer: NSObject {
 17 |     private var loopCount = 1
    |                 `- warning: stored property 'loopCount' of 'Sendable'-conforming class 'KSMEPlayer' is mutable
 18 |     private var playerItem: MEPlayerItem
 19 |     public let audioOutput: AudioOutput
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/MEPlayer/KSMEPlayer.swift:35:27: warning: call to main actor-isolated instance method 'changeBuffering(player:progress:)' in a synchronous nonisolated context [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/actor-isolated-call\ActorIsolatedCall]8;;\]
 33 |             runOnMainThread { [weak self] in
 34 |                 guard let self else { return }
 35 |                 delegate?.changeBuffering(player: self, progress: newValue)
    |                           `- warning: call to main actor-isolated instance method 'changeBuffering(player:progress:)' in a synchronous nonisolated context [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/actor-isolated-call\ActorIsolatedCall]8;;\]
 36 |             }
 37 |         }
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/MediaPlayerProtocol.swift:112:10: note: calls to instance method 'changeBuffering(player:progress:)' from outside of its actor context are implicitly asynchronous
110 |     func changeLoadState(player: some MediaPlayerProtocol)
111 |     // 缓冲加载进度,0-100
112 |     func changeBuffering(player: some MediaPlayerProtocol, progress: Int)
    |          `- note: calls to instance method 'changeBuffering(player:progress:)' from outside of its actor context are implicitly asynchronous
113 |     func playBack(player: some MediaPlayerProtocol, loopCount: Int)
114 |     func finish(player: some MediaPlayerProtocol, error: Error?)
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/MEPlayer/KSMEPlayer.swift:164:28: warning: call to main actor-isolated instance method 'changeLoadState(player:)' in a synchronous nonisolated context [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/actor-isolated-call\ActorIsolatedCall]8;;\]
162 |                 self.videoOutput?.play()
163 |             }
164 |             self.delegate?.changeLoadState(player: self)
    |                            `- warning: call to main actor-isolated instance method 'changeLoadState(player:)' in a synchronous nonisolated context [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/actor-isolated-call\ActorIsolatedCall]8;;\]
165 |         }
166 |     }
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/MediaPlayerProtocol.swift:110:10: note: calls to instance method 'changeLoadState(player:)' from outside of its actor context are implicitly asynchronous
108 | public protocol MediaPlayerDelegate: AnyObject {
109 |     func readyToPlay(player: some MediaPlayerProtocol)
110 |     func changeLoadState(player: some MediaPlayerProtocol)
    |          `- note: calls to instance method 'changeLoadState(player:)' from outside of its actor context are implicitly asynchronous
111 |     // 缓冲加载进度,0-100
112 |     func changeBuffering(player: some MediaPlayerProtocol, progress: Int)
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/MEPlayer/KSMEPlayer.swift:210:64: warning: main actor-isolated property 'controlTimebase' can not be referenced from a nonisolated context
208 |                 audioOutput.prepare(audioFormat: audioDescriptor.audioFormat)
209 |             }
210 |             if let controlTimebase = videoOutput?.displayLayer.controlTimebase, options.startPlayTime > 1 {
    |                                                                `- warning: main actor-isolated property 'controlTimebase' can not be referenced from a nonisolated context
211 |                 CMTimebaseSetTime(controlTimebase, time: CMTimeMake(value: Int64(options.startPlayTime), timescale: 1))
212 |             }
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX27.0.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVSampleBufferDisplayLayer.h:54:70: note: property declared here
 52 | ///
 53 | /// Note that prior to OSX 10.10 and iOS 8.0, the control timebase could not be changed after enqueueSampleBuffer: was called. As of OSX 10.10 and iOS 8.0, the control timebase may be changed at any time.
 54 | @property (retain, nullable) __attribute__((NSObject)) CMTimebaseRef controlTimebase;
    |                                                                      `- note: property declared here
 55 |
 56 | /// A string defining how the video is displayed within an AVSampleBufferDisplayLayer bounds rect. @discusssion Options are AVLayerVideoGravityResizeAspect, AVLayerVideoGravityResizeAspectFill and AVLayerVideoGravityResize. AVLayerVideoGravityResizeAspect is default. See <AVFoundation/AVAnimation.h> for a description of these options.
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/MEPlayer/KSMEPlayer.swift:213:23: warning: call to main actor-isolated instance method 'readyToPlay(player:)' in a synchronous nonisolated context [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/actor-isolated-call\ActorIsolatedCall]8;;\]
211 |                 CMTimebaseSetTime(controlTimebase, time: CMTimeMake(value: Int64(options.startPlayTime), timescale: 1))
212 |             }
213 |             delegate?.readyToPlay(player: self)
    |                       `- warning: call to main actor-isolated instance method 'readyToPlay(player:)' in a synchronous nonisolated context [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/actor-isolated-call\ActorIsolatedCall]8;;\]
214 |         }
215 |     }
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/MediaPlayerProtocol.swift:109:10: note: calls to instance method 'readyToPlay(player:)' from outside of its actor context are implicitly asynchronous
107 | @MainActor
108 | public protocol MediaPlayerDelegate: AnyObject {
109 |     func readyToPlay(player: some MediaPlayerProtocol)
    |          `- note: calls to instance method 'readyToPlay(player:)' from outside of its actor context are implicitly asynchronous
110 |     func changeLoadState(player: some MediaPlayerProtocol)
111 |     // 缓冲加载进度,0-100
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/MEPlayer/KSMEPlayer.swift:220:28: warning: call to main actor-isolated instance method 'finish(player:error:)' in a synchronous nonisolated context [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/actor-isolated-call\ActorIsolatedCall]8;;\]
218 |         runOnMainThread { [weak self] in
219 |             guard let self else { return }
220 |             self.delegate?.finish(player: self, error: error)
    |                            `- warning: call to main actor-isolated instance method 'finish(player:error:)' in a synchronous nonisolated context [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/actor-isolated-call\ActorIsolatedCall]8;;\]
221 |         }
222 |     }
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/MediaPlayerProtocol.swift:114:10: note: calls to instance method 'finish(player:error:)' from outside of its actor context are implicitly asynchronous
112 |     func changeBuffering(player: some MediaPlayerProtocol, progress: Int)
113 |     func playBack(player: some MediaPlayerProtocol, loopCount: Int)
114 |     func finish(player: some MediaPlayerProtocol, error: Error?)
    |          `- note: calls to instance method 'finish(player:error:)' from outside of its actor context are implicitly asynchronous
115 | }
116 |
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/MEPlayer/KSMEPlayer.swift:229:32: warning: call to main actor-isolated instance method 'playBack(player:loopCount:)' in a synchronous nonisolated context [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/actor-isolated-call\ActorIsolatedCall]8;;\]
227 |             if self.options.isLoopPlay {
228 |                 self.loopCount += 1
229 |                 self.delegate?.playBack(player: self, loopCount: self.loopCount)
    |                                `- warning: call to main actor-isolated instance method 'playBack(player:loopCount:)' in a synchronous nonisolated context [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/actor-isolated-call\ActorIsolatedCall]8;;\]
230 |                 self.audioOutput.play()
231 |                 self.videoOutput?.play()
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/MediaPlayerProtocol.swift:113:10: note: calls to instance method 'playBack(player:loopCount:)' from outside of its actor context are implicitly asynchronous
111 |     // 缓冲加载进度,0-100
112 |     func changeBuffering(player: some MediaPlayerProtocol, progress: Int)
113 |     func playBack(player: some MediaPlayerProtocol, loopCount: Int)
    |          `- note: calls to instance method 'playBack(player:loopCount:)' from outside of its actor context are implicitly asynchronous
114 |     func finish(player: some MediaPlayerProtocol, error: Error?)
115 | }
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/MEPlayer/KSMEPlayer.swift:373:77: warning: main actor-isolated property 'controlTimebase' can not be referenced from a nonisolated context
371 |                 runOnMainThread { [weak self] in
372 |                     guard let self else { return }
373 |                     if let controlTimebase = self.videoOutput?.displayLayer.controlTimebase {
    |                                                                             `- warning: main actor-isolated property 'controlTimebase' can not be referenced from a nonisolated context
374 |                         CMTimebaseSetTime(controlTimebase, time: CMTimeMake(value: Int64(self.currentPlaybackTime), timescale: 1))
375 |                     }
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX27.0.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVSampleBufferDisplayLayer.h:54:70: note: property declared here
 52 | ///
 53 | /// Note that prior to OSX 10.10 and iOS 8.0, the control timebase could not be changed after enqueueSampleBuffer: was called. As of OSX 10.10 and iOS 8.0, the control timebase may be changed at any time.
 54 | @property (retain, nullable) __attribute__((NSObject)) CMTimebaseRef controlTimebase;
    |                                                                      `- note: property declared here
 55 |
 56 | /// A string defining how the video is displayed within an AVSampleBufferDisplayLayer bounds rect. @discusssion Options are AVLayerVideoGravityResizeAspect, AVLayerVideoGravityResizeAspectFill and AVLayerVideoGravityResize. AVLayerVideoGravityResizeAspect is default. See <AVFoundation/AVAnimation.h> for a description of these options.
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/MEPlayer/KSMEPlayer.swift:516:13: warning: capture of 'completionHandler' with non-Sendable type '() -> Void' in a '@Sendable' closure [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures\SendableClosureCaptures]8;;\]
514 |                 self.play()
515 |             }
516 |             completionHandler()
    |             |- warning: capture of 'completionHandler' with non-Sendable type '() -> Void' in a '@Sendable' closure [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures\SendableClosureCaptures]8;;\]
    |             `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
517 |         }
518 |     }
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/MEPlayer/KSMEPlayer.swift:532:13: warning: capture of 'completionHandler' with non-Sendable type '() -> Void' in a '@Sendable' closure [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures\SendableClosureCaptures]8;;\]
530 |                 self.pause()
531 |             }
532 |             completionHandler()
    |             |- warning: capture of 'completionHandler' with non-Sendable type '() -> Void' in a '@Sendable' closure [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures\SendableClosureCaptures]8;;\]
    |             `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
533 |         }
534 |     }
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/MEPlayer/KSMEPlayer.swift:557:17: warning: capture of 'completionHandler' with non-Sendable type '() -> Void' in a '@Sendable' closure [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures\SendableClosureCaptures]8;;\]
555 |             }
556 |             guard self.loadState != .playable, let countDown = bufferingCommand.completionDueDate?.timeIntervalSinceNow else {
557 |                 completionHandler()
    |                 |- warning: capture of 'completionHandler' with non-Sendable type '() -> Void' in a '@Sendable' closure [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures\SendableClosureCaptures]8;;\]
    |                 `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
558 |                 return
559 |             }
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/MEPlayer/KSMEPlayer.swift:563:17: warning: capture of 'completionHandler' with non-Sendable type '() -> Void' in a '@Sendable' closure [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures\SendableClosureCaptures]8;;\]
561 |             self.bufferingCountDownTimer = nil
562 |             self.bufferingCountDownTimer = Timer(timeInterval: countDown, repeats: false) { _ in
563 |                 completionHandler()
    |                 |- warning: capture of 'completionHandler' with non-Sendable type '() -> Void' in a '@Sendable' closure [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures\SendableClosureCaptures]8;;\]
    |                 `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
564 |             }
565 |         }
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/MEPlayer/MEPlayerItem.swift:94:24: warning: static property 'onceInitial' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
 92 |     }
 93 |
 94 |     private static var onceInitial: Void = {
    |                        |- warning: static property 'onceInitial' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
    |                        |- note: convert 'onceInitial' to a 'let' constant to make 'Sendable' shared state immutable
    |                        |- note: add '@MainActor' to make static property 'onceInitial' part of global actor 'MainActor'
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 95 |         var result = avformat_network_init()
 96 |         av_log_set_callback { ptr, level, format, args in
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/MEPlayer/MEPlayerItem.swift:16:17: warning: stored property 'options' of 'Sendable'-conforming class 'MEPlayerItem' has non-Sendable type 'KSOptions'; this is an error in the Swift 6 language mode
 14 | public final class MEPlayerItem: Sendable {
 15 |     private let url: URL
 16 |     private let options: KSOptions
    |                 `- warning: stored property 'options' of 'Sendable'-conforming class 'MEPlayerItem' has non-Sendable type 'KSOptions'; this is an error in the Swift 6 language mode
 17 |     private let operationQueue = OperationQueue()
 18 |     private let condition = NSCondition()
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/AVPlayer/KSOptions.swift:17:12: note: class 'KSOptions' does not conform to the 'Sendable' protocol
 15 | import UIKit
 16 | #endif
 17 | open class KSOptions {
    |            `- note: class 'KSOptions' does not conform to the 'Sendable' protocol
 18 |     /// 最低缓存视频时间
 19 |     @Published
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/MEPlayer/MEPlayerItem.swift:19:17: warning: stored property 'formatCtx' of 'Sendable'-conforming class 'MEPlayerItem' is mutable; this is an error in the Swift 6 language mode
 17 |     private let operationQueue = OperationQueue()
 18 |     private let condition = NSCondition()
 19 |     private var formatCtx: UnsafeMutablePointer<AVFormatContext>?
    |                 `- warning: stored property 'formatCtx' of 'Sendable'-conforming class 'MEPlayerItem' is mutable; this is an error in the Swift 6 language mode
 20 |     private var outputFormatCtx: UnsafeMutablePointer<AVFormatContext>?
 21 |     private var outputPacket: UnsafeMutablePointer<AVPacket>?
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/MEPlayer/MEPlayerItem.swift:441:21: warning: initialization of immutable value 'result' was never used; consider replacing with assignment to '_' or removing it [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
439 |                 let flags = seekByBytes ? AVSEEK_FLAG_BYTE : 0
440 |                 let seekStartTime = CACurrentMediaTime()
441 |                 let result = avformat_seek_file(formatCtx, -1, Int64.min, timestamp.value, Int64.max, flags)
    |                     `- warning: initialization of immutable value 'result' was never used; consider replacing with assignment to '_' or removing it [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
442 |                 audioClock.time = timestamp
443 |                 videoClock.time = timestamp
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/MEPlayer/MEPlayerItem.swift:507:52: warning: reference to captured var 'result' in concurrently-executing code [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures\SendableClosureCaptures]8;;\]
505 |                 DispatchQueue.main.async { [weak self] in
506 |                     guard let self else { return }
507 |                     self.seekingCompletionHandler?(result >= 0)
    |                                                    `- warning: reference to captured var 'result' in concurrently-executing code [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures\SendableClosureCaptures]8;;\]
508 |                     self.seekingCompletionHandler = nil
509 |                 }
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/MEPlayer/MEPlayerItemTrack.swift:223:23: warning: capture of 'self' with non-Sendable type 'AsyncPlayerItemTrack<Frame>?' in a '@Sendable' closure [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures\SendableClosureCaptures]8;;\]
177 | }
178 |
179 | final class AsyncPlayerItemTrack<Frame: MEFrame>: SyncPlayerItemTrack<Frame> {
    |             `- note: generic class 'AsyncPlayerItemTrack' does not conform to the 'Sendable' protocol
180 |     private let operationQueue = OperationQueue()
181 |     private var decodeOperation: BlockOperation!
    :
221 |         guard operationQueue.operationCount == 0 else { return }
222 |         decodeOperation = BlockOperation { [weak self] in
223 |             guard let self else { return }
    |                       `- warning: capture of 'self' with non-Sendable type 'AsyncPlayerItemTrack<Frame>?' in a '@Sendable' closure [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures\SendableClosureCaptures]8;;\]
224 |             Thread.current.name = self.operationQueue.name
225 |             Thread.current.stackSize = KSOptions.stackSize
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/MEPlayer/MEPlayerItemTrack.swift:223:23: warning: capture of non-Sendable type 'Frame.Type' in an isolated closure [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/sendable-metatypes\SendableMetatypes]8;;\]
221 |         guard operationQueue.operationCount == 0 else { return }
222 |         decodeOperation = BlockOperation { [weak self] in
223 |             guard let self else { return }
    |                       `- warning: capture of non-Sendable type 'Frame.Type' in an isolated closure [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/sendable-metatypes\SendableMetatypes]8;;\]
224 |             Thread.current.name = self.operationQueue.name
225 |             Thread.current.stackSize = KSOptions.stackSize
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/MEPlayer/MetalPlayView.swift:28:43: warning: conformance of 'MetalPlayView' to protocol 'VideoOutput' crosses into main actor-isolated code and can cause data races; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/conformance-isolation\ConformanceIsolation]8;;\]
 26 | }
 27 |
 28 | public final class MetalPlayView: UIView, VideoOutput {
    |                                           |- warning: conformance of 'MetalPlayView' to protocol 'VideoOutput' crosses into main actor-isolated code and can cause data races; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/conformance-isolation\ConformanceIsolation]8;;\]
    |                                           |- note: isolate this conformance to the main actor with '@MainActor'
    |                                           `- note: turn data races into runtime errors with '@preconcurrency'
 29 |     public var displayLayer: AVSampleBufferDisplayLayer {
    |                |- note: main actor-isolated property 'displayLayer' cannot satisfy nonisolated requirement
    |                `- note: mark property 'displayLayer' 'nonisolated'
 30 |         displayView.displayLayer
 31 |     }
    :
 54 |     }
 55 |
 56 |     public private(set) var pixelBuffer: PixelBufferProtocol?
    |                             |- note: main actor-isolated property 'pixelBuffer' cannot satisfy nonisolated requirement
    |                             `- note: change property 'pixelBuffer' to a 'nonisolated let' constant
 57 |     /// 用displayLink会导致锁屏无法draw,
 58 |     /// 用DispatchSourceTimer的话,在播放4k视频的时候repeat的时间会变长,
    :
 60 |     private var displayLink: CADisplayLink!
 61 | //    private let timer = DispatchSource.makeTimerSource(queue: DispatchQueue.main)
 62 |     public var options: KSOptions
    |                `- note: main actor-isolated property 'options' cannot satisfy nonisolated requirement
 63 |     public weak var renderSource: OutputRenderSourceDelegate?
 64 |     // AVSampleBufferAudioRenderer AVSampleBufferRenderSynchronizer AVSampleBufferDisplayLayer
    :
 70 |
 71 |     private let metalView = MetalView()
 72 |     public weak var displayLayerDelegate: DisplayLayerDelegate?
    |                     `- note: main actor-isolated property 'displayLayerDelegate' cannot satisfy nonisolated requirement
 73 |     public init(options: KSOptions) {
    |            |- note: main actor-isolated initializer 'init(options:)' cannot satisfy nonisolated requirement
    |            `- note: mark initializer 'init(options:)' 'nonisolated'
 74 |         self.options = options
 75 |         super.init(frame: .zero)
    :
151 |     }
152 |
153 |     public func invalidate() {
    |                 |- note: main actor-isolated instance method 'invalidate()' cannot satisfy nonisolated requirement
    |                 `- note: mark instance method 'invalidate()' 'nonisolated'
154 |         displayLink.invalidate()
155 |     }
156 |
157 |     public func readNextFrame() {
    |                 |- note: main actor-isolated instance method 'readNextFrame()' cannot satisfy nonisolated requirement
    |                 `- note: mark instance method 'readNextFrame()' 'nonisolated'
158 |         draw(force: true)
159 |     }
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/MEPlayer/MetalPlayView.swift:28:20: warning: conformance of 'MetalPlayView' to protocol 'FrameOutput' crosses into main actor-isolated code and can cause data races; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/conformance-isolation\ConformanceIsolation]8;;\]
 26 | }
 27 |
 28 | public final class MetalPlayView: UIView, VideoOutput {
    |                    |- warning: conformance of 'MetalPlayView' to protocol 'FrameOutput' crosses into main actor-isolated code and can cause data races; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/conformance-isolation\ConformanceIsolation]8;;\]
    |                    |- note: isolate this conformance to the main actor with '@MainActor'
    |                    `- note: turn data races into runtime errors with '@preconcurrency'
 29 |     public var displayLayer: AVSampleBufferDisplayLayer {
 30 |         displayView.displayLayer
    :
 61 | //    private let timer = DispatchSource.makeTimerSource(queue: DispatchQueue.main)
 62 |     public var options: KSOptions
 63 |     public weak var renderSource: OutputRenderSourceDelegate?
    |                     `- note: main actor-isolated property 'renderSource' cannot satisfy nonisolated requirement
 64 |     // AVSampleBufferAudioRenderer AVSampleBufferRenderSynchronizer AVSampleBufferDisplayLayer
 65 |     var displayView = AVSampleBufferDisplayView() {
    :
 84 |     }
 85 |
 86 |     public func play() {
    |                 |- note: main actor-isolated instance method 'play()' cannot satisfy nonisolated requirement
    |                 `- note: mark instance method 'play()' 'nonisolated'
 87 |         displayLink.isPaused = false
 88 |     }
 89 |
 90 |     public func pause() {
    |                 |- note: main actor-isolated instance method 'pause()' cannot satisfy nonisolated requirement
    |                 `- note: mark instance method 'pause()' 'nonisolated'
 91 |         displayLink.isPaused = true
 92 |     }
    :
142 |     #endif
143 |
144 |     public func flush() {
    |                 |- note: main actor-isolated instance method 'flush()' cannot satisfy nonisolated requirement
    |                 `- note: mark instance method 'flush()' 'nonisolated'
145 |         pixelBuffer = nil
146 |         if displayView.isHidden {
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/MEPlayer/MetalPlayView.swift:415:23: warning: capture of 'self' with non-Sendable type 'CADisplayLink?' in a '@Sendable' closure [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures\SendableClosureCaptures]8;;\]
366 | import CoreVideo
367 |
368 | class CADisplayLink {
    |       `- note: class 'CADisplayLink' does not conform to the 'Sendable' protocol
369 |     private let displayLink: CVDisplayLink
370 |     private var runloop: RunLoop?
    :
413 |         self.displayLink = displayLink!
414 |         CVDisplayLinkSetOutputHandler(self.displayLink) { [weak self] _, _, _, _, _ in
415 |             guard let self else { return kCVReturnSuccess }
    |                       `- warning: capture of 'self' with non-Sendable type 'CADisplayLink?' in a '@Sendable' closure [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures\SendableClosureCaptures]8;;\]
416 |             self.runloop?.perform(selector, target: target, argument: self, order: 0, modes: [self.mode])
417 |             return kCVReturnSuccess
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/MEPlayer/MetalPlayView.swift:416:53: warning: capture of 'target' with non-Sendable type 'NSObject' in a '@Sendable' closure [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures\SendableClosureCaptures]8;;\]
414 |         CVDisplayLinkSetOutputHandler(self.displayLink) { [weak self] _, _, _, _, _ in
415 |             guard let self else { return kCVReturnSuccess }
416 |             self.runloop?.perform(selector, target: target, argument: self, order: 0, modes: [self.mode])
    |                                                     `- warning: capture of 'target' with non-Sendable type 'NSObject' in a '@Sendable' closure [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures\SendableClosureCaptures]8;;\]
417 |             return kCVReturnSuccess
418 |         }
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/NSObject.h:53:12: note: class 'NSObject' does not conform to the 'Sendable' protocol
 51 | OBJC_ROOT_CLASS
 52 | OBJC_EXPORT
 53 | @interface NSObject <NSObject> {
    |            `- note: class 'NSObject' does not conform to the 'Sendable' protocol
 54 | #pragma clang diagnostic push
 55 | #pragma clang diagnostic ignored "-Wobjc-interface-ivars"
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/MEPlayer/MetalPlayView.swift:8:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'ObjectiveC' [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/add-preconcurrency-import\AddPreconcurrencyImport]8;;\]
  6 | //
  7 |
  8 | import AVFoundation
    | `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'ObjectiveC' [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/add-preconcurrency-import\AddPreconcurrencyImport]8;;\]
  9 | import Combine
 10 | import CoreMedia
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/MEPlayer/MetalPlayView.swift:427:13: warning: capture of 'block' with non-Sendable type '() -> Void' in a '@Sendable' closure [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures\SendableClosureCaptures]8;;\]
425 |         self.displayLink = displayLink!
426 |         CVDisplayLinkSetOutputHandler(self.displayLink) { _, _, _, _, _ in
427 |             block()
    |             |- warning: capture of 'block' with non-Sendable type '() -> Void' in a '@Sendable' closure [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures\SendableClosureCaptures]8;;\]
    |             `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
428 |             return kCVReturnSuccess
429 |         }
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/MEPlayer/KSMEPlayer.swift:516:13: warning: sending 'completionHandler' risks causing data races; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/region-isolation\RegionIsolation]8;;\::]8;;https://docs.swift.org/compiler/documentation/diagnostics/sending-risks-data-race\SendingRisksDataRace]8;;\]
514 |                 self.play()
515 |             }
516 |             completionHandler()
    |             |- warning: sending 'completionHandler' risks causing data races; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/region-isolation\RegionIsolation]8;;\::]8;;https://docs.swift.org/compiler/documentation/diagnostics/sending-risks-data-race\SendingRisksDataRace]8;;\]
    |             `- note: 'completionHandler' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against code in the current isolation context
517 |         }
518 |     }
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/MEPlayer/KSMEPlayer.swift:532:13: warning: sending 'completionHandler' risks causing data races; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/region-isolation\RegionIsolation]8;;\::]8;;https://docs.swift.org/compiler/documentation/diagnostics/sending-risks-data-race\SendingRisksDataRace]8;;\]
530 |                 self.pause()
531 |             }
532 |             completionHandler()
    |             |- warning: sending 'completionHandler' risks causing data races; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/region-isolation\RegionIsolation]8;;\::]8;;https://docs.swift.org/compiler/documentation/diagnostics/sending-risks-data-race\SendingRisksDataRace]8;;\]
    |             `- note: 'completionHandler' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against code in the current isolation context
533 |         }
534 |     }
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/MEPlayer/KSMEPlayer.swift:557:17: warning: sending 'completionHandler' risks causing data races; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/region-isolation\RegionIsolation]8;;\::]8;;https://docs.swift.org/compiler/documentation/diagnostics/sending-risks-data-race\SendingRisksDataRace]8;;\]
555 |             }
556 |             guard self.loadState != .playable, let countDown = bufferingCommand.completionDueDate?.timeIntervalSinceNow else {
557 |                 completionHandler()
    |                 |- warning: sending 'completionHandler' risks causing data races; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/region-isolation\RegionIsolation]8;;\::]8;;https://docs.swift.org/compiler/documentation/diagnostics/sending-risks-data-race\SendingRisksDataRace]8;;\]
    |                 `- note: 'completionHandler' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against code in the current isolation context
558 |                 return
559 |             }
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/MEPlayer/MEPlayerItem.swift:494:28: warning: 'result' mutated after capture by sendable closure
483 |                 // can not seek to key frame
484 |                 let seekStartTime = CACurrentMediaTime()
485 |                 var result = avformat_seek_file(formatCtx, -1, seekMin, timeStamp, seekMax, seekFlags)
    |                     `- note: variable defined here
486 | //                var result = av_seek_frame(formatCtx, -1, timeStamp, seekFlags)
487 |                 // When seeking before the beginning of the file, and seeking fails,
    :
492 |                     options.seekFlags &= ~AVSEEK_FLAG_BACKWARD
493 |                     seekFlags &= ~AVSEEK_FLAG_BACKWARD
494 |                     result = avformat_seek_file(formatCtx, -1, seekMin, timeStamp, seekMax, seekFlags)
    |                            `- warning: 'result' mutated after capture by sendable closure
495 |                 }
496 |                 KSLog("seek to \(seekToTime) spend Time: \(CACurrentMediaTime() - seekStartTime)")
    :
503 |                 isSeek = true
504 |                 allPlayerItemTracks.forEach { $0.seek(time: seekToTime) }
505 |                 DispatchQueue.main.async { [weak self] in
    |                                          `- note: variable captured by sendable closure
506 |                     guard let self else { return }
507 |                     self.seekingCompletionHandler?(result >= 0)
    |                                                    `- note: capturing use
508 |                     self.seekingCompletionHandler = nil
509 |                 }
[#ActorIsolatedCall]: <https://docs.swift.org/compiler/documentation/diagnostics/actor-isolated-call>
[#AddPreconcurrencyImport]: <https://docs.swift.org/compiler/documentation/diagnostics/add-preconcurrency-import>
[#ConformanceIsolation]: <https://docs.swift.org/compiler/documentation/diagnostics/conformance-isolation>
[#MutableGlobalVariable]: <https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable>
[#NoUsage]: <https://docs.swift.org/compiler/documentation/diagnostics/no-usage>
[#RegionIsolation]: <https://docs.swift.org/compiler/documentation/diagnostics/region-isolation>
[#SendableClosureCaptures]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures>
[#SendableMetatypes]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-metatypes>
[#SendingRisksDataRace]: <https://docs.swift.org/compiler/documentation/diagnostics/sending-risks-data-race>
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/Subtitle/KSSubtitle.swift:280:23: warning: static property 'textColor' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
278 |     }
279 |
280 |     public static var textColor: Color = .white
    |                       |- warning: static property 'textColor' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
    |                       |- note: convert 'textColor' to a 'let' constant to make 'Sendable' shared state immutable
    |                       |- note: add '@MainActor' to make static property 'textColor' part of global actor 'MainActor'
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
281 |     public static var textBackgroundColor: Color = .clear
282 |     public static var textFont: UIFont {
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/Subtitle/KSSubtitle.swift:281:23: warning: static property 'textBackgroundColor' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
279 |
280 |     public static var textColor: Color = .white
281 |     public static var textBackgroundColor: Color = .clear
    |                       |- warning: static property 'textBackgroundColor' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
    |                       |- note: convert 'textBackgroundColor' to a 'let' constant to make 'Sendable' shared state immutable
    |                       |- note: add '@MainActor' to make static property 'textBackgroundColor' part of global actor 'MainActor'
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
282 |     public static var textFont: UIFont {
283 |         textBold ? .boldSystemFont(ofSize: textFontSize) : .systemFont(ofSize: textFontSize)
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/Subtitle/KSSubtitle.swift:286:23: warning: static property 'textFontSize' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
284 |     }
285 |
286 |     public static var textFontSize = SubtitleModel.Size.standard.rawValue
    |                       |- warning: static property 'textFontSize' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
    |                       |- note: convert 'textFontSize' to a 'let' constant to make 'Sendable' shared state immutable
    |                       |- note: add '@MainActor' to make static property 'textFontSize' part of global actor 'MainActor'
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
287 |     public static var textBold = false
288 |     public static var textItalic = false
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/Subtitle/KSSubtitle.swift:287:23: warning: static property 'textBold' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
285 |
286 |     public static var textFontSize = SubtitleModel.Size.standard.rawValue
287 |     public static var textBold = false
    |                       |- warning: static property 'textBold' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
    |                       |- note: convert 'textBold' to a 'let' constant to make 'Sendable' shared state immutable
    |                       |- note: add '@MainActor' to make static property 'textBold' part of global actor 'MainActor'
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
288 |     public static var textItalic = false
289 |     public static var textPosition = TextPosition()
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/Subtitle/KSSubtitle.swift:288:23: warning: static property 'textItalic' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
286 |     public static var textFontSize = SubtitleModel.Size.standard.rawValue
287 |     public static var textBold = false
288 |     public static var textItalic = false
    |                       |- warning: static property 'textItalic' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
    |                       |- note: convert 'textItalic' to a 'let' constant to make 'Sendable' shared state immutable
    |                       |- note: add '@MainActor' to make static property 'textItalic' part of global actor 'MainActor'
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
289 |     public static var textPosition = TextPosition()
290 |     public static var audioRecognizes = [any AudioRecognize]()
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/Subtitle/KSSubtitle.swift:289:23: warning: static property 'textPosition' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
287 |     public static var textBold = false
288 |     public static var textItalic = false
289 |     public static var textPosition = TextPosition()
    |                       |- warning: static property 'textPosition' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
    |                       |- note: convert 'textPosition' to a 'let' constant to make 'Sendable' shared state immutable
    |                       |- note: add '@MainActor' to make static property 'textPosition' part of global actor 'MainActor'
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
290 |     public static var audioRecognizes = [any AudioRecognize]()
291 |     private var subtitleDataSouces: [SubtitleDataSouce] = KSOptions.subtitleDataSouces
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/Subtitle/KSSubtitle.swift:290:23: warning: static property 'audioRecognizes' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
288 |     public static var textItalic = false
289 |     public static var textPosition = TextPosition()
290 |     public static var audioRecognizes = [any AudioRecognize]()
    |                       |- warning: static property 'audioRecognizes' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
    |                       |- note: convert 'audioRecognizes' to a 'let' constant to make 'Sendable' shared state immutable
    |                       |- note: add '@MainActor' to make static property 'audioRecognizes' part of global actor 'MainActor'
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
291 |     private var subtitleDataSouces: [SubtitleDataSouce] = KSOptions.subtitleDataSouces
292 |     @Published
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/Subtitle/KSSubtitle.swift:309:17: warning: capture of 'self' with non-Sendable type 'SubtitleModel?' in a '@Sendable' closure [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures\SendableClosureCaptures]8;;\]
231 | }
232 |
233 | open class SubtitleModel: ObservableObject {
    |            `- note: class 'SubtitleModel' does not conform to the 'Sendable' protocol
234 |     public enum Size {
235 |         case smaller
    :
307 |             // 要用async,不能在更新UI的时候,修改Publishe变量
308 |             DispatchQueue.main.async { [weak self] in
309 |                 self?.parts = []
    |                 `- warning: capture of 'self' with non-Sendable type 'SubtitleModel?' in a '@Sendable' closure [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures\SendableClosureCaptures]8;;\]
310 |                 self?.selectedSubtitleInfo = nil
311 |             }
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/Subtitle/SubtitleDataSouce.swift:80:16: warning: static property 'subtitleDataSouces' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
 78 |
 79 | public extension KSOptions {
 80 |     static var subtitleDataSouces: [SubtitleDataSouce] = [DirectorySubtitleDataSouce()]
    |                |- warning: static property 'subtitleDataSouces' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
    |                |- note: convert 'subtitleDataSouces' to a 'let' constant to make 'Sendable' shared state immutable
    |                |- note: add '@MainActor' to make static property 'subtitleDataSouces' part of global actor 'MainActor'
    |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 81 | }
 82 |
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/Subtitle/SubtitleDataSouce.swift:84:23: warning: static property 'singleton' is not concurrency-safe because non-'Sendable' type 'PlistCacheSubtitleDataSouce' may have shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
 81 | }
 82 |
 83 | public class PlistCacheSubtitleDataSouce: CacheSubtitleDataSouce {
    |              `- note: class 'PlistCacheSubtitleDataSouce' does not conform to the 'Sendable' protocol
 84 |     public static let singleton = PlistCacheSubtitleDataSouce()
    |                       |- warning: static property 'singleton' is not concurrency-safe because non-'Sendable' type 'PlistCacheSubtitleDataSouce' may have shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
    |                       |- note: add '@MainActor' to make static property 'singleton' part of global actor 'MainActor'
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 85 |     public var infos = [any SubtitleInfo]()
 86 |     private let srtCacheInfoPath: String
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/Subtitle/SubtitleDataSouce.swift:97:23: warning: capture of 'self' with non-Sendable type 'PlistCacheSubtitleDataSouce?' in a '@Sendable' closure [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures\SendableClosureCaptures]8;;\]
 81 | }
 82 |
 83 | public class PlistCacheSubtitleDataSouce: CacheSubtitleDataSouce {
    |              `- note: class 'PlistCacheSubtitleDataSouce' does not conform to the 'Sendable' protocol
 84 |     public static let singleton = PlistCacheSubtitleDataSouce()
 85 |     public var infos = [any SubtitleInfo]()
    :
 95 |         srtInfoCaches = [String: [String]]()
 96 |         DispatchQueue.global().async { [weak self] in
 97 |             guard let self else {
    |                       `- warning: capture of 'self' with non-Sendable type 'PlistCacheSubtitleDataSouce?' in a '@Sendable' closure [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures\SendableClosureCaptures]8;;\]
 98 |                 return
 99 |             }
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/Subtitle/SubtitleDataSouce.swift:127:27: warning: capture of 'self' with non-Sendable type 'PlistCacheSubtitleDataSouce?' in a '@Sendable' closure [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures\SendableClosureCaptures]8;;\]
 81 | }
 82 |
 83 | public class PlistCacheSubtitleDataSouce: CacheSubtitleDataSouce {
    |              `- note: class 'PlistCacheSubtitleDataSouce' does not conform to the 'Sendable' protocol
 84 |     public static let singleton = PlistCacheSubtitleDataSouce()
 85 |     public var infos = [any SubtitleInfo]()
    :
125 |             srtInfoCaches[file] = array
126 |             DispatchQueue.global().async { [weak self] in
127 |                 guard let self else {
    |                           `- warning: capture of 'self' with non-Sendable type 'PlistCacheSubtitleDataSouce?' in a '@Sendable' closure [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures\SendableClosureCaptures]8;;\]
128 |                     return
129 |                 }
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/SwiftUI/KSVideoPlayerView.swift:218:25: warning: call to main actor-isolated instance method 'openURL' in a synchronous nonisolated context [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/actor-isolated-call\ActorIsolatedCall]8;;\]
216 |                 providers.first?.loadDataRepresentation(forTypeIdentifier: "public.file-url") { data, _ in
217 |                     if let data, let path = NSString(data: data, encoding: 4), let url = URL(string: path as String) {
218 |                         openURL(url)
    |                         `- warning: call to main actor-isolated instance method 'openURL' in a synchronous nonisolated context [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/actor-isolated-call\ActorIsolatedCall]8;;\]
219 |                     }
220 |                 }
    :
302 |     }
303 |
304 |     public func openURL(_ url: URL) {
    |                 `- note: calls to instance method 'openURL' from outside of its actor context are implicitly asynchronous
305 |         runOnMainThread {
306 |             if url.isSubtitle {
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/Subtitle/KSSubtitle.swift:369:42: warning: sending 'dataSouce' risks causing data races; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/region-isolation\RegionIsolation]8;;\::]8;;https://docs.swift.org/compiler/documentation/diagnostics/sending-risks-data-race\SendingRisksDataRace]8;;\]
358 |     }
359 |
360 |     public func searchSubtitle(query: String?, languages: [String]) {
    |                 `- note: isolated conformance to protocol 'SearchSubtitleDataSouce' can be introduced here
361 |         for dataSouce in subtitleDataSouces {
362 |             if let dataSouce = dataSouce as? SearchSubtitleDataSouce {
    :
367 |                 }
368 |                 Task { @MainActor in
369 |                     try? await dataSouce.searchSubtitle(query: query, languages: languages)
    |                                          |- warning: sending 'dataSouce' risks causing data races; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/region-isolation\RegionIsolation]8;;\::]8;;https://docs.swift.org/compiler/documentation/diagnostics/sending-risks-data-race\SendingRisksDataRace]8;;\]
    |                                          `- note: 'dataSouce' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against code in the current isolation context
370 |                     subtitleInfos.append(contentsOf: dataSouce.infos)
371 |                 }
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/Subtitle/KSSubtitle.swift:370:21: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/region-isolation\RegionIsolation]8;;\::]8;;https://docs.swift.org/compiler/documentation/diagnostics/sending-risks-data-race\SendingRisksDataRace]8;;\]
358 |     }
359 |
360 |     public func searchSubtitle(query: String?, languages: [String]) {
    |                 `- note: isolated conformance to protocol 'SearchSubtitleDataSouce' can be introduced here
361 |         for dataSouce in subtitleDataSouces {
362 |             if let dataSouce = dataSouce as? SearchSubtitleDataSouce {
    :
368 |                 Task { @MainActor in
369 |                     try? await dataSouce.searchSubtitle(query: query, languages: languages)
370 |                     subtitleInfos.append(contentsOf: dataSouce.infos)
    |                     |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/region-isolation\RegionIsolation]8;;\::]8;;https://docs.swift.org/compiler/documentation/diagnostics/sending-risks-data-race\SendingRisksDataRace]8;;\]
    |                     `- note: 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against code in the current isolation context
371 |                 }
372 |             }
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/Subtitle/KSSubtitle.swift:379:38: warning: sending 'dataSouce' risks causing data races; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/region-isolation\RegionIsolation]8;;\::]8;;https://docs.swift.org/compiler/documentation/diagnostics/sending-risks-data-race\SendingRisksDataRace]8;;\]
374 |     }
375 |
376 |     public func addSubtitle(dataSouce: SubtitleDataSouce) {
    |                 `- note: isolated conformance to protocol 'FileURLSubtitleDataSouce' can be introduced here
377 |         if let dataSouce = dataSouce as? FileURLSubtitleDataSouce {
378 |             Task { @MainActor in
379 |                 try? await dataSouce.searchSubtitle(fileURL: url)
    |                                      |- warning: sending 'dataSouce' risks causing data races; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/region-isolation\RegionIsolation]8;;\::]8;;https://docs.swift.org/compiler/documentation/diagnostics/sending-risks-data-race\SendingRisksDataRace]8;;\]
    |                                      `- note: 'dataSouce' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against code in the current isolation context
380 |                 subtitleInfos.append(contentsOf: dataSouce.infos)
381 |             }
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/Subtitle/KSSubtitle.swift:379:62: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/region-isolation\RegionIsolation]8;;\::]8;;https://docs.swift.org/compiler/documentation/diagnostics/sending-risks-data-race\SendingRisksDataRace]8;;\]
374 |     }
375 |
376 |     public func addSubtitle(dataSouce: SubtitleDataSouce) {
    |                 `- note: isolated conformance to protocol 'FileURLSubtitleDataSouce' can be introduced here
377 |         if let dataSouce = dataSouce as? FileURLSubtitleDataSouce {
378 |             Task { @MainActor in
379 |                 try? await dataSouce.searchSubtitle(fileURL: url)
    |                                                              |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/region-isolation\RegionIsolation]8;;\::]8;;https://docs.swift.org/compiler/documentation/diagnostics/sending-risks-data-race\SendingRisksDataRace]8;;\]
    |                                                              `- note: 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against code in the current isolation context
380 |                 subtitleInfos.append(contentsOf: dataSouce.infos)
381 |             }
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/Subtitle/KSSubtitle.swift:309:21: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/region-isolation\RegionIsolation]8;;\::]8;;https://docs.swift.org/compiler/documentation/diagnostics/sending-risks-data-race\SendingRisksDataRace]8;;\]
307 |             // 要用async,不能在更新UI的时候,修改Publishe变量
308 |             DispatchQueue.main.async { [weak self] in
309 |                 self?.parts = []
    |                     |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/region-isolation\RegionIsolation]8;;\::]8;;https://docs.swift.org/compiler/documentation/diagnostics/sending-risks-data-race\SendingRisksDataRace]8;;\]
    |                     `- note: 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against code in the current isolation context
310 |                 self?.selectedSubtitleInfo = nil
311 |             }
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/Subtitle/KSSubtitle.swift:369:42: warning: sending value of non-Sendable type 'any SearchSubtitleDataSouce' risks causing data races; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/region-isolation\RegionIsolation]8;;\::]8;;https://docs.swift.org/compiler/documentation/diagnostics/sending-risks-data-race\SendingRisksDataRace]8;;\]
367 |                 }
368 |                 Task { @MainActor in
369 |                     try? await dataSouce.searchSubtitle(query: query, languages: languages)
    |                                          |- warning: sending value of non-Sendable type 'any SearchSubtitleDataSouce' risks causing data races; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/region-isolation\RegionIsolation]8;;\::]8;;https://docs.swift.org/compiler/documentation/diagnostics/sending-risks-data-race\SendingRisksDataRace]8;;\]
    |                                          `- note: sending main actor-isolated value of non-Sendable type 'any SearchSubtitleDataSouce' to @concurrent instance method 'searchSubtitle(query:languages:)' risks causing races in between main actor-isolated and @concurrent uses
370 |                     subtitleInfos.append(contentsOf: dataSouce.infos)
371 |                 }
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/Subtitle/KSSubtitle.swift:379:38: warning: sending value of non-Sendable type 'any FileURLSubtitleDataSouce' risks causing data races; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/region-isolation\RegionIsolation]8;;\::]8;;https://docs.swift.org/compiler/documentation/diagnostics/sending-risks-data-race\SendingRisksDataRace]8;;\]
377 |         if let dataSouce = dataSouce as? FileURLSubtitleDataSouce {
378 |             Task { @MainActor in
379 |                 try? await dataSouce.searchSubtitle(fileURL: url)
    |                                      |- warning: sending value of non-Sendable type 'any FileURLSubtitleDataSouce' risks causing data races; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/region-isolation\RegionIsolation]8;;\::]8;;https://docs.swift.org/compiler/documentation/diagnostics/sending-risks-data-race\SendingRisksDataRace]8;;\]
    |                                      `- note: sending main actor-isolated value of non-Sendable type 'any FileURLSubtitleDataSouce' to @concurrent instance method 'searchSubtitle(fileURL:)' risks causing races in between main actor-isolated and @concurrent uses
380 |                 subtitleInfos.append(contentsOf: dataSouce.infos)
381 |             }
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/Subtitle/SubtitleDataSouce.swift:23:17: warning: passing closure as a 'sending' parameter risks causing data races between code in the current isolation context and concurrent execution of the closure; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/region-isolation\RegionIsolation]8;;\::]8;;https://docs.swift.org/compiler/documentation/diagnostics/sending-closure-risks-data-race\SendingClosureRisksDataRace]8;;\]
 21 |         didSet {
 22 |             if isEnabled, parts.isEmpty {
 23 |                 Task {
    |                 `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current isolation context and concurrent execution of the closure; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/region-isolation\RegionIsolation]8;;\::]8;;https://docs.swift.org/compiler/documentation/diagnostics/sending-closure-risks-data-race\SendingClosureRisksDataRace]8;;\]
 24 |                     try? await parse(url: downloadURL, userAgent: userAgent)
    |                                `- note: closure captures 'self' which is accessible to code in the current isolation context
 25 |                 }
 26 |             }
[#ActorIsolatedCall]: <https://docs.swift.org/compiler/documentation/diagnostics/actor-isolated-call>
[#MutableGlobalVariable]: <https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable>
[#RegionIsolation]: <https://docs.swift.org/compiler/documentation/diagnostics/region-isolation>
[#SendableClosureCaptures]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures>
[#SendingClosureRisksDataRace]: <https://docs.swift.org/compiler/documentation/diagnostics/sending-closure-risks-data-race>
[#SendingRisksDataRace]: <https://docs.swift.org/compiler/documentation/diagnostics/sending-risks-data-race>
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/Metal/MetalRender.swift:34:77: warning: reference to var 'kvImage_YpCbCrToARGBMatrix_ITU_R_601_4' is not concurrency-safe because it involves shared mutable state; this is an error in the Swift 6 language mode
 32 |     }()
 33 |
 34 |     private lazy var colorConversion601VideoRangeMatrixBuffer: MTLBuffer? = kvImage_YpCbCrToARGBMatrix_ITU_R_601_4.pointee.videoRange.buffer
    |                                                                             `- warning: reference to var 'kvImage_YpCbCrToARGBMatrix_ITU_R_601_4' is not concurrency-safe because it involves shared mutable state; this is an error in the Swift 6 language mode
 35 |
 36 |     private lazy var colorConversion601FullRangeMatrixBuffer: MTLBuffer? = kvImage_YpCbCrToARGBMatrix_ITU_R_601_4.pointee.buffer
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_Types.h:881:51: note: var declared here
 879 | /*! @const      kvImage_YpCbCrToARGBMatrix_ITU_R_601_4
 880 |  @abstract   Y'CbCr->RGB conversion matrix for ITU-Recommendation BT.601-4 */
 881 | extern VIMAGE_PF const vImage_YpCbCrToARGBMatrix *kvImage_YpCbCrToARGBMatrix_ITU_R_601_4 API_AVAILABLE(macos(10.10), ios(8.0), watchos(1.0), tvos(8.0));
     |                                                   `- note: var declared here
 882 |
 883 | /*! @const      kvImage_YpCbCrToARGBMatrix_ITU_R_709_2
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/Metal/MetalRender.swift:36:76: warning: reference to var 'kvImage_YpCbCrToARGBMatrix_ITU_R_601_4' is not concurrency-safe because it involves shared mutable state; this is an error in the Swift 6 language mode
 34 |     private lazy var colorConversion601VideoRangeMatrixBuffer: MTLBuffer? = kvImage_YpCbCrToARGBMatrix_ITU_R_601_4.pointee.videoRange.buffer
 35 |
 36 |     private lazy var colorConversion601FullRangeMatrixBuffer: MTLBuffer? = kvImage_YpCbCrToARGBMatrix_ITU_R_601_4.pointee.buffer
    |                                                                            `- warning: reference to var 'kvImage_YpCbCrToARGBMatrix_ITU_R_601_4' is not concurrency-safe because it involves shared mutable state; this is an error in the Swift 6 language mode
 37 |
 38 |     private lazy var colorConversion709VideoRangeMatrixBuffer: MTLBuffer? = kvImage_YpCbCrToARGBMatrix_ITU_R_709_2.pointee.videoRange.buffer
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_Types.h:881:51: note: var declared here
 879 | /*! @const      kvImage_YpCbCrToARGBMatrix_ITU_R_601_4
 880 |  @abstract   Y'CbCr->RGB conversion matrix for ITU-Recommendation BT.601-4 */
 881 | extern VIMAGE_PF const vImage_YpCbCrToARGBMatrix *kvImage_YpCbCrToARGBMatrix_ITU_R_601_4 API_AVAILABLE(macos(10.10), ios(8.0), watchos(1.0), tvos(8.0));
     |                                                   `- note: var declared here
 882 |
 883 | /*! @const      kvImage_YpCbCrToARGBMatrix_ITU_R_709_2
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/Metal/MetalRender.swift:38:77: warning: reference to var 'kvImage_YpCbCrToARGBMatrix_ITU_R_709_2' is not concurrency-safe because it involves shared mutable state; this is an error in the Swift 6 language mode
 36 |     private lazy var colorConversion601FullRangeMatrixBuffer: MTLBuffer? = kvImage_YpCbCrToARGBMatrix_ITU_R_601_4.pointee.buffer
 37 |
 38 |     private lazy var colorConversion709VideoRangeMatrixBuffer: MTLBuffer? = kvImage_YpCbCrToARGBMatrix_ITU_R_709_2.pointee.videoRange.buffer
    |                                                                             `- warning: reference to var 'kvImage_YpCbCrToARGBMatrix_ITU_R_709_2' is not concurrency-safe because it involves shared mutable state; this is an error in the Swift 6 language mode
 39 |
 40 |     private lazy var colorConversion709FullRangeMatrixBuffer: MTLBuffer? = kvImage_YpCbCrToARGBMatrix_ITU_R_709_2.pointee.buffer
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_Types.h:885:51: note: var declared here
 883 | /*! @const      kvImage_YpCbCrToARGBMatrix_ITU_R_709_2
 884 |  @abstract   Y'CbCr->RGB conversion matrix for ITU-Recommendation BT.709-2 */
 885 | extern VIMAGE_PF const vImage_YpCbCrToARGBMatrix *kvImage_YpCbCrToARGBMatrix_ITU_R_709_2 API_AVAILABLE(macos(10.10), ios(8.0), watchos(1.0), tvos(8.0));
     |                                                   `- note: var declared here
 886 | #endif
 887 |
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/Metal/MetalRender.swift:40:76: warning: reference to var 'kvImage_YpCbCrToARGBMatrix_ITU_R_709_2' is not concurrency-safe because it involves shared mutable state; this is an error in the Swift 6 language mode
 38 |     private lazy var colorConversion709VideoRangeMatrixBuffer: MTLBuffer? = kvImage_YpCbCrToARGBMatrix_ITU_R_709_2.pointee.videoRange.buffer
 39 |
 40 |     private lazy var colorConversion709FullRangeMatrixBuffer: MTLBuffer? = kvImage_YpCbCrToARGBMatrix_ITU_R_709_2.pointee.buffer
    |                                                                            `- warning: reference to var 'kvImage_YpCbCrToARGBMatrix_ITU_R_709_2' is not concurrency-safe because it involves shared mutable state; this is an error in the Swift 6 language mode
 41 |
 42 |     private lazy var colorConversionSMPTE240MVideoRangeMatrixBuffer: MTLBuffer? = kvImage_YpCbCrToARGBMatrix_SMPTE_240M_1995.videoRange.buffer
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_Types.h:885:51: note: var declared here
 883 | /*! @const      kvImage_YpCbCrToARGBMatrix_ITU_R_709_2
 884 |  @abstract   Y'CbCr->RGB conversion matrix for ITU-Recommendation BT.709-2 */
 885 | extern VIMAGE_PF const vImage_YpCbCrToARGBMatrix *kvImage_YpCbCrToARGBMatrix_ITU_R_709_2 API_AVAILABLE(macos(10.10), ios(8.0), watchos(1.0), tvos(8.0));
     |                                                   `- note: var declared here
 886 | #endif
 887 |
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/Metal/PixelBufferProtocol.swift:50:28: warning: 'CVBufferGetAttachment' was deprecated in macOS 12.0: renamed to 'CVBufferCopyAttachment(_:_:_:)' [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/deprecated-declaration\DeprecatedDeclaration]8;;\]
 48 |     public var aspectRatio: CGSize {
 49 |         get {
 50 |             if let ratio = CVBufferGetAttachment(self, kCVImageBufferPixelAspectRatioKey, nil)?.takeUnretainedValue() as? NSDictionary,
    |                            |- warning: 'CVBufferGetAttachment' was deprecated in macOS 12.0: renamed to 'CVBufferCopyAttachment(_:_:_:)' [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/deprecated-declaration\DeprecatedDeclaration]8;;\]
    |                            `- note: use 'CVBufferCopyAttachment(_:_:_:)' instead
 51 |                let horizontal = (ratio[kCVImageBufferPixelAspectRatioHorizontalSpacingKey] as? NSNumber)?.intValue,
 52 |                let vertical = (ratio[kCVImageBufferPixelAspectRatioVerticalSpacingKey] as? NSNumber)?.intValue,
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/Metal/PixelBufferProtocol.swift:80:9: warning: 'CVBufferGetAttachment' was deprecated in macOS 12.0: renamed to 'CVBufferCopyAttachment(_:_:_:)' [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/deprecated-declaration\DeprecatedDeclaration]8;;\]
 78 |
 79 |     public var isFullRangeVideo: Bool {
 80 |         CVBufferGetAttachment(self, kCMFormatDescriptionExtension_FullRangeVideo, nil)?.takeUnretainedValue() as? Bool ?? false
    |         |- warning: 'CVBufferGetAttachment' was deprecated in macOS 12.0: renamed to 'CVBufferCopyAttachment(_:_:_:)' [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/deprecated-declaration\DeprecatedDeclaration]8;;\]
    |         `- note: use 'CVBufferCopyAttachment(_:_:_:)' instead
 81 |     }
 82 |
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/Metal/PixelBufferProtocol.swift:84:9: warning: 'CVBufferGetAttachments' was deprecated in macOS 12.0: renamed to 'CVBufferCopyAttachments(_:_:)' [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/deprecated-declaration\DeprecatedDeclaration]8;;\]
 82 |
 83 |     public var attachmentsDic: CFDictionary? {
 84 |         CVBufferGetAttachments(self, .shouldPropagate)
    |         |- warning: 'CVBufferGetAttachments' was deprecated in macOS 12.0: renamed to 'CVBufferCopyAttachments(_:_:)' [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/deprecated-declaration\DeprecatedDeclaration]8;;\]
    |         `- note: use 'CVBufferCopyAttachments(_:_:)' instead
 85 |     }
 86 |
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/Metal/PixelBufferProtocol.swift:89:13: warning: 'CVBufferGetAttachment' was deprecated in macOS 12.0: renamed to 'CVBufferCopyAttachment(_:_:_:)' [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/deprecated-declaration\DeprecatedDeclaration]8;;\]
 87 |     public var yCbCrMatrix: CFString? {
 88 |         get {
 89 |             CVBufferGetAttachment(self, kCVImageBufferYCbCrMatrixKey, nil)?.takeUnretainedValue() as? NSString
    |             |- warning: 'CVBufferGetAttachment' was deprecated in macOS 12.0: renamed to 'CVBufferCopyAttachment(_:_:_:)' [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/deprecated-declaration\DeprecatedDeclaration]8;;\]
    |             `- note: use 'CVBufferCopyAttachment(_:_:_:)' instead
 90 |         }
 91 |         set {
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/Metal/PixelBufferProtocol.swift:100:13: warning: 'CVBufferGetAttachment' was deprecated in macOS 12.0: renamed to 'CVBufferCopyAttachment(_:_:_:)' [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/deprecated-declaration\DeprecatedDeclaration]8;;\]
 98 |     public var colorPrimaries: CFString? {
 99 |         get {
100 |             CVBufferGetAttachment(self, kCVImageBufferColorPrimariesKey, nil)?.takeUnretainedValue() as? NSString
    |             |- warning: 'CVBufferGetAttachment' was deprecated in macOS 12.0: renamed to 'CVBufferCopyAttachment(_:_:_:)' [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/deprecated-declaration\DeprecatedDeclaration]8;;\]
    |             `- note: use 'CVBufferCopyAttachment(_:_:_:)' instead
101 |         }
102 |         set {
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/Metal/PixelBufferProtocol.swift:111:13: warning: 'CVBufferGetAttachment' was deprecated in macOS 12.0: renamed to 'CVBufferCopyAttachment(_:_:_:)' [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/deprecated-declaration\DeprecatedDeclaration]8;;\]
109 |     public var transferFunction: CFString? {
110 |         get {
111 |             CVBufferGetAttachment(self, kCVImageBufferTransferFunctionKey, nil)?.takeUnretainedValue() as? NSString
    |             |- warning: 'CVBufferGetAttachment' was deprecated in macOS 12.0: renamed to 'CVBufferCopyAttachment(_:_:_:)' [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/deprecated-declaration\DeprecatedDeclaration]8;;\]
    |             `- note: use 'CVBufferCopyAttachment(_:_:_:)' instead
112 |         }
113 |         set {
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/Subtitle/KSParseProtocol.swift:20:16: warning: static property 'subtitleParses' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
 18 |
 19 | public extension KSOptions {
 20 |     static var subtitleParses: [KSParseProtocol] = [AssParse(), VTTParse(), SrtParse()]
    |                |- warning: static property 'subtitleParses' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable\MutableGlobalVariable]8;;\]
    |                |- note: convert 'subtitleParses' to a 'let' constant to make 'Sendable' shared state immutable
    |                |- note: add '@MainActor' to make static property 'subtitleParses' part of global actor 'MainActor'
    |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 21 | }
 22 |
/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/Subtitle/KSParseProtocol.swift:271:16: warning: value 'assColor' was defined but never used; consider replacing with boolean test [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
269 |         }
270 |         // 还不知道这个要设置到什么颜色上
271 |         if let assColor = self["SecondaryColour"] {
    |                `- warning: value 'assColor' was defined but never used; consider replacing with boolean test [#]8;;https://docs.swift.org/compiler/documentation/diagnostics/no-usage\NoUsage]8;;\]
272 | //            attributes[.backgroundColor] = UIColor(assColor: assColor)
273 |         }
[#DeprecatedDeclaration]: <https://docs.swift.org/compiler/documentation/diagnostics/deprecated-declaration>
[#MutableGlobalVariable]: <https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable>
[#NoUsage]: <https://docs.swift.org/compiler/documentation/diagnostics/no-usage>
Build complete.
{
  "default_localization" : "en",
  "dependencies" : [
    {
      "identity" : "ffmpegkit",
      "requirement" : {
        "range" : [
          {
            "lower_bound" : "6.1.3",
            "upper_bound" : "7.0.0"
          }
        ]
      },
      "type" : "sourceControl",
      "url" : "https://github.com/kingslay/FFmpegKit.git"
    }
  ],
  "manifest_display_name" : "KSPlayer",
  "name" : "KSPlayer",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "macos",
      "version" : "10.15"
    },
    {
      "name" : "maccatalyst",
      "version" : "13.0"
    },
    {
      "name" : "ios",
      "version" : "13.0"
    },
    {
      "name" : "tvos",
      "version" : "13.0"
    },
    {
      "name" : "visionos",
      "version" : "1.0"
    }
  ],
  "products" : [
    {
      "name" : "KSPlayer",
      "targets" : [
        "KSPlayer"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "KSPlayerTests",
      "module_type" : "SwiftTarget",
      "name" : "KSPlayerTests",
      "path" : "Tests/KSPlayerTests",
      "resources" : [
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/Tests/KSPlayerTests/Resources/test.m3u",
          "rule" : {
            "process" : {
            }
          }
        }
      ],
      "sources" : [
        "AudioTest.swift",
        "KSAVPlayerTest.swift",
        "KSMEPlayerTest.swift",
        "KSPlayerLayerTest.swift",
        "M3UParseTest.swift",
        "SubtitleTest.swift",
        "VideoPlayerControllerTest.swift",
        "VideoPlayerViewTest.swift"
      ],
      "target_dependencies" : [
        "KSPlayer"
      ],
      "type" : "test"
    },
    {
      "c99name" : "KSPlayer",
      "module_type" : "SwiftTarget",
      "name" : "KSPlayer",
      "path" : "Sources/KSPlayer",
      "product_dependencies" : [
        "FFmpegKit"
      ],
      "product_memberships" : [
        "KSPlayer"
      ],
      "resources" : [
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/Sources/KSPlayer/Metal/Shaders.metal",
          "rule" : {
            "process" : {
            }
          }
        }
      ],
      "sources" : [
        "AVPlayer/KSAVPlayer.swift",
        "AVPlayer/KSOptions.swift",
        "AVPlayer/KSPictureInPictureController.swift",
        "AVPlayer/KSPlayerLayer.swift",
        "AVPlayer/KSVideoPlayer.swift",
        "AVPlayer/MediaPlayerProtocol.swift",
        "AVPlayer/PlayerDefines.swift",
        "Audio/AudioPlayerView.swift",
        "Core/AppKitExtend.swift",
        "Core/PlayerToolBar.swift",
        "Core/PlayerView.swift",
        "Core/UIKitExtend.swift",
        "Core/UXKit.swift",
        "Core/Utility.swift",
        "MEPlayer/AVFFmpegExtension.swift",
        "MEPlayer/AVFoundationExtension.swift",
        "MEPlayer/AudioEnginePlayer.swift",
        "MEPlayer/AudioGraphPlayer.swift",
        "MEPlayer/AudioRendererPlayer.swift",
        "MEPlayer/AudioUnitPlayer.swift",
        "MEPlayer/CircularBuffer.swift",
        "MEPlayer/EmbedDataSouce.swift",
        "MEPlayer/FFmpegAssetTrack.swift",
        "MEPlayer/FFmpegDecode.swift",
        "MEPlayer/Filter.swift",
        "MEPlayer/KSMEPlayer.swift",
        "MEPlayer/MEPlayerItem.swift",
        "MEPlayer/MEPlayerItemTrack.swift",
        "MEPlayer/MetalPlayView.swift",
        "MEPlayer/Model.swift",
        "MEPlayer/Resample.swift",
        "MEPlayer/SubtitleDecode.swift",
        "MEPlayer/ThumbnailController.swift",
        "MEPlayer/VideoToolboxDecode.swift",
        "Metal/DisplayModel.swift",
        "Metal/MetalRender.swift",
        "Metal/MotionSensor.swift",
        "Metal/PixelBufferProtocol.swift",
        "Metal/Transforms.swift",
        "Subtitle/AudioRecognize.swift",
        "Subtitle/KSParseProtocol.swift",
        "Subtitle/KSSubtitle.swift",
        "Subtitle/SubtitleDataSouce.swift",
        "SwiftUI/AirPlayView.swift",
        "SwiftUI/KSVideoPlayerView.swift",
        "SwiftUI/KSVideoPlayerViewBuilder.swift",
        "SwiftUI/LiveTextImage.swift",
        "SwiftUI/Slider.swift",
        "Video/BrightnessVolume.swift",
        "Video/IOSVideoPlayerView.swift",
        "Video/KSMenu.swift",
        "Video/KSPlayerItem.swift",
        "Video/MacVideoPlayerView.swift",
        "Video/PlayerFullScreenViewController.swift",
        "Video/PlayerTransitionAnimator.swift",
        "Video/SeekView.swift",
        "Video/VideoPlayerView.swift"
      ],
      "target_dependencies" : [
        "DisplayCriteria"
      ],
      "type" : "library"
    },
    {
      "c99name" : "DisplayCriteria",
      "module_type" : "ClangTarget",
      "name" : "DisplayCriteria",
      "path" : "Sources/DisplayCriteria",
      "product_memberships" : [
        "KSPlayer"
      ],
      "sources" : [
        "DisplayCriteria.m"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.9"
}
Done.