mirror of
https://github.com/zoriya/react-native-video.git
synced 2026-08-16 02:56:22 +00:00
22 lines
538 B
Swift
22 lines
538 B
Swift
//
|
|
// DRMPlugin.swift
|
|
// ReactNativeVideoDrm
|
|
//
|
|
// Created by Krzysztof Moch on 07/08/2025.
|
|
//
|
|
|
|
import Foundation
|
|
import ReactNativeVideo
|
|
|
|
class DRMPlugin: ReactNativeVideoPlugin {
|
|
override func getDRMManager(source: any NativeVideoPlayerSource) -> (any DRMManagerSpec)? {
|
|
#if targetEnvironment(simulator)
|
|
// DRM is not supported on the simulator.
|
|
print("[ReactNativeVideoDRM] DRM is not supported on the simulator. Returning nil.")
|
|
return nil
|
|
#else
|
|
return DRMManager(source: source)
|
|
#endif
|
|
}
|
|
}
|