Initial commit: SimVision tvOS streaming app
Features: - VOD library with movie grouping and version detection - TV show library with season/episode organization - TMDB integration for trending shows and recently aired episodes - Recent releases section with TMDB release date sorting - Watch history tracking with continue watching - Playlist caching (12-hour TTL) for offline support - M3U playlist parsing with XStream API support - Authentication with credential storage Technical: - SwiftUI for tvOS - Actor-based services for thread safety - Persistent caching for playlists, TMDB data, and watch history - KSPlayer integration for video playback Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1
KSPlayer-main/.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*.h linguist-language=Swift
|
||||
13
KSPlayer-main/.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: kingslay # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
||||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||
35
KSPlayer-main/.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Platform (please complete the following information):**
|
||||
- Device: [e.g. iPhone6]
|
||||
- OS: [e.g. iOS8.1]
|
||||
- Version [e.g. 22]
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here. or Using FFmpeg to extract problematic video segments and upload them to GitHub.(ffmpeg -i http://xxx.com/123.mkv -map 0 -c copy -ss 00:00:50 -to 00:04:10 1.mkv)
|
||||
<!--
|
||||
If you want your raised issues to be addressed more promptly, you might consider making a donation.
|
||||
-->
|
||||
23
KSPlayer-main/.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: enhancement
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
<!--
|
||||
If you want your raised issues to be addressed more promptly, you might consider making a donation.
|
||||
-->
|
||||
32
KSPlayer-main/.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '*'
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
buidJob:
|
||||
name: buid
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@main
|
||||
with:
|
||||
submodules: recursive
|
||||
# https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md#xcode
|
||||
- name: Set up Xcode
|
||||
run: |
|
||||
sudo xcode-select -s /Applications/Xcode_16.1.app/Contents/Developer
|
||||
xcode-select -p
|
||||
xcodebuild -version
|
||||
- name: Build macOS
|
||||
run: swift build
|
||||
- name: Build iOS
|
||||
run: swift build --sdk `xcrun -sdk iphonesimulator -show-sdk-path` -Xswiftc -target -Xswiftc x86_64-apple-ios13.0-simulator
|
||||
- name: Build tvOS
|
||||
run: swift build --sdk `xcrun -sdk appletvsimulator -show-sdk-path` -Xswiftc -target -Xswiftc x86_64-apple-tvos13.0-simulator
|
||||
- name: Build xrOS
|
||||
run: swift build --sdk `xcrun -sdk xrsimulator -show-sdk-path` -Xswiftc -target -Xswiftc x86_64-apple-xros1.0-simulator
|
||||
- name: Test
|
||||
run: swift test -v
|
||||
7
KSPlayer-main/.gitignore
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
.DS_Store
|
||||
/.build
|
||||
/Packages
|
||||
xcuserdata
|
||||
.swiftpm
|
||||
Script
|
||||
FFmpegKit
|
||||
0
KSPlayer-main/.gitmodules
vendored
Normal file
4
KSPlayer-main/.spi.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
version: 1
|
||||
builder:
|
||||
configs:
|
||||
- documentation_targets: [KSPlayer]
|
||||
3
KSPlayer-main/.swiftformat
Normal file
@@ -0,0 +1,3 @@
|
||||
# 格式化规则
|
||||
--swiftversion 5.7
|
||||
--ifdef noindent
|
||||
19
KSPlayer-main/Demo/Demo.xcworkspace/contents.xcworkspacedata
generated
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "group:SwiftUI/Player.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:demo-iOS/demo-iOS.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:demo-macOS/demo-macOS.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:demo-tvOS/demo-tvOS.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:Pods/Pods.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded</key>
|
||||
<true/>
|
||||
<key>PreviewsEnabled</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
||||
30
KSPlayer-main/Demo/Podfile
Normal file
@@ -0,0 +1,30 @@
|
||||
use_frameworks! :linkage => :static
|
||||
workspace 'Demo.xcworkspace'
|
||||
install! 'cocoapods', :generate_multiple_pod_projects => true
|
||||
def common
|
||||
pod 'KSPlayer', :path => '../', :testspecs => ['Tests']
|
||||
pod 'DisplayCriteria', :path => '../'
|
||||
pod 'Libass', :path => '../FFmpegKit'
|
||||
pod 'OpenSSL', :path => '../FFmpegKit'
|
||||
pod 'FFmpegKit', :path => '../FFmpegKit'
|
||||
# pod 'Libass',:git => 'https://github.com/kingslay/FFmpegKit.git', :branch => 'main'
|
||||
# pod 'FFmpegKit',:git => 'https://github.com/kingslay/FFmpegKit.git', :branch => 'main'
|
||||
# pod 'OpenSSL',:git => 'https://github.com/kingslay/FFmpegKit.git', :branch => 'main'
|
||||
end
|
||||
target 'demo-iOS' do
|
||||
project 'demo-iOS/demo-iOS.xcodeproj'
|
||||
platform :ios, 13.0
|
||||
common
|
||||
end
|
||||
|
||||
target 'demo-macOS' do
|
||||
project 'demo-macOS/demo-macOS.xcodeproj'
|
||||
platform :osx, 10.15
|
||||
common
|
||||
end
|
||||
|
||||
target 'demo-tvOS' do
|
||||
project 'demo-tvOS/demo-tvOS.xcodeproj'
|
||||
platform :tvos, 13.0
|
||||
common
|
||||
end
|
||||
71
KSPlayer-main/Demo/Podfile.lock
Normal file
@@ -0,0 +1,71 @@
|
||||
PODS:
|
||||
- DisplayCriteria (1.1.0)
|
||||
- FFmpegKit (6.1.0):
|
||||
- FFmpegKit/FFmpegKit (= 6.1.0)
|
||||
- FFmpegKit/FFmpegKit (6.1.0):
|
||||
- Libass
|
||||
- KSPlayer (1.1.0):
|
||||
- KSPlayer/Audio (= 1.1.0)
|
||||
- KSPlayer/AVPlayer (= 1.1.0)
|
||||
- KSPlayer/Core (= 1.1.0)
|
||||
- KSPlayer/MEPlayer (= 1.1.0)
|
||||
- KSPlayer/Metal (= 1.1.0)
|
||||
- KSPlayer/Subtitle (= 1.1.0)
|
||||
- KSPlayer/SwiftUI (= 1.1.0)
|
||||
- KSPlayer/Video (= 1.1.0)
|
||||
- KSPlayer/Audio (1.1.0):
|
||||
- KSPlayer/Core
|
||||
- KSPlayer/AVPlayer (1.1.0):
|
||||
- DisplayCriteria
|
||||
- KSPlayer/Core (1.1.0):
|
||||
- KSPlayer/AVPlayer
|
||||
- KSPlayer/MEPlayer (1.1.0):
|
||||
- FFmpegKit
|
||||
- KSPlayer/AVPlayer
|
||||
- KSPlayer/Metal
|
||||
- KSPlayer/Subtitle
|
||||
- KSPlayer/Metal (1.1.0)
|
||||
- KSPlayer/Subtitle (1.1.0)
|
||||
- KSPlayer/SwiftUI (1.1.0):
|
||||
- KSPlayer/AVPlayer
|
||||
- KSPlayer/Tests (1.1.0)
|
||||
- KSPlayer/Video (1.1.0):
|
||||
- KSPlayer/Core
|
||||
- KSPlayer/Subtitle
|
||||
- Libass (0.17.1):
|
||||
- Libass/Libass (= 0.17.1)
|
||||
- Libass/Libass (0.17.1)
|
||||
- OpenSSL (3.1.4):
|
||||
- OpenSSL/OpenSSL (= 3.1.4)
|
||||
- OpenSSL/OpenSSL (3.1.4)
|
||||
|
||||
DEPENDENCIES:
|
||||
- DisplayCriteria (from `../`)
|
||||
- FFmpegKit (from `../FFmpegKit`)
|
||||
- KSPlayer (from `../`)
|
||||
- KSPlayer/Tests (from `../`)
|
||||
- Libass (from `../FFmpegKit`)
|
||||
- OpenSSL (from `../FFmpegKit`)
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
DisplayCriteria:
|
||||
:path: "../"
|
||||
FFmpegKit:
|
||||
:path: "../FFmpegKit"
|
||||
KSPlayer:
|
||||
:path: "../"
|
||||
Libass:
|
||||
:path: "../FFmpegKit"
|
||||
OpenSSL:
|
||||
:path: "../FFmpegKit"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
DisplayCriteria: bb0a90faf14b30848bc50ac0516340ce50164187
|
||||
FFmpegKit: 26f80ba643f77e525bc6505a98839a56d91aae4f
|
||||
KSPlayer: cd8c2427873dddcd3a577f8bb230885c06e5ac2e
|
||||
Libass: e88af2324e1217e3a4c8bdc675f6f23a9dfc7677
|
||||
OpenSSL: 9a1c748444fb6c045b146e5a55173645e13171a3
|
||||
|
||||
PODFILE CHECKSUM: f67210bf3678663628f2c9a2dba2e6ddd88d212d
|
||||
|
||||
COCOAPODS: 1.15.2
|
||||
577
KSPlayer-main/Demo/SwiftUI/Player-Info.plist
Normal file
@@ -0,0 +1,577 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CADisableMinimumFrameDurationOnPhone</key>
|
||||
<true/>
|
||||
<key>CFBundleDocumentTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>mkv</string>
|
||||
<string>mka</string>
|
||||
<string>mk3d</string>
|
||||
<string>mks</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>doc_mkv.icns</string>
|
||||
<key>CFBundleTypeIconSystemGenerated</key>
|
||||
<integer>1</integer>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Matroska video</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Default</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>mka</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>doc_mkv.icns</string>
|
||||
<key>CFBundleTypeIconSystemGenerated</key>
|
||||
<integer>1</integer>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Matroska audio</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Default</string>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string></string>
|
||||
</array>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>rm</string>
|
||||
<string>rmvb</string>
|
||||
<string>ra</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>doc_rm.icns</string>
|
||||
<key>CFBundleTypeIconSystemGenerated</key>
|
||||
<integer>1</integer>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Real Media file</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Default</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>asf</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>doc_asf.icns</string>
|
||||
<key>CFBundleTypeIconSystemGenerated</key>
|
||||
<integer>1</integer>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Advanced Systems Format (ASF) media</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Default</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>aac</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>doc_aac.icns</string>
|
||||
<key>CFBundleTypeIconSystemGenerated</key>
|
||||
<integer>1</integer>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Advanced Audio Coding (AAC) media</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Default</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>flv</string>
|
||||
<string>f4v</string>
|
||||
<string>f4p</string>
|
||||
<string>f4a</string>
|
||||
<string>f4b</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>doc_flv.icns</string>
|
||||
<key>CFBundleTypeIconSystemGenerated</key>
|
||||
<integer>1</integer>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Flash Video file</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Default</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>webm</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>doc_webm.icns</string>
|
||||
<key>CFBundleTypeIconSystemGenerated</key>
|
||||
<integer>1</integer>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>WebM media</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Default</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>3gp</string>
|
||||
<string>3g2</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>doc_3gp.icns</string>
|
||||
<key>CFBundleTypeIconSystemGenerated</key>
|
||||
<integer>1</integer>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>3GPP media</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Default</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>mp3</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>doc_mp3.icns</string>
|
||||
<key>CFBundleTypeIconSystemGenerated</key>
|
||||
<integer>1</integer>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>MPEG Layer III (MP3) audio</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Default</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>ogg</string>
|
||||
<string>oga</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>doc_ogg.icns</string>
|
||||
<key>CFBundleTypeIconSystemGenerated</key>
|
||||
<integer>1</integer>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>OGG audio</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Default</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>ogm</string>
|
||||
<string>ogv</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>doc_ogg.icns</string>
|
||||
<key>CFBundleTypeIconSystemGenerated</key>
|
||||
<integer>1</integer>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>OGG video</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Default</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>ts</string>
|
||||
<string>mts</string>
|
||||
<string>m2ts</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>doc_ts.icns</string>
|
||||
<key>CFBundleTypeIconSystemGenerated</key>
|
||||
<integer>1</integer>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>MPEG transport stream (TS) media</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Default</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>avi</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>doc_avi.icns</string>
|
||||
<key>CFBundleTypeIconSystemGenerated</key>
|
||||
<integer>1</integer>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>AVI media</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Default</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>wav</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>doc_wav.icns</string>
|
||||
<key>CFBundleTypeIconSystemGenerated</key>
|
||||
<integer>1</integer>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Waveform Audio File (WAV) audio</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Default</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>m4a</string>
|
||||
<string>m4b</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>doc_m4a.icns</string>
|
||||
<key>CFBundleTypeIconSystemGenerated</key>
|
||||
<integer>1</integer>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>MPEG-4 audio</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Default</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>wmv</string>
|
||||
<string>wma</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>doc_wmv.icns</string>
|
||||
<key>CFBundleTypeIconSystemGenerated</key>
|
||||
<integer>1</integer>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Windows Media Video/Audio (WMV/WMA) media</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Default</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>qt</string>
|
||||
<string>mov</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>doc_qt.icns</string>
|
||||
<key>CFBundleTypeIconSystemGenerated</key>
|
||||
<integer>1</integer>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>QuickTime media</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Default</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>flac</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>doc_flac.icns</string>
|
||||
<key>CFBundleTypeIconSystemGenerated</key>
|
||||
<integer>1</integer>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Free Lossless Audio Codec (FLAC) audio</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Default</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>mpeg</string>
|
||||
<string>mpg</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>doc_mp4.icns</string>
|
||||
<key>CFBundleTypeIconSystemGenerated</key>
|
||||
<integer>1</integer>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>MPEG video</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Default</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>mp4</string>
|
||||
<string>m4v</string>
|
||||
<string>m4b</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>doc_mp4.icns</string>
|
||||
<key>CFBundleTypeIconSystemGenerated</key>
|
||||
<integer>1</integer>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>MPEG-4 video</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Default</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>dat</string>
|
||||
<string>divx</string>
|
||||
<string>vob</string>
|
||||
<string>amv</string>
|
||||
<string>mxf</string>
|
||||
<string>mcf</string>
|
||||
<string>swf</string>
|
||||
<string>xvid</string>
|
||||
<string>yuv</string>
|
||||
<string>dv</string>
|
||||
<string>wv</string>
|
||||
<string>*</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>doc_other_v.icns</string>
|
||||
<key>CFBundleTypeIconSystemGenerated</key>
|
||||
<integer>1</integer>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Video file</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Default</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>aa3</string>
|
||||
<string>ac3</string>
|
||||
<string>acm</string>
|
||||
<string>aif</string>
|
||||
<string>aiff</string>
|
||||
<string>ape</string>
|
||||
<string>caf</string>
|
||||
<string>mid</string>
|
||||
<string>midi</string>
|
||||
<string>pcm</string>
|
||||
<string>vox</string>
|
||||
<string>tta</string>
|
||||
<string>tak</string>
|
||||
<string>opus</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>doc_other_a.icns</string>
|
||||
<key>CFBundleTypeIconSystemGenerated</key>
|
||||
<integer>1</integer>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Audio file</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Default</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>m3u8</string>
|
||||
<string>m3u</string>
|
||||
<string>pls</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>doc_list.icns</string>
|
||||
<key>CFBundleTypeIconSystemGenerated</key>
|
||||
<integer>1</integer>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Playlist</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Default</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleURLTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Editor</string>
|
||||
<key>CFBundleURLName</key>
|
||||
<string>Tracy wrapper</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>tracy</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>ITSAppUsesNonExemptEncryption</key>
|
||||
<false/>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
<true/>
|
||||
<key>NSExceptionDomains</key>
|
||||
<dict>
|
||||
<key>tu.rrsub.com</key>
|
||||
<dict>
|
||||
<key>NSIncludesSubdomains</key>
|
||||
<true/>
|
||||
<key>NSThirdPartyExceptionAllowsInsecureHTTPLoads</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>NSServices</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>NSMenuItem</key>
|
||||
<dict>
|
||||
<key>default</key>
|
||||
<string>Player: Open URL</string>
|
||||
</dict>
|
||||
<key>NSMessage</key>
|
||||
<string>droppedText</string>
|
||||
<key>NSSendTypes</key>
|
||||
<array>
|
||||
<string>NSStringPboardType</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>UIApplicationSceneManifest</key>
|
||||
<dict>
|
||||
<key>UIApplicationSupportsMultipleScenes</key>
|
||||
<false/>
|
||||
<key>UISceneConfigurations</key>
|
||||
<dict/>
|
||||
</dict>
|
||||
<key>UIBackgroundModes</key>
|
||||
<array>
|
||||
<string>audio</string>
|
||||
<string>fetch</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
34
KSPlayer-main/Demo/SwiftUI/Player.entitlements
Normal file
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>aps-environment</key>
|
||||
<string>development</string>
|
||||
<key>com.apple.developer.aps-environment</key>
|
||||
<string>development</string>
|
||||
<key>com.apple.developer.icloud-container-identifiers</key>
|
||||
<array/>
|
||||
<key>com.apple.developer.icloud-services</key>
|
||||
<array/>
|
||||
<key>com.apple.security.app-sandbox</key>
|
||||
<true/>
|
||||
<key>com.apple.security.assets.movies.read-write</key>
|
||||
<true/>
|
||||
<key>com.apple.security.assets.music.read-only</key>
|
||||
<true/>
|
||||
<key>com.apple.security.assets.pictures.read-only</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.disable-library-validation</key>
|
||||
<true/>
|
||||
<key>com.apple.security.files.downloads.read-only</key>
|
||||
<true/>
|
||||
<key>com.apple.security.files.user-selected.read-only</key>
|
||||
<true/>
|
||||
<key>com.apple.security.network.client</key>
|
||||
<true/>
|
||||
<key>inter-app-audio</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
459
KSPlayer-main/Demo/SwiftUI/Player.xcodeproj/project.pbxproj
Normal file
@@ -0,0 +1,459 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 54;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
AC43F6412A5172830026ECF2 /* FavoriteView.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC43F6402A5172830026ECF2 /* FavoriteView.swift */; };
|
||||
AC43F6442A51916F0026ECF2 /* Model.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = AC43F6422A51916F0026ECF2 /* Model.xcdatamodeld */; };
|
||||
AC43F6662A519D400026ECF2 /* Persistence.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC43F6652A519D400026ECF2 /* Persistence.swift */; };
|
||||
AC43F6682A52E86B0026ECF2 /* FilesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC43F6672A52E86B0026ECF2 /* FilesView.swift */; };
|
||||
AC44E0FC29290CBC00617BD3 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC44E0FA29290CBC00617BD3 /* ContentView.swift */; };
|
||||
AC44E0FD29290CF800617BD3 /* HomeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC44E0F929290CBB00617BD3 /* HomeView.swift */; };
|
||||
AC77DFC326402329001351AE /* TracyApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC77DFB026402327001351AE /* TracyApp.swift */; };
|
||||
AC77DFC526402329001351AE /* URLImportView.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC77DFB126402327001351AE /* URLImportView.swift */; };
|
||||
AC77DFC726402329001351AE /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = AC77DFB226402329001351AE /* Assets.xcassets */; };
|
||||
ACB965472A42EDCD00378A4C /* SettingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ACB965462A42EDCD00378A4C /* SettingView.swift */; };
|
||||
ACD2F772275F735C0006D16F /* KSPlayer in Frameworks */ = {isa = PBXBuildFile; productRef = ACD2F771275F735C0006D16F /* KSPlayer */; };
|
||||
ACD786492A6A8648004A0220 /* Defaults.swift in Sources */ = {isa = PBXBuildFile; fileRef = ACD786482A6A8648004A0220 /* Defaults.swift */; };
|
||||
ACEA9FEB298BFC8800FBA74B /* MovieModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ACEA9FEA298BFC8800FBA74B /* MovieModel.swift */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
AC43F6402A5172830026ECF2 /* FavoriteView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FavoriteView.swift; sourceTree = "<group>"; };
|
||||
AC43F6432A51916F0026ECF2 /* Model.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Model.xcdatamodel; sourceTree = "<group>"; };
|
||||
AC43F6652A519D400026ECF2 /* Persistence.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Persistence.swift; sourceTree = "<group>"; };
|
||||
AC43F6672A52E86B0026ECF2 /* FilesView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FilesView.swift; sourceTree = "<group>"; };
|
||||
AC44E0F929290CBB00617BD3 /* HomeView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HomeView.swift; sourceTree = "<group>"; };
|
||||
AC44E0FA29290CBC00617BD3 /* ContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
|
||||
AC77DFB026402327001351AE /* TracyApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TracyApp.swift; sourceTree = "<group>"; };
|
||||
AC77DFB126402327001351AE /* URLImportView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URLImportView.swift; sourceTree = "<group>"; };
|
||||
AC77DFB226402329001351AE /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
AC77DFB726402329001351AE /* Player.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Player.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
ACADA07528EDC067001B76D1 /* Player.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Player.entitlements; sourceTree = "<group>"; };
|
||||
ACB965462A42EDCD00378A4C /* SettingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingView.swift; sourceTree = "<group>"; };
|
||||
ACD2F747275F6E860006D16F /* KSPlayer */ = {isa = PBXFileReference; lastKnownFileType = folder; name = KSPlayer; path = ../..; sourceTree = "<group>"; };
|
||||
ACD786482A6A8648004A0220 /* Defaults.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Defaults.swift; sourceTree = "<group>"; };
|
||||
ACE3619328EB689F00F234EB /* Player-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Player-Info.plist"; sourceTree = "<group>"; };
|
||||
ACEA9FEA298BFC8800FBA74B /* MovieModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MovieModel.swift; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
AC77DFB426402329001351AE /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
ACD2F772275F735C0006D16F /* KSPlayer in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
AC77DFAA26402327001351AE = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
ACADA07528EDC067001B76D1 /* Player.entitlements */,
|
||||
ACE3619328EB689F00F234EB /* Player-Info.plist */,
|
||||
ACD2F743275F6D7A0006D16F /* Packages */,
|
||||
AC77DFAF26402327001351AE /* Shared */,
|
||||
AC77DFB826402329001351AE /* Products */,
|
||||
ACD2F74C275F6EE60006D16F /* Frameworks */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
AC77DFAF26402327001351AE /* Shared */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
ACEA9FEA298BFC8800FBA74B /* MovieModel.swift */,
|
||||
AC44E0F929290CBB00617BD3 /* HomeView.swift */,
|
||||
AC44E0FA29290CBC00617BD3 /* ContentView.swift */,
|
||||
AC43F6402A5172830026ECF2 /* FavoriteView.swift */,
|
||||
AC43F6672A52E86B0026ECF2 /* FilesView.swift */,
|
||||
AC77DFB026402327001351AE /* TracyApp.swift */,
|
||||
AC77DFB126402327001351AE /* URLImportView.swift */,
|
||||
ACB965462A42EDCD00378A4C /* SettingView.swift */,
|
||||
ACD786482A6A8648004A0220 /* Defaults.swift */,
|
||||
AC43F6652A519D400026ECF2 /* Persistence.swift */,
|
||||
AC77DFB226402329001351AE /* Assets.xcassets */,
|
||||
AC43F6422A51916F0026ECF2 /* Model.xcdatamodeld */,
|
||||
);
|
||||
path = Shared;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
AC77DFB826402329001351AE /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
AC77DFB726402329001351AE /* Player.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
ACD2F743275F6D7A0006D16F /* Packages */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
ACD2F747275F6E860006D16F /* KSPlayer */,
|
||||
);
|
||||
name = Packages;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
ACD2F74C275F6EE60006D16F /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
AC77DFB626402329001351AE /* Player */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = AC77DFCB26402329001351AE /* Build configuration list for PBXNativeTarget "Player" */;
|
||||
buildPhases = (
|
||||
AC77DFB326402329001351AE /* Sources */,
|
||||
AC77DFB426402329001351AE /* Frameworks */,
|
||||
AC77DFB526402329001351AE /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = Player;
|
||||
packageProductDependencies = (
|
||||
ACD2F771275F735C0006D16F /* KSPlayer */,
|
||||
);
|
||||
productName = "demo-SPM (iOS)";
|
||||
productReference = AC77DFB726402329001351AE /* Player.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
AC77DFAB26402327001351AE /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
BuildIndependentTargetsInParallel = YES;
|
||||
LastSwiftUpdateCheck = 1310;
|
||||
LastUpgradeCheck = 1500;
|
||||
TargetAttributes = {
|
||||
AC77DFB626402329001351AE = {
|
||||
CreatedOnToolsVersion = 12.4;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = AC77DFAE26402327001351AE /* Build configuration list for PBXProject "Player" */;
|
||||
compatibilityVersion = "Xcode 9.3";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = AC77DFAA26402327001351AE;
|
||||
productRefGroup = AC77DFB826402329001351AE /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
AC77DFB626402329001351AE /* Player */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
AC77DFB526402329001351AE /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
AC77DFC726402329001351AE /* Assets.xcassets in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
AC77DFB326402329001351AE /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
AC43F6662A519D400026ECF2 /* Persistence.swift in Sources */,
|
||||
AC77DFC526402329001351AE /* URLImportView.swift in Sources */,
|
||||
AC43F6412A5172830026ECF2 /* FavoriteView.swift in Sources */,
|
||||
AC44E0FD29290CF800617BD3 /* HomeView.swift in Sources */,
|
||||
AC43F6682A52E86B0026ECF2 /* FilesView.swift in Sources */,
|
||||
AC43F6442A51916F0026ECF2 /* Model.xcdatamodeld in Sources */,
|
||||
ACEA9FEB298BFC8800FBA74B /* MovieModel.swift in Sources */,
|
||||
ACB965472A42EDCD00378A4C /* SettingView.swift in Sources */,
|
||||
AC44E0FC29290CBC00617BD3 /* ContentView.swift in Sources */,
|
||||
AC77DFC326402329001351AE /* TracyApp.swift in Sources */,
|
||||
ACD786492A6A8648004A0220 /* Defaults.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
AC77DFC926402329001351AE /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.video";
|
||||
INFOPLIST_KEY_LSSupportsOpeningDocumentsInPlace = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
|
||||
MACOSX_DEPLOYMENT_TARGET = 13.0;
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
MTL_FAST_MATH = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
PRODUCT_NAME = Player;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
TVOS_DEPLOYMENT_TARGET = 16.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
AC77DFCA26402329001351AE /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.video";
|
||||
INFOPLIST_KEY_LSSupportsOpeningDocumentsInPlace = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
|
||||
MACOSX_DEPLOYMENT_TARGET = 13.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
MTL_FAST_MATH = YES;
|
||||
PRODUCT_NAME = Player;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
TVOS_DEPLOYMENT_TARGET = 16.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
AC77DFCC26402329001351AE /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
"ASSETCATALOG_COMPILER_APPICON_NAME[sdk=appletvos*]" = AppIconTVOS;
|
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = Player.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 20102;
|
||||
DEVELOPMENT_TEAM = 3RVHT92X9D;
|
||||
ENABLE_HARDENED_RUNTIME = YES;
|
||||
"ENABLE_HARDENED_RUNTIME[sdk=macosx*]" = YES;
|
||||
ENABLE_PREVIEWS = YES;
|
||||
INFOPLIST_FILE = "Player-Info.plist";
|
||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.video";
|
||||
INFOPLIST_KEY_LSSupportsOpeningDocumentsInPlace = YES;
|
||||
INFOPLIST_KEY_UILaunchStoryboardName = " ";
|
||||
INFOPLIST_KEY_UIRequiresFullScreen = YES;
|
||||
INFOPLIST_KEY_UIStatusBarStyle = UIStatusBarStyleDarkContent;
|
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 2.1.2;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.kintan.player;
|
||||
PRODUCT_NAME = Player;
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
"PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "";
|
||||
SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx xros xrsimulator";
|
||||
SUPPORTS_MACCATALYST = YES;
|
||||
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
|
||||
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2,3,6,7";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
AC77DFCD26402329001351AE /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
"ASSETCATALOG_COMPILER_APPICON_NAME[sdk=appletvos*]" = AppIconTVOS;
|
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = Player.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 20102;
|
||||
DEVELOPMENT_TEAM = 3RVHT92X9D;
|
||||
ENABLE_HARDENED_RUNTIME = YES;
|
||||
"ENABLE_HARDENED_RUNTIME[sdk=macosx*]" = YES;
|
||||
ENABLE_PREVIEWS = YES;
|
||||
INFOPLIST_FILE = "Player-Info.plist";
|
||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.video";
|
||||
INFOPLIST_KEY_LSSupportsOpeningDocumentsInPlace = YES;
|
||||
INFOPLIST_KEY_UILaunchStoryboardName = " ";
|
||||
INFOPLIST_KEY_UIRequiresFullScreen = YES;
|
||||
INFOPLIST_KEY_UIStatusBarStyle = UIStatusBarStyleDarkContent;
|
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 2.1.2;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.kintan.player;
|
||||
PRODUCT_NAME = Player;
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
"PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "";
|
||||
SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx xros xrsimulator";
|
||||
SUPPORTS_MACCATALYST = YES;
|
||||
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
|
||||
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2,3,6,7";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
AC77DFAE26402327001351AE /* Build configuration list for PBXProject "Player" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
AC77DFC926402329001351AE /* Debug */,
|
||||
AC77DFCA26402329001351AE /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
AC77DFCB26402329001351AE /* Build configuration list for PBXNativeTarget "Player" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
AC77DFCC26402329001351AE /* Debug */,
|
||||
AC77DFCD26402329001351AE /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
|
||||
/* Begin XCSwiftPackageProductDependency section */
|
||||
ACD2F771275F735C0006D16F /* KSPlayer */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
productName = KSPlayer;
|
||||
};
|
||||
/* End XCSwiftPackageProductDependency section */
|
||||
|
||||
/* Begin XCVersionGroup section */
|
||||
AC43F6422A51916F0026ECF2 /* Model.xcdatamodeld */ = {
|
||||
isa = XCVersionGroup;
|
||||
children = (
|
||||
AC43F6432A51916F0026ECF2 /* Model.xcdatamodel */,
|
||||
);
|
||||
currentVersion = AC43F6432A51916F0026ECF2 /* Model.xcdatamodel */;
|
||||
path = Model.xcdatamodeld;
|
||||
sourceTree = "<group>";
|
||||
versionGroupType = wrapper.xcdatamodel;
|
||||
};
|
||||
/* End XCVersionGroup section */
|
||||
};
|
||||
rootObject = AC77DFAB26402327001351AE /* Project object */;
|
||||
}
|
||||
7
KSPlayer-main/Demo/SwiftUI/Player.xcodeproj/project.xcworkspace/contents.xcworkspacedata
generated
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,77 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1500"
|
||||
version = "1.7">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "AC77DFB626402329001351AE"
|
||||
BuildableName = "Player.app"
|
||||
BlueprintName = "Player"
|
||||
ReferencedContainer = "container:Player.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
shouldAutocreateTestPlan = "YES">
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "AC77DFB626402329001351AE"
|
||||
BuildableName = "Player.app"
|
||||
BlueprintName = "Player"
|
||||
ReferencedContainer = "container:Player.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "AC77DFB626402329001351AE"
|
||||
BuildableName = "Player.app"
|
||||
BlueprintName = "Player"
|
||||
ReferencedContainer = "container:Player.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"colors" : [
|
||||
{
|
||||
"color" : {
|
||||
"color-space" : "srgb",
|
||||
"components" : {
|
||||
"alpha" : "1.000",
|
||||
"blue" : "255",
|
||||
"green" : "255",
|
||||
"red" : "255"
|
||||
}
|
||||
},
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "app-icon-1024.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"scale" : "1x",
|
||||
"size" : "16x16"
|
||||
},
|
||||
{
|
||||
"filename" : "app-icon-32.png",
|
||||
"idiom" : "mac",
|
||||
"scale" : "2x",
|
||||
"size" : "16x16"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"scale" : "1x",
|
||||
"size" : "32x32"
|
||||
},
|
||||
{
|
||||
"filename" : "app-icon-64.png",
|
||||
"idiom" : "mac",
|
||||
"scale" : "2x",
|
||||
"size" : "32x32"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"scale" : "1x",
|
||||
"size" : "128x128"
|
||||
},
|
||||
{
|
||||
"filename" : "app-icon-256.png",
|
||||
"idiom" : "mac",
|
||||
"scale" : "2x",
|
||||
"size" : "128x128"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"scale" : "1x",
|
||||
"size" : "256x256"
|
||||
},
|
||||
{
|
||||
"filename" : "app-icon-512.png",
|
||||
"idiom" : "mac",
|
||||
"scale" : "2x",
|
||||
"size" : "256x256"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"scale" : "1x",
|
||||
"size" : "512x512"
|
||||
},
|
||||
{
|
||||
"filename" : "app-icon-1024 1.png",
|
||||
"idiom" : "mac",
|
||||
"scale" : "2x",
|
||||
"size" : "512x512"
|
||||
},
|
||||
{
|
||||
"filename" : "app-icon-1024 2.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "watchos",
|
||||
"size" : "1024x1024"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 409 B |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 644 B |
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "app-icon-back-1280x768.png",
|
||||
"idiom" : "tv"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 13 KiB |
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
},
|
||||
"layers" : [
|
||||
{
|
||||
"filename" : "Front.imagestacklayer"
|
||||
},
|
||||
{
|
||||
"filename" : "Middle.imagestacklayer"
|
||||
},
|
||||
{
|
||||
"filename" : "Back.imagestacklayer"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "app-icon-front-1280x768.png",
|
||||
"idiom" : "tv"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 8.5 KiB |
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "tv"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "app-icon-back-400.png",
|
||||
"idiom" : "tv",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "app-icon-back-400@2x.png",
|
||||
"idiom" : "tv",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 6.6 KiB |
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
},
|
||||
"layers" : [
|
||||
{
|
||||
"filename" : "Front.imagestacklayer"
|
||||
},
|
||||
{
|
||||
"filename" : "Middle.imagestacklayer"
|
||||
},
|
||||
{
|
||||
"filename" : "Back.imagestacklayer"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "app-icon-front-400.png",
|
||||
"idiom" : "tv",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "app-icon-front-400@2x.png",
|
||||
"idiom" : "tv",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "tv",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "tv",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"assets" : [
|
||||
{
|
||||
"filename" : "App Icon - App Store.imagestack",
|
||||
"idiom" : "tv",
|
||||
"role" : "primary-app-icon",
|
||||
"size" : "1280x768"
|
||||
},
|
||||
{
|
||||
"filename" : "App Icon.imagestack",
|
||||
"idiom" : "tv",
|
||||
"role" : "primary-app-icon",
|
||||
"size" : "400x240"
|
||||
},
|
||||
{
|
||||
"filename" : "Top Shelf Image Wide.imageset",
|
||||
"idiom" : "tv",
|
||||
"role" : "top-shelf-image-wide",
|
||||
"size" : "2320x720"
|
||||
},
|
||||
{
|
||||
"filename" : "Top Shelf Image.imageset",
|
||||
"idiom" : "tv",
|
||||
"role" : "top-shelf-image",
|
||||
"size" : "1920x720"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 101 KiB |
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "2320.png",
|
||||
"idiom" : "tv",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "4640.png",
|
||||
"idiom" : "tv",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "tv",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "tv",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
166
KSPlayer-main/Demo/SwiftUI/Shared/ContentView.swift
Normal file
@@ -0,0 +1,166 @@
|
||||
import KSPlayer
|
||||
import SwiftUI
|
||||
|
||||
struct ContentView: View {
|
||||
#if !os(tvOS)
|
||||
@Environment(\.openWindow) private var openWindow
|
||||
#endif
|
||||
@EnvironmentObject
|
||||
private var appModel: APPModel
|
||||
private var initialView: some View {
|
||||
#if os(macOS)
|
||||
NavigationSplitView {
|
||||
List(selection: $appModel.tabSelected) {
|
||||
link(to: .Home)
|
||||
link(to: .Favorite)
|
||||
link(to: .Files)
|
||||
}
|
||||
} detail: {
|
||||
appModel.tabSelected.destination(appModel: appModel)
|
||||
}
|
||||
#else
|
||||
TabView(selection: $appModel.tabSelected) {
|
||||
tab(to: .Home)
|
||||
tab(to: .Favorite)
|
||||
tab(to: .Files)
|
||||
tab(to: .Setting)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
initialView
|
||||
.preferredColorScheme(.dark)
|
||||
.background(Color.black)
|
||||
.sheet(isPresented: $appModel.openURLImport) {
|
||||
URLImportView()
|
||||
}
|
||||
.onChange(of: appModel.openURL) { url in
|
||||
if let url {
|
||||
#if !os(tvOS)
|
||||
openWindow(value: url)
|
||||
#endif
|
||||
appModel.openURL = nil
|
||||
}
|
||||
}
|
||||
.onChange(of: appModel.openPlayModel) { model in
|
||||
if let model {
|
||||
#if !os(tvOS)
|
||||
openWindow(value: model)
|
||||
#endif
|
||||
appModel.openPlayModel = nil
|
||||
}
|
||||
}
|
||||
#if !os(tvOS)
|
||||
.onDrop(of: ["public.url", "public.file-url"], isTargeted: nil) { items -> Bool in
|
||||
guard let item = items.first, let identifier = item.registeredTypeIdentifiers.first else {
|
||||
return false
|
||||
}
|
||||
item.loadItem(forTypeIdentifier: identifier, options: nil) { urlData, _ in
|
||||
if let urlData = urlData as? Data {
|
||||
let url = NSURL(absoluteURLWithDataRepresentation: urlData, relativeTo: nil) as URL
|
||||
DispatchQueue.main.async {
|
||||
appModel.open(url: url)
|
||||
}
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
.fileImporter(isPresented: $appModel.openFileImport, allowedContentTypes: [.movie, .audio, .data]) { result in
|
||||
guard let url = try? result.get() else {
|
||||
return
|
||||
}
|
||||
if url.startAccessingSecurityScopedResource() {
|
||||
appModel.open(url: url)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
.onOpenURL { url in
|
||||
KSLog("onOpenURL")
|
||||
appModel.open(url: url)
|
||||
}
|
||||
}
|
||||
|
||||
func link(to item: TabBarItem) -> some View {
|
||||
item.lable.tag(item)
|
||||
}
|
||||
|
||||
func tab(to item: TabBarItem) -> some View {
|
||||
Group {
|
||||
if item == .Home {
|
||||
NavigationStack(path: $appModel.path) {
|
||||
item.destination(appModel: appModel)
|
||||
}
|
||||
} else {
|
||||
NavigationStack {
|
||||
item.destination(appModel: appModel)
|
||||
}
|
||||
}
|
||||
}
|
||||
.tabItem {
|
||||
item.lable.tag(item)
|
||||
}.tag(item)
|
||||
}
|
||||
}
|
||||
|
||||
enum TabBarItem: Int {
|
||||
case Home
|
||||
case Favorite
|
||||
case Files
|
||||
case Setting
|
||||
var lable: Label<Text, Image> {
|
||||
switch self {
|
||||
case .Home:
|
||||
return Label("Home", systemImage: "house.fill")
|
||||
case .Favorite:
|
||||
return Label("Favorite", systemImage: "star.fill")
|
||||
case .Files:
|
||||
return Label("Files", systemImage: "folder.fill.badge.gearshape")
|
||||
case .Setting:
|
||||
return Label("Setting", systemImage: "gear")
|
||||
}
|
||||
}
|
||||
|
||||
@MainActor
|
||||
@ViewBuilder
|
||||
func destination(appModel: APPModel) -> some View {
|
||||
switch self {
|
||||
case .Home:
|
||||
HomeView(m3uURL: appModel.activeM3UModel?.m3uURL)
|
||||
.navigationPlay()
|
||||
case .Favorite:
|
||||
FavoriteView()
|
||||
.navigationPlay()
|
||||
case .Files:
|
||||
FilesView()
|
||||
case .Setting:
|
||||
SettingView()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public extension View {
|
||||
@MainActor
|
||||
@ViewBuilder
|
||||
func navigationPlay() -> some View {
|
||||
navigationDestination(for: URL.self) { url in
|
||||
KSVideoPlayerView(url: url)
|
||||
#if !os(macOS)
|
||||
.toolbar(.hidden, for: .tabBar)
|
||||
#endif
|
||||
}
|
||||
.navigationDestination(for: MovieModel.self) { model in
|
||||
model.view
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private extension MovieModel {
|
||||
@MainActor
|
||||
var view: some View {
|
||||
KSVideoPlayerView(model: self)
|
||||
#if !os(macOS)
|
||||
.toolbar(.hidden, for: .tabBar)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
225
KSPlayer-main/Demo/SwiftUI/Shared/Defaults.swift
Normal file
@@ -0,0 +1,225 @@
|
||||
//
|
||||
// Defaults.swift
|
||||
// TracyPlayer
|
||||
//
|
||||
// Created by kintan on 2023/7/21.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import KSPlayer
|
||||
import SwiftUI
|
||||
|
||||
public class Defaults: ObservableObject {
|
||||
@AppStorage("showRecentPlayList") public var showRecentPlayList = false
|
||||
|
||||
@AppStorage("hardwareDecode")
|
||||
public var hardwareDecode = KSOptions.hardwareDecode {
|
||||
didSet {
|
||||
KSOptions.hardwareDecode = hardwareDecode
|
||||
}
|
||||
}
|
||||
|
||||
@AppStorage("asynchronousDecompression")
|
||||
public var asynchronousDecompression = KSOptions.asynchronousDecompression {
|
||||
didSet {
|
||||
KSOptions.asynchronousDecompression = asynchronousDecompression
|
||||
}
|
||||
}
|
||||
|
||||
@AppStorage("isUseDisplayLayer")
|
||||
public var isUseDisplayLayer = MEOptions.isUseDisplayLayer {
|
||||
didSet {
|
||||
MEOptions.isUseDisplayLayer = isUseDisplayLayer
|
||||
}
|
||||
}
|
||||
|
||||
@AppStorage("preferredForwardBufferDuration")
|
||||
public var preferredForwardBufferDuration = KSOptions.preferredForwardBufferDuration {
|
||||
didSet {
|
||||
KSOptions.preferredForwardBufferDuration = preferredForwardBufferDuration
|
||||
}
|
||||
}
|
||||
|
||||
@AppStorage("maxBufferDuration")
|
||||
public var maxBufferDuration = KSOptions.maxBufferDuration {
|
||||
didSet {
|
||||
KSOptions.maxBufferDuration = maxBufferDuration
|
||||
}
|
||||
}
|
||||
|
||||
@AppStorage("isLoopPlay")
|
||||
public var isLoopPlay = KSOptions.isLoopPlay {
|
||||
didSet {
|
||||
KSOptions.isLoopPlay = isLoopPlay
|
||||
}
|
||||
}
|
||||
|
||||
@AppStorage("canBackgroundPlay")
|
||||
public var canBackgroundPlay = true {
|
||||
didSet {
|
||||
KSOptions.canBackgroundPlay = canBackgroundPlay
|
||||
}
|
||||
}
|
||||
|
||||
@AppStorage("isAutoPlay")
|
||||
public var isAutoPlay = true {
|
||||
didSet {
|
||||
KSOptions.isAutoPlay = isAutoPlay
|
||||
}
|
||||
}
|
||||
|
||||
@AppStorage("isSecondOpen")
|
||||
public var isSecondOpen = true {
|
||||
didSet {
|
||||
KSOptions.isSecondOpen = isSecondOpen
|
||||
}
|
||||
}
|
||||
|
||||
@AppStorage("isAccurateSeek")
|
||||
public var isAccurateSeek = true {
|
||||
didSet {
|
||||
KSOptions.isAccurateSeek = isAccurateSeek
|
||||
}
|
||||
}
|
||||
|
||||
@AppStorage("isPipPopViewController")
|
||||
public var isPipPopViewController = true {
|
||||
didSet {
|
||||
KSOptions.isPipPopViewController = isPipPopViewController
|
||||
}
|
||||
}
|
||||
|
||||
@AppStorage("textFontSize")
|
||||
public var textFontSize = SubtitleModel.textFontSize {
|
||||
didSet {
|
||||
SubtitleModel.textFontSize = textFontSize
|
||||
}
|
||||
}
|
||||
|
||||
@AppStorage("textBold")
|
||||
public var textBold = SubtitleModel.textBold {
|
||||
didSet {
|
||||
SubtitleModel.textBold = textBold
|
||||
}
|
||||
}
|
||||
|
||||
@AppStorage("textItalic")
|
||||
public var textItalic = SubtitleModel.textItalic {
|
||||
didSet {
|
||||
SubtitleModel.textItalic = textItalic
|
||||
}
|
||||
}
|
||||
|
||||
@AppStorage("textColor")
|
||||
public var textColor = SubtitleModel.textColor {
|
||||
didSet {
|
||||
SubtitleModel.textColor = textColor
|
||||
}
|
||||
}
|
||||
|
||||
@AppStorage("textBackgroundColor")
|
||||
public var textBackgroundColor = SubtitleModel.textBackgroundColor {
|
||||
didSet {
|
||||
SubtitleModel.textBackgroundColor = textBackgroundColor
|
||||
}
|
||||
}
|
||||
|
||||
@AppStorage("horizontalAlign")
|
||||
public var horizontalAlign = SubtitleModel.textPosition.horizontalAlign {
|
||||
didSet {
|
||||
SubtitleModel.textPosition.horizontalAlign = horizontalAlign
|
||||
}
|
||||
}
|
||||
|
||||
@AppStorage("verticalAlign")
|
||||
public var verticalAlign = SubtitleModel.textPosition.verticalAlign {
|
||||
didSet {
|
||||
SubtitleModel.textPosition.verticalAlign = verticalAlign
|
||||
}
|
||||
}
|
||||
|
||||
@AppStorage("leftMargin")
|
||||
public var leftMargin = SubtitleModel.textPosition.leftMargin {
|
||||
didSet {
|
||||
SubtitleModel.textPosition.leftMargin = leftMargin
|
||||
}
|
||||
}
|
||||
|
||||
@AppStorage("rightMargin")
|
||||
public var rightMargin = SubtitleModel.textPosition.rightMargin {
|
||||
didSet {
|
||||
SubtitleModel.textPosition.rightMargin = rightMargin
|
||||
}
|
||||
}
|
||||
|
||||
@AppStorage("verticalMargin")
|
||||
public var verticalMargin = SubtitleModel.textPosition.verticalMargin {
|
||||
didSet {
|
||||
SubtitleModel.textPosition.verticalMargin = verticalMargin
|
||||
}
|
||||
}
|
||||
|
||||
@AppStorage("yadifMode")
|
||||
public var yadifMode = MEOptions.yadifMode {
|
||||
didSet {
|
||||
MEOptions.yadifMode = yadifMode
|
||||
}
|
||||
}
|
||||
|
||||
@AppStorage("audioPlayerType")
|
||||
public var audioPlayerType = NSStringFromClass(KSOptions.audioPlayerType) {
|
||||
didSet {
|
||||
KSOptions.audioPlayerType = NSClassFromString(audioPlayerType) as! any AudioOutput.Type
|
||||
}
|
||||
}
|
||||
|
||||
public static let shared = Defaults()
|
||||
private init() {
|
||||
KSOptions.hardwareDecode = hardwareDecode
|
||||
MEOptions.isUseDisplayLayer = isUseDisplayLayer
|
||||
SubtitleModel.textFontSize = textFontSize
|
||||
SubtitleModel.textBold = textBold
|
||||
SubtitleModel.textItalic = textItalic
|
||||
SubtitleModel.textColor = textColor
|
||||
SubtitleModel.textBackgroundColor = textBackgroundColor
|
||||
SubtitleModel.textPosition.horizontalAlign = horizontalAlign
|
||||
SubtitleModel.textPosition.verticalAlign = verticalAlign
|
||||
SubtitleModel.textPosition.leftMargin = leftMargin
|
||||
SubtitleModel.textPosition.rightMargin = rightMargin
|
||||
SubtitleModel.textPosition.verticalMargin = verticalMargin
|
||||
KSOptions.preferredForwardBufferDuration = preferredForwardBufferDuration
|
||||
KSOptions.maxBufferDuration = maxBufferDuration
|
||||
KSOptions.isLoopPlay = isLoopPlay
|
||||
KSOptions.canBackgroundPlay = canBackgroundPlay
|
||||
KSOptions.isAutoPlay = isAutoPlay
|
||||
KSOptions.isSecondOpen = isSecondOpen
|
||||
KSOptions.isAccurateSeek = isAccurateSeek
|
||||
KSOptions.isPipPopViewController = isPipPopViewController
|
||||
MEOptions.yadifMode = yadifMode
|
||||
KSOptions.audioPlayerType = NSClassFromString(audioPlayerType) as! any AudioOutput.Type
|
||||
}
|
||||
}
|
||||
|
||||
@propertyWrapper
|
||||
public struct Default<T>: DynamicProperty {
|
||||
@ObservedObject private var defaults: Defaults
|
||||
private let keyPath: ReferenceWritableKeyPath<Defaults, T>
|
||||
public init(_ keyPath: ReferenceWritableKeyPath<Defaults, T>, defaults: Defaults = .shared) {
|
||||
self.keyPath = keyPath
|
||||
self.defaults = defaults
|
||||
}
|
||||
|
||||
public var wrappedValue: T {
|
||||
get { defaults[keyPath: keyPath] }
|
||||
nonmutating set { defaults[keyPath: keyPath] = newValue }
|
||||
}
|
||||
|
||||
public var projectedValue: Binding<T> {
|
||||
Binding(
|
||||
get: { defaults[keyPath: keyPath] },
|
||||
set: { value in
|
||||
defaults[keyPath: keyPath] = value
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
38
KSPlayer-main/Demo/SwiftUI/Shared/FavoriteView.swift
Normal file
@@ -0,0 +1,38 @@
|
||||
//
|
||||
// FavoriteView.swift
|
||||
// TracyPlayer
|
||||
//
|
||||
// Created by kintan on 2023/7/2.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct FavoriteView: View {
|
||||
@EnvironmentObject
|
||||
private var appModel: APPModel
|
||||
@State
|
||||
private var nameFilter: String = ""
|
||||
@FetchRequest(
|
||||
sortDescriptors: [NSSortDescriptor(keyPath: \MovieModel.name, ascending: true)],
|
||||
predicate: NSPredicate(format: "playmodel.isFavorite == YES")
|
||||
)
|
||||
private var favoritelist: FetchedResults<MovieModel>
|
||||
var body: some View {
|
||||
ScrollView {
|
||||
LazyVGrid(columns: [GridItem(.adaptive(minimum: MoiveView.width))]) {
|
||||
let playlist = favoritelist.filter { model in
|
||||
var isIncluded = true
|
||||
if !nameFilter.isEmpty {
|
||||
isIncluded = model.name!.contains(nameFilter)
|
||||
}
|
||||
return isIncluded
|
||||
}
|
||||
ForEach(playlist) { model in
|
||||
appModel.content(model: model)
|
||||
}
|
||||
}
|
||||
}
|
||||
.padding()
|
||||
.searchable(text: $nameFilter)
|
||||
}
|
||||
}
|
||||
172
KSPlayer-main/Demo/SwiftUI/Shared/FilesView.swift
Normal file
@@ -0,0 +1,172 @@
|
||||
//
|
||||
// FilesView.swift
|
||||
// TracyPlayer
|
||||
//
|
||||
// Created by kintan on 2023/7/3.
|
||||
//
|
||||
|
||||
import KSPlayer
|
||||
import SwiftUI
|
||||
|
||||
struct FilesView: View {
|
||||
@FetchRequest(
|
||||
sortDescriptors: [NSSortDescriptor(keyPath: \M3UModel.name, ascending: true)],
|
||||
predicate: NSPredicate(format: "m3uURL != nil && name != nil")
|
||||
)
|
||||
private var m3uModels: FetchedResults<M3UModel>
|
||||
@EnvironmentObject
|
||||
private var appModel: APPModel
|
||||
@State
|
||||
private var addM3U = false
|
||||
@State
|
||||
private var openFileImport = false
|
||||
@State
|
||||
private var nameFilter: String = ""
|
||||
var body: some View {
|
||||
let models = m3uModels.filter { model in
|
||||
var isIncluded = true
|
||||
if !nameFilter.isEmpty {
|
||||
isIncluded = model.name!.contains(nameFilter)
|
||||
}
|
||||
return isIncluded
|
||||
}
|
||||
#if os(tvOS)
|
||||
HStack {
|
||||
toolbarView
|
||||
}
|
||||
#endif
|
||||
List(models, id: \.self, selection: $appModel.activeM3UModel) { model in
|
||||
#if os(tvOS)
|
||||
NavigationLink(value: model) {
|
||||
M3UView(model: model)
|
||||
}
|
||||
#else
|
||||
M3UView(model: model)
|
||||
#endif
|
||||
}
|
||||
.searchable(text: $nameFilter)
|
||||
.sheet(isPresented: $addM3U) {
|
||||
AddM3UView()
|
||||
}
|
||||
#if !os(tvOS)
|
||||
.toolbar {
|
||||
toolbarView
|
||||
}
|
||||
.fileImporter(isPresented: $openFileImport, allowedContentTypes: [.data]) { result in
|
||||
guard let url = try? result.get() else {
|
||||
return
|
||||
}
|
||||
appModel.addM3U(url: url)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
private var toolbarView: some View {
|
||||
Group {
|
||||
Button {
|
||||
openFileImport = true
|
||||
} label: {
|
||||
Label("Add Local M3U", systemImage: "plus.rectangle.on.folder.fill")
|
||||
}
|
||||
#if !os(tvOS)
|
||||
.keyboardShortcut("o")
|
||||
#endif
|
||||
Button {
|
||||
addM3U = true
|
||||
} label: {
|
||||
Label("Add Remote M3U", systemImage: "plus.app.fill")
|
||||
}
|
||||
#if !os(tvOS)
|
||||
.keyboardShortcut("o", modifiers: [.command, .shift])
|
||||
#endif
|
||||
}
|
||||
.labelStyle(.titleAndIcon)
|
||||
}
|
||||
}
|
||||
|
||||
struct M3UView: View {
|
||||
@ObservedObject
|
||||
var model: M3UModel
|
||||
var body: some View {
|
||||
VStack(alignment: .leading) {
|
||||
Text(model.name ?? "")
|
||||
.font(.title2)
|
||||
.foregroundColor(.primary)
|
||||
Text("total \(model.count) channels")
|
||||
.font(.callout)
|
||||
.foregroundColor(.secondary)
|
||||
Text(model.m3uURL?.description ?? "")
|
||||
.font(.callout)
|
||||
.foregroundColor(.secondary)
|
||||
}
|
||||
.contextMenu {
|
||||
if PersistenceController.shared.container.canUpdateRecord(forManagedObjectWith: model.objectID) {
|
||||
Button {
|
||||
model.delete()
|
||||
} label: {
|
||||
Label("Delete", systemImage: "trash.fill")
|
||||
}
|
||||
}
|
||||
Button {
|
||||
Task {
|
||||
try? await _ = model.parsePlaylist()
|
||||
}
|
||||
} label: {
|
||||
Label("Refresh", systemImage: "arrow.clockwise.circle")
|
||||
}
|
||||
#if !os(tvOS)
|
||||
Button {
|
||||
#if os(macOS)
|
||||
UIPasteboard.general.clearContents()
|
||||
UIPasteboard.general.setString(model.m3uURL!.description, forType: .string)
|
||||
#else
|
||||
UIPasteboard.general.setValue(model.m3uURL!, forPasteboardType: "public.url")
|
||||
#endif
|
||||
} label: {
|
||||
Label("Copy url", systemImage: "doc.on.doc.fill")
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct AddM3UView: View {
|
||||
#if DEBUG && targetEnvironment(simulator)
|
||||
@State
|
||||
private var url = "https://raw.githubusercontent.com/kingslay/TestVideo/main/TestVideo.m3u"
|
||||
#else
|
||||
@State
|
||||
private var url = ""
|
||||
#endif
|
||||
@State
|
||||
private var name = ""
|
||||
@EnvironmentObject private var appModel: APPModel
|
||||
@Environment(\.dismiss) private var dismiss
|
||||
var body: some View {
|
||||
Form {
|
||||
Section {
|
||||
TextField("URL", text: $url)
|
||||
TextField("Name", text: $name)
|
||||
}
|
||||
Section {
|
||||
Text("Links to playlists you add will be public. All people can see it. But only you can modify and delete")
|
||||
Button("Done") {
|
||||
if let url = URL(string: url.trimmingCharacters(in: NSMutableCharacterSet.whitespacesAndNewlines)) {
|
||||
let name = name.trimmingCharacters(in: NSMutableCharacterSet.whitespacesAndNewlines)
|
||||
appModel.addM3U(url: url, name: name.isEmpty ? nil : name)
|
||||
}
|
||||
dismiss()
|
||||
}
|
||||
#if !os(tvOS)
|
||||
.keyboardShortcut(.defaultAction)
|
||||
#endif
|
||||
#if os(macOS) || targetEnvironment(macCatalyst)
|
||||
Button("Cancel") {
|
||||
dismiss()
|
||||
}
|
||||
.keyboardShortcut(.cancelAction)
|
||||
#endif
|
||||
}
|
||||
}.padding()
|
||||
}
|
||||
}
|
||||
185
KSPlayer-main/Demo/SwiftUI/Shared/HomeView.swift
Normal file
@@ -0,0 +1,185 @@
|
||||
import KSPlayer
|
||||
import SwiftUI
|
||||
|
||||
struct HomeView: View {
|
||||
@EnvironmentObject
|
||||
private var appModel: APPModel
|
||||
@State
|
||||
private var nameFilter: String = ""
|
||||
@State
|
||||
private var groupFilter: String?
|
||||
@Default(\.showRecentPlayList)
|
||||
private var showRecentPlayList
|
||||
// @Environment(\.horizontalSizeClass) var horizontalSizeClass
|
||||
@FetchRequest(fetchRequest: MovieModel.playTimeRequest)
|
||||
private var historyModels: FetchedResults<MovieModel>
|
||||
@FetchRequest
|
||||
private var movieModels: FetchedResults<MovieModel>
|
||||
init(m3uURL: URL?) {
|
||||
let request = MovieModel.fetchRequest()
|
||||
request.sortDescriptors = [NSSortDescriptor(keyPath: \MovieModel.name, ascending: true)]
|
||||
request.predicate = NSPredicate(format: "m3uURL == %@ && name != nil ", m3uURL?.description ?? "nil")
|
||||
_movieModels = FetchRequest<MovieModel>(fetchRequest: request)
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
ScrollView {
|
||||
#if os(tvOS)
|
||||
HStack {
|
||||
toolbarView
|
||||
}
|
||||
#endif
|
||||
if showRecentPlayList {
|
||||
Section {
|
||||
ScrollView(.horizontal) {
|
||||
LazyHStack {
|
||||
ForEach(historyModels) { model in
|
||||
appModel.content(model: model)
|
||||
}
|
||||
}
|
||||
}
|
||||
} header: {
|
||||
HStack {
|
||||
Text("Recent Play").font(.title)
|
||||
Spacer()
|
||||
}
|
||||
.padding(.horizontal)
|
||||
}
|
||||
.padding()
|
||||
}
|
||||
Section {
|
||||
LazyVGrid(columns: [GridItem(.adaptive(minimum: MoiveView.width))]) {
|
||||
let playlist = movieModels.filter { model in
|
||||
var isIncluded = true
|
||||
if !nameFilter.isEmpty {
|
||||
isIncluded = model.name!.contains(nameFilter)
|
||||
}
|
||||
if let groupFilter {
|
||||
isIncluded = isIncluded && model.group == groupFilter
|
||||
}
|
||||
return isIncluded
|
||||
}
|
||||
ForEach(playlist) { model in
|
||||
appModel.content(model: model)
|
||||
}
|
||||
}
|
||||
|
||||
} header: {
|
||||
HStack {
|
||||
Text("Channels").font(.title)
|
||||
Spacer()
|
||||
}
|
||||
.padding(.horizontal)
|
||||
}
|
||||
.padding()
|
||||
}
|
||||
#if !os(tvOS)
|
||||
// tvos如果加searchable。那就会导致滚动错乱,所以只能去掉了
|
||||
.searchable(text: $nameFilter)
|
||||
.toolbar {
|
||||
toolbarView
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
private var toolbarView: some View {
|
||||
Group {
|
||||
Button {
|
||||
appModel.openFileImport = true
|
||||
} label: {
|
||||
Label("Open File", systemImage: "plus.rectangle.on.folder.fill")
|
||||
}
|
||||
#if !os(tvOS)
|
||||
.keyboardShortcut("o")
|
||||
#endif
|
||||
Button {
|
||||
appModel.openURLImport = true
|
||||
} label: {
|
||||
Label("Open URL", systemImage: "plus.app.fill")
|
||||
}
|
||||
#if !os(tvOS)
|
||||
.keyboardShortcut("o", modifiers: [.command, .shift])
|
||||
#endif
|
||||
let groups = movieModels.reduce(Set<String>()) { partialResult, model in
|
||||
if let group = model.group {
|
||||
var set = partialResult
|
||||
set.insert(group)
|
||||
return set
|
||||
} else {
|
||||
return partialResult
|
||||
}
|
||||
}.sorted()
|
||||
Picker("group filter", selection: $groupFilter) {
|
||||
Text("All").tag(nil as String?)
|
||||
ForEach(groups) { group in
|
||||
Text(group).tag(group as String?)
|
||||
}
|
||||
}
|
||||
#if os(tvOS)
|
||||
.pickerStyle(.navigationLink)
|
||||
#endif
|
||||
}
|
||||
.labelStyle(.titleAndIcon)
|
||||
}
|
||||
}
|
||||
|
||||
struct MoiveView: View {
|
||||
static let width: CGFloat = {
|
||||
#if canImport(UIKit)
|
||||
if UIDevice.current.userInterfaceIdiom == .phone {
|
||||
return min(KSOptions.sceneSize.width, KSOptions.sceneSize.height) / 2 - 20
|
||||
} else if UIDevice.current.userInterfaceIdiom == .pad {
|
||||
return min(KSOptions.sceneSize.width, KSOptions.sceneSize.height) / 3 - 20
|
||||
} else if UIDevice.current.userInterfaceIdiom == .tv {
|
||||
return KSOptions.sceneSize.width / 4 - 150
|
||||
} else if UIDevice.current.userInterfaceIdiom == .mac {
|
||||
return CGFloat(192)
|
||||
} else {
|
||||
return CGFloat(192)
|
||||
}
|
||||
#else
|
||||
return CGFloat(192)
|
||||
#endif
|
||||
}()
|
||||
|
||||
@ObservedObject var model: MovieModel
|
||||
var body: some View {
|
||||
VStack {
|
||||
image
|
||||
Text(model.name ?? "").lineLimit(1)
|
||||
}
|
||||
.frame(width: MoiveView.width)
|
||||
.contextMenu {
|
||||
Button {
|
||||
model.isFavorite.toggle()
|
||||
try? model.managedObjectContext?.save()
|
||||
} label: {
|
||||
let isFavorite = model.isFavorite
|
||||
Label(isFavorite ? "Cancel favorite" : "Favorite", systemImage: isFavorite ? "star" : "star.fill")
|
||||
}
|
||||
#if !os(tvOS)
|
||||
Button {
|
||||
#if os(macOS)
|
||||
UIPasteboard.general.clearContents()
|
||||
UIPasteboard.general.setString(model.url!.description, forType: .string)
|
||||
#else
|
||||
UIPasteboard.general.setValue(model.url!, forPasteboardType: "public.url")
|
||||
#endif
|
||||
} label: {
|
||||
Label("Copy url", systemImage: "doc.on.doc.fill")
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
var image: some View {
|
||||
AsyncImage(url: model.logo) { image in
|
||||
image
|
||||
.resizable()
|
||||
.aspectRatio(contentMode: .fit)
|
||||
} placeholder: {
|
||||
Color.gray
|
||||
}.frame(width: MoiveView.width, height: MoiveView.width / 16 * 9)
|
||||
.clipShape(RoundedRectangle(cornerRadius: 5))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="22222" systemVersion="23A344" minimumToolsVersion="Automatic" sourceLanguage="Swift" usedWithSwiftData="YES" userDefinedModelVersionIdentifier="">
|
||||
<entity name="M3UModel" representedClassName="M3UModel" syncable="YES" codeGenerationType="class">
|
||||
<attribute name="count" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES"/>
|
||||
<attribute name="m3uURL" optional="YES" attributeType="URI"/>
|
||||
<attribute name="name" attributeType="String" defaultValueString=""/>
|
||||
</entity>
|
||||
<entity name="MovieModel" representedClassName="MovieModel" syncable="YES" codeGenerationType="category">
|
||||
<attribute name="country" optional="YES" attributeType="String"/>
|
||||
<attribute name="group" optional="YES" attributeType="String"/>
|
||||
<attribute name="httpReferer" optional="YES" attributeType="String"/>
|
||||
<attribute name="httpUserAgent" optional="YES" attributeType="String"/>
|
||||
<attribute name="language" optional="YES" attributeType="String"/>
|
||||
<attribute name="logo" optional="YES" attributeType="URI"/>
|
||||
<attribute name="m3uURL" optional="YES" attributeType="URI"/>
|
||||
<attribute name="name" attributeType="String" defaultValueString=""/>
|
||||
<attribute name="tvgID" optional="YES" attributeType="String"/>
|
||||
<attribute name="url" optional="YES" attributeType="URI"/>
|
||||
<relationship name="playmodel" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="PlayModel" inverseName="url" inverseEntity="PlayModel"/>
|
||||
</entity>
|
||||
<entity name="PlayModel" representedClassName="PlayModel" syncable="YES" codeGenerationType="class">
|
||||
<attribute name="current" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
|
||||
<attribute name="duration" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
|
||||
<attribute name="isFavorite" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
|
||||
<attribute name="playTime" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
|
||||
<relationship name="url" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="MovieModel" inverseName="playmodel" inverseEntity="MovieModel"/>
|
||||
</entity>
|
||||
<configuration name="local">
|
||||
<memberEntity name="MovieModel"/>
|
||||
</configuration>
|
||||
<configuration name="private" usedWithCloudKit="YES">
|
||||
<memberEntity name="MovieModel"/>
|
||||
<memberEntity name="PlayModel"/>
|
||||
</configuration>
|
||||
<configuration name="public" usedWithCloudKit="YES">
|
||||
<memberEntity name="M3UModel"/>
|
||||
</configuration>
|
||||
</model>
|
||||
306
KSPlayer-main/Demo/SwiftUI/Shared/MovieModel.swift
Normal file
@@ -0,0 +1,306 @@
|
||||
//
|
||||
// MovieModel.swift
|
||||
// TracyPlayer
|
||||
//
|
||||
// Created by kintan on 2023/2/2.
|
||||
//
|
||||
|
||||
import CoreData
|
||||
import CoreMedia
|
||||
import Foundation
|
||||
import KSPlayer
|
||||
#if canImport(UIKit)
|
||||
import UIKit
|
||||
#endif
|
||||
class MEOptions: KSOptions {
|
||||
#if os(iOS)
|
||||
static var isUseDisplayLayer = true
|
||||
#else
|
||||
static var isUseDisplayLayer = false
|
||||
#endif
|
||||
override init() {
|
||||
super.init()
|
||||
}
|
||||
|
||||
override func process(assetTrack: some MediaPlayerTrack) {
|
||||
super.process(assetTrack: assetTrack)
|
||||
}
|
||||
|
||||
override func isUseDisplayLayer() -> Bool {
|
||||
MEOptions.isUseDisplayLayer && display == .plane
|
||||
}
|
||||
}
|
||||
|
||||
@objc(MovieModel)
|
||||
public class MovieModel: NSManagedObject, Codable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case name, url, httpReferer, httpUserAgent
|
||||
}
|
||||
|
||||
public required convenience init(from decoder: Decoder) throws {
|
||||
self.init(context: PersistenceController.shared.viewContext)
|
||||
let values = try decoder.container(keyedBy: CodingKeys.self)
|
||||
url = try values.decode(URL.self, forKey: .url)
|
||||
name = try values.decode(String.self, forKey: .name)
|
||||
httpReferer = try values.decode(String.self, forKey: .httpReferer)
|
||||
httpUserAgent = try values.decode(String.self, forKey: .httpUserAgent)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
try container.encode(url, forKey: .url)
|
||||
try container.encode(name, forKey: .name)
|
||||
try container.encode(httpReferer, forKey: .httpReferer)
|
||||
try container.encode(httpUserAgent, forKey: .httpUserAgent)
|
||||
}
|
||||
}
|
||||
|
||||
extension MovieModel {
|
||||
convenience init(context: NSManagedObjectContext = PersistenceController.shared.viewContext, url: URL) {
|
||||
self.init(context: context, url: url, name: url.lastPathComponent)
|
||||
}
|
||||
|
||||
convenience init(context: NSManagedObjectContext = PersistenceController.shared.viewContext, url: URL, name: String, extinf: [String: String]? = nil) {
|
||||
self.init(context: context)
|
||||
self.name = name
|
||||
self.url = url
|
||||
setExt(info: extinf)
|
||||
}
|
||||
|
||||
func setExt(info: [String: String]? = nil) {
|
||||
let logo = info?["tvg-logo"].flatMap { URL(string: $0) }
|
||||
if logo != self.logo {
|
||||
self.logo = logo
|
||||
}
|
||||
let language = info?["tvg-language"]
|
||||
if language != self.language {
|
||||
self.language = language
|
||||
}
|
||||
let country = info?["tvg-country"]
|
||||
if country != self.country {
|
||||
self.country = country
|
||||
}
|
||||
let group = info?["group-title"]
|
||||
if group != self.group {
|
||||
self.group = group
|
||||
}
|
||||
let tvgID = info?["tvg-id"]
|
||||
if tvgID != self.tvgID {
|
||||
self.tvgID = tvgID
|
||||
}
|
||||
let httpReferer = info?["http-referrer"] ?? info?["http-referer"]
|
||||
if httpReferer != self.httpReferer {
|
||||
self.httpReferer = httpReferer
|
||||
}
|
||||
let httpUserAgent = info?["http-user-agent"]
|
||||
if httpUserAgent != self.httpUserAgent {
|
||||
self.httpUserAgent = httpUserAgent
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension M3UModel {
|
||||
convenience init(context: NSManagedObjectContext = PersistenceController.shared.viewContext, url: URL, name: String? = nil) {
|
||||
self.init(context: context)
|
||||
self.name = name ?? url.lastPathComponent
|
||||
m3uURL = url
|
||||
}
|
||||
|
||||
func delete() {
|
||||
guard let context = managedObjectContext, let m3uURL else {
|
||||
return
|
||||
}
|
||||
context.delete(self)
|
||||
let request = M3UModel.fetchRequest()
|
||||
request.predicate = NSPredicate(format: "m3uURL == %@", m3uURL.description)
|
||||
do {
|
||||
if let array = try? context.fetch(request), array.isEmpty {
|
||||
let movieRequest = NSFetchRequest<MovieModel>(entityName: "MovieModel")
|
||||
movieRequest.predicate = NSPredicate(format: "m3uURL == %@", m3uURL.description)
|
||||
for model in try context.fetch(movieRequest) {
|
||||
context.delete(model)
|
||||
}
|
||||
// let deleteRequest = NSBatchDeleteRequest(fetchRequest: movieRequest)
|
||||
// _ = try? context.execute(deleteRequest)
|
||||
}
|
||||
try context.save()
|
||||
} catch {
|
||||
KSLog(level: .error, error.localizedDescription)
|
||||
}
|
||||
}
|
||||
|
||||
func getMovieModels() async -> [MovieModel] {
|
||||
let viewContext = managedObjectContext ?? PersistenceController.shared.viewContext
|
||||
let m3uURL = await viewContext.perform {
|
||||
self.m3uURL
|
||||
}
|
||||
guard let m3uURL else {
|
||||
return []
|
||||
}
|
||||
return await viewContext.perform {
|
||||
let request = NSFetchRequest<MovieModel>(entityName: "MovieModel")
|
||||
request.predicate = NSPredicate(format: "m3uURL == %@", m3uURL.description)
|
||||
request.sortDescriptors = [NSSortDescriptor(key: "name", ascending: true)]
|
||||
return (try? viewContext.fetch(request)) ?? []
|
||||
}
|
||||
}
|
||||
|
||||
func parsePlaylist() async throws -> [MovieModel] {
|
||||
let array = await getMovieModels()
|
||||
let viewContext = managedObjectContext ?? PersistenceController.shared.viewContext
|
||||
let m3uURL = await viewContext.perform {
|
||||
self.m3uURL
|
||||
}
|
||||
guard let m3uURL else {
|
||||
return []
|
||||
}
|
||||
let result = try await m3uURL.parsePlaylist()
|
||||
guard result.count > 0 else {
|
||||
delete()
|
||||
return []
|
||||
}
|
||||
return await viewContext.perform {
|
||||
var dic = [URL?: MovieModel]()
|
||||
for model in array {
|
||||
if let oldModel = dic[model.url] {
|
||||
if oldModel.playmodel == nil {
|
||||
viewContext.delete(oldModel)
|
||||
dic[model.url] = model
|
||||
} else {
|
||||
viewContext.delete(model)
|
||||
}
|
||||
} else {
|
||||
dic[model.url] = model
|
||||
}
|
||||
}
|
||||
let models = result.map { name, url, extinf -> MovieModel in
|
||||
if let model = dic[url] {
|
||||
dic.removeValue(forKey: url)
|
||||
if name != model.name {
|
||||
model.name = name
|
||||
}
|
||||
model.setExt(info: extinf)
|
||||
return model
|
||||
} else {
|
||||
let model = MovieModel(context: viewContext, url: url, name: name, extinf: extinf)
|
||||
model.m3uURL = self.m3uURL
|
||||
return model
|
||||
}
|
||||
}
|
||||
if self.count != Int32(models.count) {
|
||||
self.count = Int32(models.count)
|
||||
}
|
||||
viewContext.perform {
|
||||
if viewContext.hasChanges {
|
||||
for model in dic.values {
|
||||
viewContext.delete(model)
|
||||
}
|
||||
try? viewContext.save()
|
||||
}
|
||||
}
|
||||
return models
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension MovieModel {
|
||||
static var playTimeRequest: NSFetchRequest<MovieModel> {
|
||||
let request = MovieModel.fetchRequest()
|
||||
request.sortDescriptors = [
|
||||
NSSortDescriptor(
|
||||
keyPath: \MovieModel.playmodel?.playTime,
|
||||
ascending: false
|
||||
),
|
||||
]
|
||||
request.predicate = NSPredicate(format: "playmodel.playTime != nil")
|
||||
request.fetchLimit = 20
|
||||
return request
|
||||
}
|
||||
|
||||
public var isFavorite: Bool {
|
||||
get {
|
||||
playmodel?.isFavorite ?? false
|
||||
}
|
||||
set {
|
||||
let playmodel = getPlaymodel()
|
||||
playmodel.isFavorite = newValue
|
||||
}
|
||||
}
|
||||
|
||||
func getPlaymodel() -> PlayModel {
|
||||
if let playmodel {
|
||||
return playmodel
|
||||
}
|
||||
let model = PlayModel()
|
||||
playmodel = model
|
||||
model.save()
|
||||
return model
|
||||
}
|
||||
}
|
||||
|
||||
extension NSManagedObject {
|
||||
func save() {
|
||||
guard let context = managedObjectContext else {
|
||||
return
|
||||
}
|
||||
context.perform {
|
||||
do {
|
||||
try context.save()
|
||||
} catch {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension PlayModel {
|
||||
convenience init() {
|
||||
self.init(context: PersistenceController.shared.viewContext)
|
||||
}
|
||||
}
|
||||
|
||||
extension KSVideoPlayerView {
|
||||
init(url: URL) {
|
||||
let request = NSFetchRequest<MovieModel>(entityName: "MovieModel")
|
||||
request.predicate = NSPredicate(format: "url == %@", url.description)
|
||||
let model = (try? PersistenceController.shared.viewContext.fetch(request).first) ?? MovieModel(url: url)
|
||||
self.init(model: model)
|
||||
}
|
||||
|
||||
init(model: MovieModel) {
|
||||
let url = model.url!
|
||||
let options = MEOptions()
|
||||
#if DEBUG
|
||||
if url.lastPathComponent == "h264.mp4" {
|
||||
// options.videoFilters = ["hflip", "vflip"]
|
||||
// options.hardwareDecode = false
|
||||
options.startPlayTime = 13
|
||||
} else if url.lastPathComponent == "vr.mp4" {
|
||||
options.display = .vr
|
||||
} else if url.lastPathComponent == "mjpeg.flac" {
|
||||
// options.videoDisable = true
|
||||
options.syncDecodeAudio = true
|
||||
} else if url.lastPathComponent == "subrip.mkv" {
|
||||
options.asynchronousDecompression = false
|
||||
options.videoFilters.append("yadif_videotoolbox=mode=\(MEOptions.yadifMode):parity=-1:deint=1")
|
||||
} else if url.lastPathComponent == "big_buck_bunny.mp4" {
|
||||
options.startPlayTime = 25
|
||||
} else if url.lastPathComponent == "bipbopall.m3u8" {
|
||||
#if os(macOS)
|
||||
let moviesDirectory = try? FileManager.default.url(for: .moviesDirectory, in: .userDomainMask, appropriateFor: nil, create: false)
|
||||
options.outputURL = moviesDirectory?.appendingPathComponent("recording.mov")
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
options.referer = model.httpReferer
|
||||
if let httpUserAgent = model.httpUserAgent {
|
||||
options.userAgent = httpUserAgent
|
||||
}
|
||||
let playmodel = model.getPlaymodel()
|
||||
playmodel.playTime = Date()
|
||||
if playmodel.duration > 0, playmodel.current > 0, playmodel.duration > playmodel.current + 120 {
|
||||
options.startPlayTime = TimeInterval(playmodel.current)
|
||||
}
|
||||
playmodel.save()
|
||||
model.save()
|
||||
self.init(url: url, options: options, title: model.name)
|
||||
}
|
||||
}
|
||||
88
KSPlayer-main/Demo/SwiftUI/Shared/Persistence.swift
Normal file
@@ -0,0 +1,88 @@
|
||||
//
|
||||
// Persistence.swift
|
||||
// DataTest
|
||||
//
|
||||
// Created by kintan on 2023/7/2.
|
||||
//
|
||||
|
||||
import CloudKit
|
||||
import CoreData
|
||||
import KSPlayer
|
||||
|
||||
struct PersistenceController {
|
||||
static let shared = PersistenceController()
|
||||
|
||||
static var preview: PersistenceController = {
|
||||
let result = PersistenceController(inMemory: true)
|
||||
let viewContext = result.container.viewContext
|
||||
var urls: [String] = [
|
||||
"https://raw.githubusercontent.com/YanG-1989/m3u/main/Gather.m3u",
|
||||
"https://iptv-org.github.io/iptv/index.m3u",
|
||||
"https://iptv-org.github.io/iptv/countries/cn.m3u",
|
||||
"https://iptv-org.github.io/iptv/countries/hk.m3u",
|
||||
"https://iptv-org.github.io/iptv/countries/tw.m3u",
|
||||
"https://iptv-org.github.io/iptv/regions/amer.m3u",
|
||||
"https://iptv-org.github.io/iptv/regions/asia.m3u",
|
||||
"https://iptv-org.github.io/iptv/regions/eur.m3u",
|
||||
"https://iptv-org.github.io/iptv/categories/education.m3u",
|
||||
"https://iptv-org.github.io/iptv/categories/movies.m3u",
|
||||
"https://iptv-org.github.io/iptv/languages/zho.m3u",
|
||||
"https://iptv-org.github.io/iptv/languages/eng.m3u",
|
||||
"https://raw.githubusercontent.com/kingslay/TestVideo/main/test.m3u",
|
||||
"https://raw.githubusercontent.com/kingslay/TestVideo/main/TestVideo.m3u",
|
||||
"https://raw.githubusercontent.com/kingslay/bulaoge/main/bulaoge.m3u",
|
||||
]
|
||||
for str in urls {
|
||||
if let url = URL(string: str) {
|
||||
_ = M3UModel(context: viewContext, url: url)
|
||||
}
|
||||
}
|
||||
do {
|
||||
try viewContext.save()
|
||||
} catch {
|
||||
// Replace this implementation with code to handle the error appropriately.
|
||||
// fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
|
||||
let nsError = error as NSError
|
||||
fatalError("Unresolved error \(nsError), \(nsError.userInfo)")
|
||||
}
|
||||
return result
|
||||
}()
|
||||
|
||||
let container: NSPersistentCloudKitContainer
|
||||
let viewContext: NSManagedObjectContext
|
||||
init(inMemory: Bool = false) {
|
||||
let modelName = "Model"
|
||||
// load Data Model
|
||||
guard let url = Bundle.main.url(forResource: modelName, withExtension: "momd"),
|
||||
let model = NSManagedObjectModel(contentsOf: url)
|
||||
else {
|
||||
fatalError("Can't get \(modelName).momd in Bundle")
|
||||
}
|
||||
container = NSPersistentCloudKitContainer(name: modelName, managedObjectModel: model)
|
||||
viewContext = container.viewContext
|
||||
if inMemory {
|
||||
container.persistentStoreDescriptions.first!.url = URL(fileURLWithPath: "/dev/null")
|
||||
}
|
||||
container.loadPersistentStores { storeDescription, error in
|
||||
if let error = error as NSError? {
|
||||
// Replace this implementation with code to handle the error appropriately.
|
||||
// fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
|
||||
|
||||
/*
|
||||
Typical reasons for an error here include:
|
||||
* The parent directory does not exist, cannot be created, or disallows writing.
|
||||
* The persistent store is not accessible, due to permissions or data protection when the device is locked.
|
||||
* The device is out of space.
|
||||
* The store could not be migrated to the current model version.
|
||||
Check the error message to determine what the actual problem was.
|
||||
*/
|
||||
|
||||
KSLog("Unresolved error \(error), \(error.userInfo), store url \(String(describing: storeDescription.url))")
|
||||
// if let url = storeDescription.url {
|
||||
// try? persistentStoreCoordinator.destroyPersistentStore(at: url, type: .sqlite)
|
||||
// }
|
||||
}
|
||||
}
|
||||
container.viewContext.automaticallyMergesChangesFromParent = true
|
||||
}
|
||||
}
|
||||
205
KSPlayer-main/Demo/SwiftUI/Shared/SettingView.swift
Normal file
@@ -0,0 +1,205 @@
|
||||
//
|
||||
// SettingView.swift
|
||||
// TracyPlayer
|
||||
//
|
||||
// Created by kintan on 2023/6/21.
|
||||
//
|
||||
|
||||
import KSPlayer
|
||||
import SwiftUI
|
||||
|
||||
struct SettingView: View {
|
||||
var body: some View {
|
||||
NavigationView {
|
||||
List {
|
||||
NavigationLink(destination: SettingGeneralView()) {
|
||||
Label("General", systemImage: "switch.2")
|
||||
}
|
||||
NavigationLink(destination: SettingAudioView()) {
|
||||
Label("Audio", systemImage: "waveform")
|
||||
}
|
||||
NavigationLink(destination: SettingVideoView()) {
|
||||
Label("Video", systemImage: "play.rectangle.fill")
|
||||
}
|
||||
NavigationLink(destination: SettingSubtitleView()) {
|
||||
Label("Subtitle", systemImage: "captions.bubble")
|
||||
}
|
||||
NavigationLink(destination: SettingAdvancedView()) {
|
||||
Label("Advanced", systemImage: "gearshape.2.fill")
|
||||
}
|
||||
}
|
||||
}
|
||||
.preferredColorScheme(.dark)
|
||||
.background(Color.black)
|
||||
}
|
||||
}
|
||||
|
||||
struct SettingGeneralView: View {
|
||||
@Default(\.showRecentPlayList)
|
||||
private var showRecentPlayList
|
||||
var body: some View {
|
||||
Form {
|
||||
Toggle("Show Recent Play List", isOn: $showRecentPlayList)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct SettingAudioView: View {
|
||||
@Default(\.audioPlayerType)
|
||||
private var audioPlayerType
|
||||
init() {}
|
||||
var body: some View {
|
||||
Form {
|
||||
Picker("audio Player Type", selection: $audioPlayerType) {
|
||||
Text("AUGraph").tag(NSStringFromClass(AudioGraphPlayer.self))
|
||||
Text("AudioUnit").tag(NSStringFromClass(AudioUnitPlayer.self))
|
||||
Text("AVAudioEngine").tag(NSStringFromClass(AudioEnginePlayer.self))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct SettingVideoView: View {
|
||||
@Default(\.hardwareDecode)
|
||||
private var hardwareDecode
|
||||
@Default(\.asynchronousDecompression)
|
||||
private var asynchronousDecompression
|
||||
@Default(\.isUseDisplayLayer)
|
||||
private var isUseDisplayLayer
|
||||
@Default(\.yadifMode)
|
||||
private var yadifMode
|
||||
var body: some View {
|
||||
Form {
|
||||
Toggle("Hardware decoder", isOn: $hardwareDecode)
|
||||
Toggle("Asynchronous Decompression", isOn: $asynchronousDecompression)
|
||||
Toggle("Use DisplayLayer", isOn: $isUseDisplayLayer)
|
||||
Picker("yadif Mode", selection: $yadifMode) {
|
||||
Text("yadif").tag(0)
|
||||
Text("yadif_2x").tag(1)
|
||||
Text("yadif_spatial_skip").tag(2)
|
||||
Text("yadif_2x_spatial_skip").tag(3)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct SettingSubtitleView: View {
|
||||
@Default(\.textFontSize)
|
||||
private var textFontSize
|
||||
@Default(\.textBold)
|
||||
private var textBold
|
||||
@Default(\.textItalic)
|
||||
private var textItalic
|
||||
@Default(\.textColor)
|
||||
private var textColor
|
||||
@Default(\.textBackgroundColor)
|
||||
private var textBackgroundColor
|
||||
@Default(\.verticalAlign)
|
||||
private var verticalAlign
|
||||
@Default(\.horizontalAlign)
|
||||
private var horizontalAlign
|
||||
@Default(\.leftMargin)
|
||||
private var leftMargin
|
||||
@Default(\.rightMargin)
|
||||
private var rightMargin
|
||||
@Default(\.verticalMargin)
|
||||
private var verticalMargin
|
||||
var body: some View {
|
||||
Form {
|
||||
Section("Position") {
|
||||
HStack {
|
||||
#if os(iOS)
|
||||
Text("Fone Size:")
|
||||
#endif
|
||||
TextField("Fone Size:", value: $textFontSize, format: .number)
|
||||
}
|
||||
Toggle("Bold", isOn: $textBold)
|
||||
Toggle("Italic", isOn: $textItalic)
|
||||
#if !os(tvOS)
|
||||
ColorPicker("Color:", selection: $textColor)
|
||||
ColorPicker("Background:", selection: $textBackgroundColor)
|
||||
#endif
|
||||
}
|
||||
Section("Position") {
|
||||
Picker("Align X:", selection: $horizontalAlign) {
|
||||
ForEach([HorizontalAlignment.leading, .center, .trailing]) { value in
|
||||
Text(value.rawValue).tag(value)
|
||||
}
|
||||
}
|
||||
Picker("Align Y:", selection: $verticalAlign) {
|
||||
ForEach([VerticalAlignment.top, .center, .bottom]) { value in
|
||||
Text(value.rawValue).tag(value)
|
||||
}
|
||||
}
|
||||
HStack {
|
||||
#if os(iOS)
|
||||
Text("Margin Left:")
|
||||
#endif
|
||||
TextField("Margin Left:", value: $leftMargin, format: .number)
|
||||
}
|
||||
HStack {
|
||||
#if os(iOS)
|
||||
Text("Margin Right:")
|
||||
#endif
|
||||
TextField("Margin Right:", value: $rightMargin, format: .number)
|
||||
}
|
||||
HStack {
|
||||
#if os(iOS)
|
||||
Text("Margin Vertical:")
|
||||
#endif
|
||||
TextField("Margin Vertical:", value: $verticalMargin, format: .number)
|
||||
}
|
||||
}
|
||||
}
|
||||
.padding()
|
||||
}
|
||||
}
|
||||
|
||||
struct SettingAdvancedView: View {
|
||||
@Default(\.preferredForwardBufferDuration)
|
||||
private var preferredForwardBufferDuration
|
||||
@Default(\.maxBufferDuration)
|
||||
private var maxBufferDuration
|
||||
@Default(\.isLoopPlay)
|
||||
private var isLoopPlay
|
||||
@Default(\.canBackgroundPlay)
|
||||
private var canBackgroundPlay
|
||||
@Default(\.isAutoPlay)
|
||||
private var isAutoPlay
|
||||
@Default(\.isSecondOpen)
|
||||
private var isSecondOpen
|
||||
@Default(\.isAccurateSeek)
|
||||
private var isAccurateSeek
|
||||
@Default(\.isPipPopViewController)
|
||||
private var isPipPopViewController
|
||||
// @Default(\.isLoopPlay)
|
||||
// private var isLoopPlay
|
||||
var body: some View {
|
||||
Form {
|
||||
HStack {
|
||||
#if os(iOS)
|
||||
Text("Preferred Forward Buffer Duration:")
|
||||
#endif
|
||||
TextField("Preferred Forward Buffer Duration:", value: $preferredForwardBufferDuration, format: .number)
|
||||
}
|
||||
HStack {
|
||||
#if os(iOS)
|
||||
Text("Max Buffer Second:")
|
||||
#endif
|
||||
TextField("Max Buffer Second:", value: $maxBufferDuration, format: .number)
|
||||
}
|
||||
Toggle("Loop Play", isOn: $isLoopPlay)
|
||||
Toggle("Can Background Play", isOn: $canBackgroundPlay)
|
||||
Toggle("Auto Play", isOn: $isAutoPlay)
|
||||
Toggle("Fast Open Video", isOn: $isSecondOpen)
|
||||
Toggle("Fast Seek Video", isOn: $isAccurateSeek)
|
||||
Toggle("Picture In Picture Inline", isOn: $isPipPopViewController)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct SettingView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
SettingView()
|
||||
}
|
||||
}
|
||||
253
KSPlayer-main/Demo/SwiftUI/Shared/TracyApp.swift
Normal file
@@ -0,0 +1,253 @@
|
||||
//
|
||||
// TracyApp.swift
|
||||
// Shared
|
||||
//
|
||||
// Created by kintan on 2021/5/3.
|
||||
//
|
||||
|
||||
import AVFoundation
|
||||
import AVKit
|
||||
import KSPlayer
|
||||
import SwiftUI
|
||||
import UserNotifications
|
||||
|
||||
@main
|
||||
struct TracyApp: App {
|
||||
#if os(macOS)
|
||||
@NSApplicationDelegateAdaptor
|
||||
#else
|
||||
@UIApplicationDelegateAdaptor
|
||||
#endif
|
||||
private var appDelegate: AppDelegate
|
||||
private let appModel = APPModel()
|
||||
init() {
|
||||
let arguments = ProcessInfo.processInfo.arguments.dropFirst()
|
||||
var dropNextArg = false
|
||||
var playerArgs = [String]()
|
||||
var filenames = [String]()
|
||||
KSLog("launch arguments \(arguments)")
|
||||
for argument in arguments {
|
||||
if dropNextArg {
|
||||
dropNextArg = false
|
||||
continue
|
||||
}
|
||||
if argument.starts(with: "--") {
|
||||
playerArgs.append(argument)
|
||||
} else if argument.starts(with: "-") {
|
||||
dropNextArg = true
|
||||
} else {
|
||||
filenames.append(argument)
|
||||
}
|
||||
}
|
||||
if let urlString = filenames.first {
|
||||
appModel.open(url: URL(fileURLWithPath: urlString))
|
||||
}
|
||||
}
|
||||
|
||||
var body: some Scene {
|
||||
WindowGroup {
|
||||
ContentView()
|
||||
.environmentObject(appModel)
|
||||
.environment(\.managedObjectContext, PersistenceController.shared.viewContext)
|
||||
#if !os(tvOS)
|
||||
.handlesExternalEvents(preferring: Set(arrayLiteral: "pause"), allowing: Set(arrayLiteral: "*"))
|
||||
#endif
|
||||
}
|
||||
#if !os(tvOS)
|
||||
// .handlesExternalEvents(matching: Set(arrayLiteral: "*"))
|
||||
.commands {
|
||||
CommandGroup(before: .newItem) {
|
||||
Button("Open") {
|
||||
appModel.openFileImport = true
|
||||
}
|
||||
.keyboardShortcut("o")
|
||||
}
|
||||
CommandGroup(before: .newItem) {
|
||||
Button("Open URL") {
|
||||
appModel.openURLImport = true
|
||||
}
|
||||
.keyboardShortcut("o", modifiers: [.command, .shift])
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if os(macOS)
|
||||
.defaultSize(width: 1120, height: 630)
|
||||
.defaultPosition(.center)
|
||||
#endif
|
||||
#if !os(tvOS)
|
||||
WindowGroup("player", for: URL.self) { $url in
|
||||
if let url {
|
||||
KSVideoPlayerView(url: url)
|
||||
}
|
||||
}
|
||||
#if os(macOS)
|
||||
.defaultPosition(.center)
|
||||
#endif
|
||||
#endif
|
||||
#if !os(tvOS)
|
||||
WindowGroup("player", for: MovieModel.self) { $model in
|
||||
if let model {
|
||||
KSVideoPlayerView(model: model)
|
||||
}
|
||||
}
|
||||
#if os(macOS)
|
||||
.defaultPosition(.center)
|
||||
#endif
|
||||
#endif
|
||||
#if os(macOS)
|
||||
Settings {
|
||||
TabBarItem.Setting.destination(appModel: appModel)
|
||||
}
|
||||
// MenuBarExtra {
|
||||
// MenuBar()
|
||||
// } label: {
|
||||
// Image(systemName: "film.fill")
|
||||
// }
|
||||
// .menuBarExtraStyle(.menu)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
class AppDelegate: NSObject, UIApplicationDelegate {
|
||||
#if os(macOS)
|
||||
func applicationDidFinishLaunching(_: Notification) {
|
||||
// requestNotification()
|
||||
}
|
||||
#else
|
||||
func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
|
||||
// requestNotification()
|
||||
true
|
||||
}
|
||||
#endif
|
||||
|
||||
func application(_: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
|
||||
let tokenString = deviceToken.reduce("") { $0 + String(format: "%02x", $1) }
|
||||
print("Device push notification token - \(tokenString)")
|
||||
}
|
||||
|
||||
func application(_: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) {
|
||||
print("Failed to register for remote notification. Error \(error)")
|
||||
}
|
||||
|
||||
private func requestNotification() {
|
||||
UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .sound]) { allowed, error in
|
||||
if allowed {
|
||||
// register for remote push notification
|
||||
DispatchQueue.main.async {
|
||||
UIApplication.shared.registerForRemoteNotifications()
|
||||
}
|
||||
print("Push notification allowed by user")
|
||||
} else {
|
||||
print("Error while requesting push notification permission. Error \(String(describing: error))")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class APPModel: ObservableObject {
|
||||
@Published
|
||||
var openURL: URL?
|
||||
@Published
|
||||
var openPlayModel: MovieModel?
|
||||
@Published
|
||||
var tabSelected: TabBarItem = .Home
|
||||
@Published
|
||||
var path = NavigationPath()
|
||||
@Published
|
||||
var openFileImport = false
|
||||
@Published
|
||||
var openURLImport = false
|
||||
@Published
|
||||
var hiddenTitleBar = false
|
||||
@AppStorage("activeM3UURL")
|
||||
private var activeM3UURL: URL?
|
||||
@Published
|
||||
var activeM3UModel: M3UModel? = nil {
|
||||
didSet {
|
||||
if let activeM3UModel, activeM3UModel != oldValue {
|
||||
activeM3UURL = activeM3UModel.m3uURL
|
||||
Task { @MainActor in
|
||||
_ = try? await activeM3UModel.parsePlaylist()
|
||||
// 为了解决第一次添加m3u。没有数据的问题,所以需要在查询结果出来之后,在设置下。
|
||||
if activeM3UModel == self.activeM3UModel {
|
||||
self.activeM3UModel = activeM3UModel
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
init() {
|
||||
#if DEBUG
|
||||
// KSOptions.logLevel = .debug
|
||||
#else
|
||||
var fileHandle = FileHandle.standardOutput
|
||||
if let logURL = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first?.appendingPathComponent("log.txt") {
|
||||
if !FileManager.default.fileExists(atPath: logURL.path) {
|
||||
FileManager.default.createFile(atPath: logURL.path, contents: nil)
|
||||
}
|
||||
if let handle = try? FileHandle(forWritingTo: logURL) {
|
||||
fileHandle = handle
|
||||
_ = try? fileHandle.seekToEnd()
|
||||
}
|
||||
}
|
||||
KSOptions.logger = FileLog(fileHandle: fileHandle)
|
||||
#endif
|
||||
// KSOptions.firstPlayerType = KSMEPlayer.self
|
||||
KSOptions.secondPlayerType = KSMEPlayer.self
|
||||
_ = Defaults.shared
|
||||
KSOptions.subtitleDataSouces = [DirectorySubtitleDataSouce(), ShooterSubtitleDataSouce(), AssrtSubtitleDataSouce(token: "5IzWrb2J099vmA96ECQXwdRSe9xdoBUv"), OpenSubtitleDataSouce(apiKey: "0D0gt8nV6SFHVVejdxAMpvOT0wByfKE5")]
|
||||
if let activeM3UURL {
|
||||
addM3U(url: activeM3UURL)
|
||||
}
|
||||
}
|
||||
|
||||
func addM3U(url: URL, name: String? = nil) {
|
||||
let request = M3UModel.fetchRequest()
|
||||
request.predicate = NSPredicate(format: "m3uURL == %@", url.description)
|
||||
let context = PersistenceController.shared.viewContext
|
||||
context.perform {
|
||||
self.activeM3UModel = try? context.fetch(request).first ?? M3UModel(context: context, url: url, name: name)
|
||||
}
|
||||
}
|
||||
|
||||
func open(url: URL) {
|
||||
if url.isPlaylist {
|
||||
addM3U(url: url)
|
||||
} else {
|
||||
#if os(macOS)
|
||||
openURL = url
|
||||
#else
|
||||
path.append(url)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
func content(model: MovieModel) -> some View {
|
||||
#if os(macOS)
|
||||
Button {
|
||||
self.openPlayModel = model
|
||||
} label: {
|
||||
MoiveView(model: model)
|
||||
}
|
||||
.buttonStyle(.borderless)
|
||||
#else
|
||||
NavigationLink(value: model) {
|
||||
MoiveView(model: model)
|
||||
}
|
||||
#if targetEnvironment(macCatalyst)
|
||||
.buttonStyle(.borderless)
|
||||
#else
|
||||
.buttonStyle(.automatic)
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
struct KSVideoPlayerView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
ContentView()
|
||||
.environmentObject(APPModel())
|
||||
.environment(\.managedObjectContext, PersistenceController.preview.container.viewContext)
|
||||
}
|
||||
}
|
||||
81
KSPlayer-main/Demo/SwiftUI/Shared/URLImportView.swift
Normal file
@@ -0,0 +1,81 @@
|
||||
//
|
||||
// URLImportView.swift
|
||||
// Demo
|
||||
//
|
||||
// Created by kintan on 2020/3/22.
|
||||
// Copyright © 2020 kintan. All rights reserved.
|
||||
//
|
||||
|
||||
import KSPlayer
|
||||
import SwiftUI
|
||||
|
||||
struct URLImportView: View {
|
||||
@EnvironmentObject private var appModel: APPModel
|
||||
@State private var username = ""
|
||||
@State private var password = ""
|
||||
@State private var playURL: String = ""
|
||||
@State private var rememberURL = false
|
||||
@AppStorage("historyURLs") private var historyURLs = [URL]()
|
||||
@Environment(\.dismiss) private var dismiss
|
||||
var body: some View {
|
||||
Form {
|
||||
Section {
|
||||
TextField("URL:", text: $playURL)
|
||||
Toggle("Remember URL", isOn: $rememberURL)
|
||||
if !historyURLs.isEmpty {
|
||||
Picker("History URL", selection: $playURL) {
|
||||
Text("None").tag("")
|
||||
ForEach(historyURLs) {
|
||||
Text($0.description).tag($0.description)
|
||||
}
|
||||
}
|
||||
#if os(tvOS)
|
||||
.pickerStyle(.inline)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
Section("HTTP Authentication") {
|
||||
TextField("Username:", text: $username)
|
||||
SecureField("Password:", text: $password)
|
||||
}
|
||||
Section {
|
||||
Button("Done") {
|
||||
dismiss()
|
||||
let urlString = playURL.trimmingCharacters(in: NSMutableCharacterSet.whitespacesAndNewlines)
|
||||
if !urlString.isEmpty, var components = URLComponents(string: urlString) {
|
||||
if !username.isEmpty {
|
||||
components.user = username
|
||||
}
|
||||
if !password.isEmpty {
|
||||
components.password = password
|
||||
}
|
||||
if let url = components.url {
|
||||
if rememberURL {
|
||||
if let index = historyURLs.firstIndex(of: url) {
|
||||
historyURLs.swapAt(index, historyURLs.startIndex)
|
||||
} else {
|
||||
historyURLs.insert(url, at: 0)
|
||||
}
|
||||
if historyURLs.count > 20 {
|
||||
historyURLs.removeLast()
|
||||
}
|
||||
}
|
||||
appModel.open(url: url)
|
||||
}
|
||||
}
|
||||
}
|
||||
#if !os(tvOS)
|
||||
.keyboardShortcut(.defaultAction)
|
||||
#endif
|
||||
#if os(macOS) || targetEnvironment(macCatalyst)
|
||||
Button("Cancel") {
|
||||
dismiss()
|
||||
}
|
||||
.keyboardShortcut(.cancelAction)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
.padding()
|
||||
}
|
||||
}
|
||||
27
KSPlayer-main/Demo/demo-iOS/.swiftlint.yml
Normal file
@@ -0,0 +1,27 @@
|
||||
disabled_rules:
|
||||
- trailing_comma
|
||||
included:
|
||||
- ../../Sources
|
||||
line_length: 200
|
||||
function_body_length: 85
|
||||
# cyclomatic_complexity: 25
|
||||
file_length: 800
|
||||
large_tuple: 8
|
||||
identifier_name:
|
||||
min_length: # 只有最小长度
|
||||
error: 3 # 只有错误
|
||||
excluded: # 排除某些名字
|
||||
- id
|
||||
- URL
|
||||
- i
|
||||
- j
|
||||
- r
|
||||
- x
|
||||
- y
|
||||
- z
|
||||
- n
|
||||
- l
|
||||
- d
|
||||
- usesExternalPlaybackWhileExternalScreenIsActive
|
||||
type_name:
|
||||
excluded: E # 排除某个名字
|
||||
460
KSPlayer-main/Demo/demo-iOS/demo-iOS.xcodeproj/project.pbxproj
Normal file
@@ -0,0 +1,460 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 54;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
5B4483D96DC416B6E2098D77 /* Pods_demo_iOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 652FADC7FD99912D1B883FB1 /* Pods_demo_iOS.framework */; };
|
||||
AC08614F20B69A4500D801FC /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC08614E20B69A4500D801FC /* AppDelegate.swift */; };
|
||||
AC08615620B69A4500D801FC /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = AC08615520B69A4500D801FC /* Assets.xcassets */; };
|
||||
AC08619620B69AB400D801FC /* DetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC08619420B69AB400D801FC /* DetailViewController.swift */; };
|
||||
AC08619720B69AB400D801FC /* MasterViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC08619520B69AB400D801FC /* MasterViewController.swift */; };
|
||||
AC3E54AB24B9E810002B6B1B /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AC3E498E24B9CB5E002B6B1B /* LaunchScreen.storyboard */; };
|
||||
AC3E54AC24B9E815002B6B1B /* Localized.strings in Resources */ = {isa = PBXBuildFile; fileRef = AC3E491D24B98CEB002B6B1B /* Localized.strings */; };
|
||||
AC458DE621DF830F00BD4CF9 /* AudioViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC458DE521DF830F00BD4CF9 /* AudioViewController.swift */; };
|
||||
AC68AA322AD3FA320061A4CA /* MEPlayerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC68AA312AD3FA310061A4CA /* MEPlayerViewController.swift */; };
|
||||
AC78D5DA2B09056B00A28998 /* test.m3u in Resources */ = {isa = PBXBuildFile; fileRef = AC78D5D92B09056B00A28998 /* test.m3u */; };
|
||||
ACE8052D2A83B92800690A9B /* RootViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ACE8052C2A83B92800690A9B /* RootViewController.swift */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
38C991CC5CA01B5A94D57925 /* Pods-demo-iOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-demo-iOS.release.xcconfig"; path = "../Pods/Target Support Files/Pods-demo-iOS/Pods-demo-iOS.release.xcconfig"; sourceTree = "<group>"; };
|
||||
50CE87CB5D349C9B4FC639C6 /* Pods-demo-iOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-demo-iOS.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-demo-iOS/Pods-demo-iOS.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
652FADC7FD99912D1B883FB1 /* Pods_demo_iOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_demo_iOS.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
839B31E32B04D796647D7334 /* Pods_demo_iOSTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_demo_iOSTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
AC08614B20B69A4500D801FC /* demo-iOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "demo-iOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
AC08614E20B69A4500D801FC /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
AC08615520B69A4500D801FC /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
AC08615A20B69A4500D801FC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
AC08619420B69AB400D801FC /* DetailViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DetailViewController.swift; sourceTree = "<group>"; };
|
||||
AC08619520B69AB400D801FC /* MasterViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MasterViewController.swift; sourceTree = "<group>"; };
|
||||
AC155F1223AFA9F40092D004 /* demo-iOS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "demo-iOS.entitlements"; sourceTree = "<group>"; };
|
||||
AC3E498C24B9CA67002B6B1B /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Localized.strings"; sourceTree = "<group>"; };
|
||||
AC3E498E24B9CB5E002B6B1B /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
AC458DE521DF830F00BD4CF9 /* AudioViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AudioViewController.swift; sourceTree = "<group>"; };
|
||||
AC68AA312AD3FA310061A4CA /* MEPlayerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MEPlayerViewController.swift; sourceTree = "<group>"; };
|
||||
AC78D5D92B09056B00A28998 /* test.m3u */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = test.m3u; path = ../../../Tests/KSPlayerTests/Resources/test.m3u; sourceTree = "<group>"; };
|
||||
AC7E04DB2414DA5E00B0F540 /* libxml2.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libxml2.tbd; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/libxml2.tbd; sourceTree = DEVELOPER_DIR; };
|
||||
ACE8052C2A83B92800690A9B /* RootViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RootViewController.swift; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
AC08614820B69A4500D801FC /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
5B4483D96DC416B6E2098D77 /* Pods_demo_iOS.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
15F03ACE93ED6586BC17C60F /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
AC7E04DB2414DA5E00B0F540 /* libxml2.tbd */,
|
||||
652FADC7FD99912D1B883FB1 /* Pods_demo_iOS.framework */,
|
||||
839B31E32B04D796647D7334 /* Pods_demo_iOSTests.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
AC08614220B69A4500D801FC = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
AC08614D20B69A4500D801FC /* demo-iOS */,
|
||||
AC08614C20B69A4500D801FC /* Products */,
|
||||
F16DE5BE42F78427E632B228 /* Pods */,
|
||||
15F03ACE93ED6586BC17C60F /* Frameworks */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
AC08614C20B69A4500D801FC /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
AC08614B20B69A4500D801FC /* demo-iOS.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
AC08614D20B69A4500D801FC /* demo-iOS */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
AC155F1223AFA9F40092D004 /* demo-iOS.entitlements */,
|
||||
AC08614E20B69A4500D801FC /* AppDelegate.swift */,
|
||||
ACE8052C2A83B92800690A9B /* RootViewController.swift */,
|
||||
AC08619420B69AB400D801FC /* DetailViewController.swift */,
|
||||
AC08619520B69AB400D801FC /* MasterViewController.swift */,
|
||||
AC458DE521DF830F00BD4CF9 /* AudioViewController.swift */,
|
||||
AC78D5D92B09056B00A28998 /* test.m3u */,
|
||||
AC3E498E24B9CB5E002B6B1B /* LaunchScreen.storyboard */,
|
||||
AC08615520B69A4500D801FC /* Assets.xcassets */,
|
||||
AC08615A20B69A4500D801FC /* Info.plist */,
|
||||
AC3E491D24B98CEB002B6B1B /* Localized.strings */,
|
||||
AC68AA312AD3FA310061A4CA /* MEPlayerViewController.swift */,
|
||||
);
|
||||
path = "demo-iOS";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
F16DE5BE42F78427E632B228 /* Pods */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
50CE87CB5D349C9B4FC639C6 /* Pods-demo-iOS.debug.xcconfig */,
|
||||
38C991CC5CA01B5A94D57925 /* Pods-demo-iOS.release.xcconfig */,
|
||||
);
|
||||
name = Pods;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
AC08614A20B69A4500D801FC /* demo-iOS */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = AC08617320B69A4500D801FC /* Build configuration list for PBXNativeTarget "demo-iOS" */;
|
||||
buildPhases = (
|
||||
E288B39642AA08D864D78A50 /* [CP] Check Pods Manifest.lock */,
|
||||
AC08614720B69A4500D801FC /* Sources */,
|
||||
AC08614820B69A4500D801FC /* Frameworks */,
|
||||
AC08614920B69A4500D801FC /* Resources */,
|
||||
E1EAA56A7C123B7DD400C005 /* [CP] Copy Pods Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "demo-iOS";
|
||||
productName = "demo-iOS";
|
||||
productReference = AC08614B20B69A4500D801FC /* demo-iOS.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
AC08614320B69A4500D801FC /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
BuildIndependentTargetsInParallel = YES;
|
||||
LastSwiftUpdateCheck = 0930;
|
||||
LastUpgradeCheck = 1500;
|
||||
ORGANIZATIONNAME = kintan;
|
||||
TargetAttributes = {
|
||||
AC08614A20B69A4500D801FC = {
|
||||
CreatedOnToolsVersion = 9.3.1;
|
||||
LastSwiftMigration = 1000;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = AC08614620B69A4500D801FC /* Build configuration list for PBXProject "demo-iOS" */;
|
||||
compatibilityVersion = "Xcode 11.0";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
"zh-Hans",
|
||||
);
|
||||
mainGroup = AC08614220B69A4500D801FC;
|
||||
productRefGroup = AC08614C20B69A4500D801FC /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
AC08614A20B69A4500D801FC /* demo-iOS */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
AC08614920B69A4500D801FC /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
AC3E54AC24B9E815002B6B1B /* Localized.strings in Resources */,
|
||||
AC3E54AB24B9E810002B6B1B /* LaunchScreen.storyboard in Resources */,
|
||||
AC08615620B69A4500D801FC /* Assets.xcassets in Resources */,
|
||||
AC78D5DA2B09056B00A28998 /* test.m3u in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
E1EAA56A7C123B7DD400C005 /* [CP] Copy Pods Resources */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-demo-iOS/Pods-demo-iOS-resources-${CONFIGURATION}-input-files.xcfilelist",
|
||||
);
|
||||
name = "[CP] Copy Pods Resources";
|
||||
outputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-demo-iOS/Pods-demo-iOS-resources-${CONFIGURATION}-output-files.xcfilelist",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-demo-iOS/Pods-demo-iOS-resources.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
E288B39642AA08D864D78A50 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||
"${PODS_ROOT}/Manifest.lock",
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-demo-iOS-checkManifestLockResult.txt",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
AC08614720B69A4500D801FC /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
ACE8052D2A83B92800690A9B /* RootViewController.swift in Sources */,
|
||||
AC08619720B69AB400D801FC /* MasterViewController.swift in Sources */,
|
||||
AC458DE621DF830F00BD4CF9 /* AudioViewController.swift in Sources */,
|
||||
AC08619620B69AB400D801FC /* DetailViewController.swift in Sources */,
|
||||
AC08614F20B69A4500D801FC /* AppDelegate.swift in Sources */,
|
||||
AC68AA322AD3FA320061A4CA /* MEPlayerViewController.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
AC3E491D24B98CEB002B6B1B /* Localized.strings */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
AC3E498C24B9CA67002B6B1B /* zh-Hans */,
|
||||
);
|
||||
name = Localized.strings;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
AC08617120B69A4500D801FC /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
OTHER_CODE_SIGN_FLAGS = "--deep";
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
AC08617220B69A4500D801FC /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
OTHER_CODE_SIGN_FLAGS = "--deep";
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
AC08617420B69A4500D801FC /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 50CE87CB5D349C9B4FC639C6 /* Pods-demo-iOS.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_ENTITLEMENTS = "demo-iOS/demo-iOS.entitlements";
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1.1.1.1;
|
||||
DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER = YES;
|
||||
DEVELOPMENT_TEAM = 3RVHT92X9D;
|
||||
"ENABLE_HARDENED_RUNTIME[sdk=macosx*]" = YES;
|
||||
INFOPLIST_FILE = "demo-iOS/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.1.1;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = kintan.player.demo;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE = "";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
"PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "";
|
||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||
SUPPORTS_MACCATALYST = YES;
|
||||
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2,6";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
AC08617520B69A4500D801FC /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 38C991CC5CA01B5A94D57925 /* Pods-demo-iOS.release.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_ENTITLEMENTS = "demo-iOS/demo-iOS.entitlements";
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1.1.1.1;
|
||||
DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER = YES;
|
||||
DEVELOPMENT_TEAM = 3RVHT92X9D;
|
||||
"ENABLE_HARDENED_RUNTIME[sdk=macosx*]" = YES;
|
||||
INFOPLIST_FILE = "demo-iOS/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.1.1;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = kintan.player.demo;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE = "";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
"PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "";
|
||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||
SUPPORTS_MACCATALYST = YES;
|
||||
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2,6";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
AC08614620B69A4500D801FC /* Build configuration list for PBXProject "demo-iOS" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
AC08617120B69A4500D801FC /* Debug */,
|
||||
AC08617220B69A4500D801FC /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
AC08617320B69A4500D801FC /* Build configuration list for PBXNativeTarget "demo-iOS" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
AC08617420B69A4500D801FC /* Debug */,
|
||||
AC08617520B69A4500D801FC /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = AC08614320B69A4500D801FC /* Project object */;
|
||||
}
|
||||
7
KSPlayer-main/Demo/demo-iOS/demo-iOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata
generated
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:demo-iOS.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,77 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1500"
|
||||
version = "1.7">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "AC08614A20B69A4500D801FC"
|
||||
BuildableName = "demo-iOS.app"
|
||||
BlueprintName = "demo-iOS"
|
||||
ReferencedContainer = "container:demo-iOS.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
shouldAutocreateTestPlan = "YES">
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "AC08614A20B69A4500D801FC"
|
||||
BuildableName = "demo-iOS.app"
|
||||
BlueprintName = "demo-iOS"
|
||||
ReferencedContainer = "container:demo-iOS.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "AC08614A20B69A4500D801FC"
|
||||
BuildableName = "demo-iOS.app"
|
||||
BlueprintName = "demo-iOS"
|
||||
ReferencedContainer = "container:demo-iOS.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
135
KSPlayer-main/Demo/demo-iOS/demo-iOS/AppDelegate.swift
Normal file
@@ -0,0 +1,135 @@
|
||||
//
|
||||
// AppDelegate.swift
|
||||
// Demo
|
||||
//
|
||||
// Created by kintan on 2018/4/15.
|
||||
// Copyright © 2018年 kintan. All rights reserved.
|
||||
//
|
||||
|
||||
import AVFoundation
|
||||
import KSPlayer
|
||||
import UIKit
|
||||
|
||||
@main
|
||||
class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDelegate {
|
||||
var window: UIWindow?
|
||||
func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
|
||||
let window = UIWindow()
|
||||
KSOptions.canBackgroundPlay = true
|
||||
KSOptions.logLevel = .debug
|
||||
KSOptions.firstPlayerType = KSMEPlayer.self
|
||||
KSOptions.secondPlayerType = KSMEPlayer.self
|
||||
// KSOptions.supportedInterfaceOrientations = .all
|
||||
KSOptions.isAutoPlay = true
|
||||
KSOptions.isSecondOpen = true
|
||||
KSOptions.isAccurateSeek = true
|
||||
// KSOptions.isLoopPlay = true
|
||||
if UIDevice.current.userInterfaceIdiom == .phone {
|
||||
window.rootViewController = UINavigationController(rootViewController: MasterViewController())
|
||||
} else if UIDevice.current.userInterfaceIdiom == .tv {
|
||||
window.rootViewController = UINavigationController(rootViewController: MasterViewController())
|
||||
} else {
|
||||
let splitViewController = UISplitViewController()
|
||||
splitViewController.preferredDisplayMode = .primaryOverlay
|
||||
splitViewController.delegate = self
|
||||
let detailVC = DetailViewController()
|
||||
splitViewController.viewControllers = [UINavigationController(rootViewController: MasterViewController()), UINavigationController(rootViewController: detailVC)]
|
||||
#if os(iOS)
|
||||
detailVC.navigationItem.leftBarButtonItem = splitViewController.displayModeButtonItem
|
||||
detailVC.navigationItem.leftItemsSupplementBackButton = true
|
||||
#endif
|
||||
window.rootViewController = splitViewController
|
||||
}
|
||||
window.makeKeyAndVisible()
|
||||
self.window = window
|
||||
return true
|
||||
}
|
||||
|
||||
#if os(iOS)
|
||||
func application(_: UIApplication, supportedInterfaceOrientationsFor _: UIWindow?) -> UIInterfaceOrientationMask {
|
||||
KSOptions.supportedInterfaceOrientations
|
||||
}
|
||||
|
||||
private var menuController: MenuController!
|
||||
override func buildMenu(with builder: UIMenuBuilder) {
|
||||
if builder.system == .main {
|
||||
menuController = MenuController(with: builder)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
class CustomVideoPlayerView: VideoPlayerView {
|
||||
override func customizeUIComponents() {
|
||||
super.customizeUIComponents()
|
||||
toolBar.isHidden = true
|
||||
toolBar.timeSlider.isHidden = true
|
||||
}
|
||||
|
||||
override open func player(layer: KSPlayerLayer, state: KSPlayerState) {
|
||||
super.player(layer: layer, state: state)
|
||||
if state == .readyToPlay {
|
||||
print(layer.player.naturalSize)
|
||||
// list the all subtitles
|
||||
let subtitleInfos = srtControl.subtitleInfos
|
||||
for subtitleInfo in subtitleInfos {
|
||||
print(subtitleInfo.name)
|
||||
}
|
||||
srtControl.selectedSubtitleInfo = subtitleInfos.first
|
||||
for track in layer.player.tracks(mediaType: .audio) {
|
||||
print("audio name: \(track.name) language: \(track.language ?? "")")
|
||||
}
|
||||
for track in layer.player.tracks(mediaType: .video) {
|
||||
print("video name: \(track.name) bitRate: \(track.bitRate) fps: \(track.nominalFrameRate) colorPrimaries: \(track.colorPrimaries ?? "") colorPrimaries: \(track.transferFunction ?? "") yCbCrMatrix: \(track.yCbCrMatrix ?? "") codecType: \(track.mediaSubType.rawValue.string)")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override func onButtonPressed(type: PlayerButtonType, button: UIButton) {
|
||||
if type == .landscape {
|
||||
// xx
|
||||
} else {
|
||||
super.onButtonPressed(type: type, button: button)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class MEOptions: KSOptions {}
|
||||
|
||||
var testObjects: [KSPlayerResource] = {
|
||||
var objects = [KSPlayerResource]()
|
||||
if let url = Bundle.main.url(forResource: "test", withExtension: "m3u"), let data = try? Data(contentsOf: url) {
|
||||
let result = data.parsePlaylist()
|
||||
for (name, url, _) in result {
|
||||
objects.append(KSPlayerResource(url: url, options: MEOptions(), name: name))
|
||||
}
|
||||
}
|
||||
|
||||
for ext in ["mp4", "mkv", "mov", "h264", "flac", "webm"] {
|
||||
guard let urls = Bundle.main.urls(forResourcesWithExtension: ext, subdirectory: nil) else {
|
||||
continue
|
||||
}
|
||||
for url in urls {
|
||||
let options = MEOptions()
|
||||
if url.lastPathComponent == "h264.mp4" {
|
||||
options.videoFilters = ["hflip", "vflip"]
|
||||
options.hardwareDecode = false
|
||||
options.startPlayTime = 13
|
||||
#if os(macOS)
|
||||
let moviesDirectory = try? FileManager.default.url(for: .moviesDirectory, in: .userDomainMask, appropriateFor: nil, create: false)
|
||||
options.outputURL = moviesDirectory?.appendingPathComponent("recording.mov")
|
||||
#endif
|
||||
} else if url.lastPathComponent == "vr.mp4" {
|
||||
options.display = .vr
|
||||
} else if url.lastPathComponent == "mjpeg.flac" {
|
||||
options.videoDisable = true
|
||||
options.syncDecodeAudio = true
|
||||
} else if url.lastPathComponent == "subrip.mkv" {
|
||||
options.asynchronousDecompression = false
|
||||
options.videoFilters.append("yadif_videotoolbox=mode=0:parity=-1:deint=1")
|
||||
}
|
||||
objects.append(KSPlayerResource(url: url, options: options, name: url.lastPathComponent))
|
||||
}
|
||||
}
|
||||
return objects
|
||||
}()
|
||||
@@ -0,0 +1,98 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "20x20",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "20x20",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "29x29",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "29x29",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "40x40",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "40x40",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "60x60",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "60x60",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "20x20",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "20x20",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "29x29",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "29x29",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "40x40",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "40x40",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "76x76",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "76x76",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "83.5x83.5",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ios-marketing",
|
||||
"size" : "1024x1024",
|
||||
"scale" : "1x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
//
|
||||
// AudioViewController.swift
|
||||
// demo-iOS
|
||||
//
|
||||
// Created by kintan on 2019/1/4.
|
||||
// Copyright © 2019 kintan. All rights reserved.
|
||||
//
|
||||
import KSPlayer
|
||||
import UIKit
|
||||
|
||||
class AudioViewController: UIViewController, DetailProtocol {
|
||||
var playerView = AudioPlayerView()
|
||||
var resource: KSPlayerResource? {
|
||||
didSet {
|
||||
if let resource {
|
||||
playerView.set(url: resource.definitions[0].url, options: KSOptions())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
view.backgroundColor = UIColor.lightGray
|
||||
view.addSubview(playerView)
|
||||
playerView.backgroundColor = UIColor.white
|
||||
playerView.translatesAutoresizingMaskIntoConstraints = false
|
||||
NSLayoutConstraint.activate([
|
||||
playerView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
||||
playerView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
||||
playerView.centerYAnchor.constraint(equalTo: view.centerYAnchor),
|
||||
])
|
||||
view.layoutIfNeeded()
|
||||
|
||||
if let resource {
|
||||
playerView.set(url: resource.definitions[0].url, options: KSOptions())
|
||||
}
|
||||
}
|
||||
}
|
||||
107
KSPlayer-main/Demo/demo-iOS/demo-iOS/DetailViewController.swift
Normal file
@@ -0,0 +1,107 @@
|
||||
//
|
||||
// DetailViewController.swift
|
||||
// Demo
|
||||
//
|
||||
// Created by kintan on 2018/4/15.
|
||||
// Copyright © 2018年 kintan. All rights reserved.
|
||||
//
|
||||
|
||||
import CoreServices
|
||||
import KSPlayer
|
||||
import UIKit
|
||||
|
||||
protocol DetailProtocol: UIViewController {
|
||||
var resource: KSPlayerResource? { get set }
|
||||
}
|
||||
|
||||
class DetailViewController: UIViewController, DetailProtocol {
|
||||
#if os(iOS)
|
||||
override var preferredStatusBarStyle: UIStatusBarStyle {
|
||||
.lightContent
|
||||
}
|
||||
|
||||
override var prefersStatusBarHidden: Bool {
|
||||
!playerView.isMaskShow
|
||||
}
|
||||
|
||||
private let playerView = IOSVideoPlayerView()
|
||||
#elseif os(tvOS)
|
||||
private let playerView = VideoPlayerView()
|
||||
#else
|
||||
private let playerView = CustomVideoPlayerView()
|
||||
#endif
|
||||
var resource: KSPlayerResource? {
|
||||
didSet {
|
||||
if let resource {
|
||||
playerView.set(resource: resource)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
view.addSubview(playerView)
|
||||
playerView.delegate = self
|
||||
playerView.translatesAutoresizingMaskIntoConstraints = false
|
||||
#if os(iOS)
|
||||
NSLayoutConstraint.activate([
|
||||
playerView.topAnchor.constraint(equalTo: view.readableContentGuide.topAnchor),
|
||||
playerView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
||||
playerView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
||||
playerView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
||||
])
|
||||
#else
|
||||
NSLayoutConstraint.activate([
|
||||
playerView.topAnchor.constraint(equalTo: view.topAnchor),
|
||||
playerView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
||||
playerView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
||||
playerView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
||||
])
|
||||
#endif
|
||||
view.layoutIfNeeded()
|
||||
playerView.backBlock = { [unowned self] in
|
||||
#if os(iOS)
|
||||
if UIApplication.shared.statusBarOrientation.isLandscape {
|
||||
playerView.updateUI(isLandscape: false)
|
||||
} else {
|
||||
navigationController?.popViewController(animated: true)
|
||||
}
|
||||
#else
|
||||
navigationController?.popViewController(animated: true)
|
||||
#endif
|
||||
}
|
||||
playerView.becomeFirstResponder()
|
||||
}
|
||||
|
||||
override func viewWillAppear(_ animated: Bool) {
|
||||
super.viewWillAppear(animated)
|
||||
if UIDevice.current.userInterfaceIdiom == .phone {
|
||||
navigationController?.setNavigationBarHidden(true, animated: true)
|
||||
}
|
||||
}
|
||||
|
||||
override func viewWillDisappear(_ animated: Bool) {
|
||||
super.viewWillDisappear(animated)
|
||||
navigationController?.setNavigationBarHidden(false, animated: true)
|
||||
}
|
||||
}
|
||||
|
||||
extension DetailViewController: PlayerControllerDelegate {
|
||||
func playerController(seek _: TimeInterval) {}
|
||||
|
||||
func playerController(state _: KSPlayerState) {}
|
||||
|
||||
func playerController(currentTime _: TimeInterval, totalTime _: TimeInterval) {}
|
||||
|
||||
func playerController(finish _: Error?) {}
|
||||
|
||||
func playerController(maskShow _: Bool) {
|
||||
#if os(iOS)
|
||||
setNeedsStatusBarAppearanceUpdate()
|
||||
#endif
|
||||
}
|
||||
|
||||
func playerController(action _: PlayerButtonType) {}
|
||||
|
||||
func playerController(bufferedCount _: Int, consumeTime _: TimeInterval) {}
|
||||
}
|
||||
86
KSPlayer-main/Demo/demo-iOS/demo-iOS/Info.plist
Normal file
@@ -0,0 +1,86 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>$(MARKETING_VERSION)</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.video</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
<true/>
|
||||
<key>NSExceptionDomains</key>
|
||||
<dict>
|
||||
<key>tu.rrsub.com</key>
|
||||
<dict>
|
||||
<key>NSIncludesSubdomains</key>
|
||||
<true/>
|
||||
<key>NSThirdPartyExceptionAllowsInsecureHTTPLoads</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>UIBackgroundModes</key>
|
||||
<array>
|
||||
<string>audio</string>
|
||||
<string>processing</string>
|
||||
<string>remote-notification</string>
|
||||
</array>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>UIStatusBarTintParameters</key>
|
||||
<dict>
|
||||
<key>UINavigationBar</key>
|
||||
<dict>
|
||||
<key>Style</key>
|
||||
<string>UIBarStyleDefault</string>
|
||||
<key>Translucent</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<true/>
|
||||
<key>defaultEnablement</key>
|
||||
<string>enabled</string>
|
||||
<key>requiredOnboarding</key>
|
||||
<array>
|
||||
<string>Tap</string>
|
||||
<string>Tilt</string>
|
||||
<string>Scroller drag</string>
|
||||
<string>Arrow swipe</string>
|
||||
<string>Trackpad capture</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
27
KSPlayer-main/Demo/demo-iOS/demo-iOS/LaunchScreen.storyboard
Normal file
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15705" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
||||
<device id="retina6_1" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15706"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="EHf-IW-A2E">
|
||||
<objects>
|
||||
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="53" y="375"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
||||
@@ -0,0 +1,40 @@
|
||||
//
|
||||
// MEPlayerViewController.swift
|
||||
// demo-iOS
|
||||
//
|
||||
// Created by kintan on 2023/10/9.
|
||||
// Copyright © 2023 kintan. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import KSPlayer
|
||||
import UIKit
|
||||
|
||||
class MEPlayerViewController: UIViewController {
|
||||
private var player: MediaPlayerProtocol!
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
let definition = testObjects[0].definitions[0]
|
||||
player = KSMEPlayer(url: definition.url, options: definition.options)
|
||||
player.delegate = self
|
||||
player.view?.autoresizingMask = [.flexibleWidth, .flexibleHeight]
|
||||
player.view?.frame = view.bounds
|
||||
player.contentMode = .scaleAspectFill
|
||||
player.prepareToPlay()
|
||||
view.addSubview(player.view!)
|
||||
}
|
||||
}
|
||||
|
||||
extension MEPlayerViewController: MediaPlayerDelegate {
|
||||
func readyToPlay(player: some KSPlayer.MediaPlayerProtocol) {
|
||||
player.play()
|
||||
}
|
||||
|
||||
func changeLoadState(player _: some KSPlayer.MediaPlayerProtocol) {}
|
||||
|
||||
func changeBuffering(player _: some KSPlayer.MediaPlayerProtocol, progress _: Int) {}
|
||||
|
||||
func playBack(player _: some KSPlayer.MediaPlayerProtocol, loopCount _: Int) {}
|
||||
|
||||
func finish(player _: some KSPlayer.MediaPlayerProtocol, error _: Error?) {}
|
||||
}
|
||||
131
KSPlayer-main/Demo/demo-iOS/demo-iOS/MasterViewController.swift
Normal file
@@ -0,0 +1,131 @@
|
||||
//
|
||||
// MasterViewController.swift
|
||||
// Demo
|
||||
//
|
||||
// Created by kintan on 2018/4/15.
|
||||
// Copyright © 2018年 kintan. All rights reserved.
|
||||
//
|
||||
|
||||
import KSPlayer
|
||||
import UIKit
|
||||
|
||||
private class TableViewCell: UITableViewCell {
|
||||
var nameLabel: UILabel
|
||||
override public init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
|
||||
nameLabel = UILabel()
|
||||
super.init(style: style, reuseIdentifier: reuseIdentifier)
|
||||
contentView.addSubview(nameLabel)
|
||||
nameLabel.translatesAutoresizingMaskIntoConstraints = false
|
||||
NSLayoutConstraint.activate([
|
||||
nameLabel.topAnchor.constraint(equalTo: contentView.topAnchor),
|
||||
nameLabel.leadingAnchor.constraint(equalTo: contentView.leadingAnchor, constant: 10),
|
||||
nameLabel.trailingAnchor.constraint(equalTo: contentView.trailingAnchor),
|
||||
nameLabel.bottomAnchor.constraint(equalTo: contentView.bottomAnchor),
|
||||
])
|
||||
}
|
||||
|
||||
@available(*, unavailable)
|
||||
required init?(coder _: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
}
|
||||
|
||||
class MasterViewController: UIViewController {
|
||||
var tableView = UITableView()
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
navigationItem.setRightBarButton(UIBarButtonItem(barButtonSystemItem: .add, target: self, action: #selector(addURL)), animated: false)
|
||||
view.addSubview(tableView)
|
||||
tableView.translatesAutoresizingMaskIntoConstraints = false
|
||||
NSLayoutConstraint.activate([
|
||||
tableView.topAnchor.constraint(equalTo: view.topAnchor),
|
||||
tableView.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 0),
|
||||
tableView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
||||
tableView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
||||
])
|
||||
tableView.delegate = self
|
||||
tableView.dataSource = self
|
||||
tableView.rowHeight = 40
|
||||
#if !os(tvOS)
|
||||
tableView.separatorStyle = .singleLine
|
||||
#endif
|
||||
tableView.register(TableViewCell.self, forCellReuseIdentifier: "Cell")
|
||||
tableView.reloadData()
|
||||
}
|
||||
|
||||
override func viewWillAppear(_ animated: Bool) {
|
||||
super.viewWillAppear(animated)
|
||||
}
|
||||
|
||||
override func didReceiveMemoryWarning() {
|
||||
super.didReceiveMemoryWarning()
|
||||
// Dispose of any resources that can be recreated.
|
||||
}
|
||||
}
|
||||
|
||||
extension MasterViewController: UITableViewDataSource {
|
||||
// MARK: - Table View
|
||||
|
||||
func numberOfSections(in _: UITableView) -> Int {
|
||||
1
|
||||
}
|
||||
|
||||
func tableView(_: UITableView, numberOfRowsInSection _: Int) -> Int {
|
||||
testObjects.count
|
||||
}
|
||||
|
||||
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
||||
let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath)
|
||||
if let cell = cell as? TableViewCell {
|
||||
cell.nameLabel.text = testObjects[indexPath.row].name
|
||||
}
|
||||
return cell
|
||||
}
|
||||
}
|
||||
|
||||
extension MasterViewController: UITableViewDelegate {
|
||||
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
|
||||
tableView.deselectRow(at: indexPath, animated: true)
|
||||
play(resource: testObjects[indexPath.row])
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Actions
|
||||
|
||||
extension MasterViewController {
|
||||
@objc func addURL() {
|
||||
let alert = UIAlertController(title: "Enter movie URL", message: nil, preferredStyle: .alert)
|
||||
|
||||
alert.addTextField(configurationHandler: { testField in
|
||||
testField.placeholder = "URL"
|
||||
testField.text = "https://"
|
||||
})
|
||||
|
||||
alert.addAction(UIAlertAction(title: "Play", style: .default, handler: { [weak self] _ in
|
||||
guard let textFieldText = alert.textFields?.first?.text,
|
||||
let url = URL(string: textFieldText)
|
||||
else {
|
||||
return
|
||||
}
|
||||
let resource = KSPlayerResource(url: url)
|
||||
self?.play(resource: resource)
|
||||
}))
|
||||
alert.addAction(UIAlertAction(title: "Cancel", style: .cancel))
|
||||
present(alert, animated: true)
|
||||
}
|
||||
|
||||
func play(resource: KSPlayerResource?) {
|
||||
if let split = splitViewController, let nav = split.viewControllers.last as? UINavigationController, let detail = nav.topViewController as? DetailProtocol {
|
||||
detail.resource = resource
|
||||
#if os(iOS)
|
||||
detail.navigationItem.leftBarButtonItem = split.displayModeButtonItem
|
||||
detail.navigationItem.leftItemsSupplementBackButton = true
|
||||
#endif
|
||||
split.preferredDisplayMode = .primaryHidden
|
||||
return
|
||||
}
|
||||
let controller = DetailViewController()
|
||||
controller.resource = resource
|
||||
navigationController?.pushViewController(controller, animated: true)
|
||||
}
|
||||
}
|
||||
120
KSPlayer-main/Demo/demo-iOS/demo-iOS/RootViewController.swift
Normal file
@@ -0,0 +1,120 @@
|
||||
//
|
||||
// RootViewController.swift
|
||||
// Demo
|
||||
//
|
||||
// Created by kintan on 2018/4/15.
|
||||
// Copyright © 2018年 kintan. All rights reserved.
|
||||
//
|
||||
|
||||
import KSPlayer
|
||||
import UIKit
|
||||
|
||||
private class TableViewCell: UITableViewCell {
|
||||
#if os(iOS)
|
||||
fileprivate let playerView = IOSVideoPlayerView()
|
||||
#else
|
||||
fileprivate let playerView = CustomVideoPlayerView()
|
||||
#endif
|
||||
override public init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
|
||||
super.init(style: style, reuseIdentifier: reuseIdentifier)
|
||||
contentView.addSubview(playerView)
|
||||
playerView.translatesAutoresizingMaskIntoConstraints = false
|
||||
NSLayoutConstraint.activate([
|
||||
contentView.heightAnchor.constraint(equalTo: contentView.widthAnchor, multiplier: 0.65),
|
||||
playerView.topAnchor.constraint(equalTo: contentView.topAnchor, constant: 5),
|
||||
playerView.leadingAnchor.constraint(equalTo: contentView.leadingAnchor),
|
||||
playerView.trailingAnchor.constraint(equalTo: contentView.trailingAnchor),
|
||||
playerView.bottomAnchor.constraint(equalTo: contentView.bottomAnchor),
|
||||
])
|
||||
}
|
||||
|
||||
@available(*, unavailable)
|
||||
required init?(coder _: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
}
|
||||
|
||||
class RootViewController: UIViewController {
|
||||
var tableView = UITableView()
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
navigationItem.setRightBarButton(UIBarButtonItem(barButtonSystemItem: .add, target: self, action: #selector(addURL)), animated: false)
|
||||
KSOptions.isAutoPlay = false
|
||||
view.addSubview(tableView)
|
||||
tableView.translatesAutoresizingMaskIntoConstraints = false
|
||||
NSLayoutConstraint.activate([
|
||||
tableView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor),
|
||||
tableView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
||||
tableView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
||||
tableView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
||||
])
|
||||
tableView.contentInsetAdjustmentBehavior = .never
|
||||
tableView.delegate = self
|
||||
tableView.dataSource = self
|
||||
tableView.register(TableViewCell.self, forCellReuseIdentifier: "Cell")
|
||||
tableView.reloadData()
|
||||
}
|
||||
|
||||
#if os(iOS)
|
||||
override var preferredStatusBarStyle: UIStatusBarStyle {
|
||||
.lightContent
|
||||
}
|
||||
|
||||
override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
|
||||
KSOptions.supportedInterfaceOrientations
|
||||
}
|
||||
#endif
|
||||
@objc func addURL() {
|
||||
let alert = UIAlertController(title: "Enter movie URL", message: nil, preferredStyle: .alert)
|
||||
|
||||
alert.addTextField(configurationHandler: { testField in
|
||||
testField.placeholder = "URL"
|
||||
testField.text = "https://"
|
||||
})
|
||||
|
||||
alert.addAction(UIAlertAction(title: "Play", style: .default, handler: { [weak self] _ in
|
||||
guard let textFieldText = alert.textFields?.first?.text,
|
||||
let url = URL(string: textFieldText)
|
||||
else {
|
||||
return
|
||||
}
|
||||
let resource = KSPlayerResource(url: url)
|
||||
let controller = DetailViewController()
|
||||
controller.resource = resource
|
||||
self?.navigationController?.pushViewController(controller, animated: true)
|
||||
}))
|
||||
alert.addAction(UIAlertAction(title: "Cancel", style: .cancel))
|
||||
present(alert, animated: true)
|
||||
}
|
||||
}
|
||||
|
||||
extension RootViewController: UITableViewDataSource {
|
||||
func numberOfSections(in _: UITableView) -> Int {
|
||||
1
|
||||
}
|
||||
|
||||
func tableView(_: UITableView, numberOfRowsInSection _: Int) -> Int {
|
||||
testObjects.count
|
||||
}
|
||||
|
||||
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
||||
let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath)
|
||||
if let cell = cell as? TableViewCell {
|
||||
let resource = testObjects[indexPath.row]
|
||||
if cell.playerView.resource != resource {
|
||||
cell.playerView.set(resource: resource)
|
||||
}
|
||||
}
|
||||
return cell
|
||||
}
|
||||
}
|
||||
|
||||
extension RootViewController: UITableViewDelegate {
|
||||
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
|
||||
tableView.deselectRow(at: indexPath, animated: true)
|
||||
guard let cell = tableView.cellForRow(at: indexPath) as? TableViewCell else {
|
||||
return
|
||||
}
|
||||
cell.playerView.play()
|
||||
}
|
||||
}
|
||||
18
KSPlayer-main/Demo/demo-iOS/demo-iOS/demo-iOS.entitlements
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.app-sandbox</key>
|
||||
<true/>
|
||||
<key>com.apple.security.assets.movies.read-write</key>
|
||||
<true/>
|
||||
<key>com.apple.security.device.audio-input</key>
|
||||
<true/>
|
||||
<key>com.apple.security.files.downloads.read-write</key>
|
||||
<true/>
|
||||
<key>com.apple.security.files.user-selected.read-write</key>
|
||||
<true/>
|
||||
<key>com.apple.security.network.client</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
Localized.strings
|
||||
demo-iOS
|
||||
|
||||
Created by kintan on 2020/5/23.
|
||||
Copyright © 2020 kintan. All rights reserved.
|
||||
*/
|
||||
"speed"="倍速";
|
||||
"subtitle"="字幕";
|
||||
"select speed"="选择倍速";
|
||||
"cancel"="取消";
|
||||
"built-in subtitles"="内置字幕";
|
||||
"select video quality"="选择画质";
|
||||
"brightness"="亮度";
|
||||
"volume"="音量";
|
||||
"no show subtitle"="不显示字幕";
|
||||
@@ -0,0 +1,16 @@
|
||||
import QuartzCore
|
||||
|
||||
var _buffer = ContiguousArray<Int?>(repeating: 1, count: 102_400)
|
||||
var startTime = CACurrentMediaTime()
|
||||
_buffer.removeAll(keepingCapacity: true)
|
||||
_buffer.append(contentsOf: ContiguousArray<Int?>(repeating: nil, count: 102_400))
|
||||
var diff = CACurrentMediaTime() - startTime
|
||||
print(diff)
|
||||
_buffer = ContiguousArray<Int?>(repeating: 1, count: 102_400)
|
||||
startTime = CACurrentMediaTime()
|
||||
(0 ..< _buffer.count).forEach { _buffer[$0] = nil }
|
||||
diff = CACurrentMediaTime() - startTime
|
||||
print(diff)
|
||||
let ass = #"{\alpha&H00&\t(1700,2000,\alpha&HFF&)\blur1\fsp1\fn方正兰亭特黑长_GBK\fs13\frz1.33\c&H312A17&\b1\t(65,1982,\blur4.5)\pos(142.51,66.32)}拉斯维加斯 城{\fsp0}界"#
|
||||
let styleArr = ass.components(separatedBy: CharacterSet(charactersIn: "{}"))
|
||||
print(styleArr)
|
||||
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<playground version='5.0' target-platform='macos'>
|
||||
<timeline fileName='timeline.xctimeline'/>
|
||||
</playground>
|
||||
@@ -0,0 +1,429 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 54;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
AC0860E020B699E100D801FC /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC0860DF20B699E100D801FC /* AppDelegate.swift */; };
|
||||
AC0860E420B699E100D801FC /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = AC0860E320B699E100D801FC /* Assets.xcassets */; };
|
||||
AC3B64632187411000570305 /* MainWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC3B64622187411000570305 /* MainWindow.swift */; };
|
||||
AC62AEF020C9812F00A75F85 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = AC62AEEE20C9812F00A75F85 /* MainMenu.xib */; };
|
||||
AC62AEF320C9830300A75F85 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC62AEF120C9830300A75F85 /* ViewController.swift */; };
|
||||
AC62AEF420C9830300A75F85 /* ViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = AC62AEF220C9830300A75F85 /* ViewController.xib */; };
|
||||
ACB5A251226579E1004C4EEF /* OpenURLWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ACB5A24F226579E0004C4EEF /* OpenURLWindowController.swift */; };
|
||||
ACB5A252226579E1004C4EEF /* OpenURLWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = ACB5A250226579E1004C4EEF /* OpenURLWindowController.xib */; };
|
||||
FCE576E4DF033905B99A93E6 /* Pods_demo_macOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 90F4636D697BEE812114E1B4 /* Pods_demo_macOS.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
3D5C3988D63E62A43D829A21 /* Pods-demo-macOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-demo-macOS.release.xcconfig"; path = "../Pods/Target Support Files/Pods-demo-macOS/Pods-demo-macOS.release.xcconfig"; sourceTree = "<group>"; };
|
||||
90F4636D697BEE812114E1B4 /* Pods_demo_macOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_demo_macOS.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
A594382B6971720DF80046C9 /* Pods-demo-macOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-demo-macOS.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-demo-macOS/Pods-demo-macOS.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
AC0860DC20B699E100D801FC /* demo-macOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "demo-macOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
AC0860DF20B699E100D801FC /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
AC0860E320B699E100D801FC /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
AC0860E820B699E100D801FC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
AC0860E920B699E100D801FC /* demo_macOS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = demo_macOS.entitlements; sourceTree = "<group>"; };
|
||||
AC3B64622187411000570305 /* MainWindow.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainWindow.swift; sourceTree = "<group>"; };
|
||||
AC62AEEF20C9812F00A75F85 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
|
||||
AC62AEF120C9830300A75F85 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
|
||||
AC62AEF220C9830300A75F85 /* ViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ViewController.xib; sourceTree = "<group>"; };
|
||||
ACB5A24F226579E0004C4EEF /* OpenURLWindowController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OpenURLWindowController.swift; sourceTree = "<group>"; };
|
||||
ACB5A250226579E1004C4EEF /* OpenURLWindowController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = OpenURLWindowController.xib; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
AC0860D920B699E100D801FC /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
FCE576E4DF033905B99A93E6 /* Pods_demo_macOS.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
26AF62C6941FD183334EE2EE /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
90F4636D697BEE812114E1B4 /* Pods_demo_macOS.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8F070A54FB2B18199117B575 /* Pods */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
A594382B6971720DF80046C9 /* Pods-demo-macOS.debug.xcconfig */,
|
||||
3D5C3988D63E62A43D829A21 /* Pods-demo-macOS.release.xcconfig */,
|
||||
);
|
||||
name = Pods;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
AC0860D320B699E100D801FC = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
AC0860DE20B699E100D801FC /* demo-macOS */,
|
||||
AC0860DD20B699E100D801FC /* Products */,
|
||||
8F070A54FB2B18199117B575 /* Pods */,
|
||||
26AF62C6941FD183334EE2EE /* Frameworks */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
AC0860DD20B699E100D801FC /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
AC0860DC20B699E100D801FC /* demo-macOS.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
AC0860DE20B699E100D801FC /* demo-macOS */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
AC0860DF20B699E100D801FC /* AppDelegate.swift */,
|
||||
AC3B64622187411000570305 /* MainWindow.swift */,
|
||||
AC62AEF120C9830300A75F85 /* ViewController.swift */,
|
||||
AC62AEF220C9830300A75F85 /* ViewController.xib */,
|
||||
ACB5A24F226579E0004C4EEF /* OpenURLWindowController.swift */,
|
||||
ACB5A250226579E1004C4EEF /* OpenURLWindowController.xib */,
|
||||
AC0860E320B699E100D801FC /* Assets.xcassets */,
|
||||
AC62AEEE20C9812F00A75F85 /* MainMenu.xib */,
|
||||
AC0860E820B699E100D801FC /* Info.plist */,
|
||||
AC0860E920B699E100D801FC /* demo_macOS.entitlements */,
|
||||
);
|
||||
path = "demo-macOS";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
AC0860DB20B699E100D801FC /* demo-macOS */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = AC08610220B699E200D801FC /* Build configuration list for PBXNativeTarget "demo-macOS" */;
|
||||
buildPhases = (
|
||||
66D566658ED1703BA9764C71 /* [CP] Check Pods Manifest.lock */,
|
||||
AC0860D820B699E100D801FC /* Sources */,
|
||||
AC0860D920B699E100D801FC /* Frameworks */,
|
||||
AC0860DA20B699E100D801FC /* Resources */,
|
||||
133E8CF4B3B00793938F3D16 /* [CP] Copy Pods Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "demo-macOS";
|
||||
productName = "demo-macOS";
|
||||
productReference = AC0860DC20B699E100D801FC /* demo-macOS.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
AC0860D420B699E100D801FC /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
BuildIndependentTargetsInParallel = YES;
|
||||
LastSwiftUpdateCheck = 0930;
|
||||
LastUpgradeCheck = 1500;
|
||||
ORGANIZATIONNAME = kintan;
|
||||
TargetAttributes = {
|
||||
AC0860DB20B699E100D801FC = {
|
||||
CreatedOnToolsVersion = 9.3.1;
|
||||
LastSwiftMigration = 1020;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = AC0860D720B699E100D801FC /* Build configuration list for PBXProject "demo-macOS" */;
|
||||
compatibilityVersion = "Xcode 11.0";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = AC0860D320B699E100D801FC;
|
||||
productRefGroup = AC0860DD20B699E100D801FC /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
AC0860DB20B699E100D801FC /* demo-macOS */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
AC0860DA20B699E100D801FC /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
AC0860E420B699E100D801FC /* Assets.xcassets in Resources */,
|
||||
ACB5A252226579E1004C4EEF /* OpenURLWindowController.xib in Resources */,
|
||||
AC62AEF420C9830300A75F85 /* ViewController.xib in Resources */,
|
||||
AC62AEF020C9812F00A75F85 /* MainMenu.xib in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
133E8CF4B3B00793938F3D16 /* [CP] Copy Pods Resources */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-demo-macOS/Pods-demo-macOS-resources-${CONFIGURATION}-input-files.xcfilelist",
|
||||
);
|
||||
name = "[CP] Copy Pods Resources";
|
||||
outputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-demo-macOS/Pods-demo-macOS-resources-${CONFIGURATION}-output-files.xcfilelist",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-demo-macOS/Pods-demo-macOS-resources.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
66D566658ED1703BA9764C71 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||
"${PODS_ROOT}/Manifest.lock",
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-demo-macOS-checkManifestLockResult.txt",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
AC0860D820B699E100D801FC /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
AC3B64632187411000570305 /* MainWindow.swift in Sources */,
|
||||
ACB5A251226579E1004C4EEF /* OpenURLWindowController.swift in Sources */,
|
||||
AC62AEF320C9830300A75F85 /* ViewController.swift in Sources */,
|
||||
AC0860E020B699E100D801FC /* AppDelegate.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
AC62AEEE20C9812F00A75F85 /* MainMenu.xib */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
AC62AEEF20C9812F00A75F85 /* Base */,
|
||||
);
|
||||
name = MainMenu.xib;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
AC08610020B699E200D801FC /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.15;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = macosx;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 4.2;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
AC08610120B699E200D801FC /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.15;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = macosx;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
SWIFT_VERSION = 4.2;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
AC08610320B699E200D801FC /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = A594382B6971720DF80046C9 /* Pods-demo-macOS.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
ENABLE_HARDENED_RUNTIME = YES;
|
||||
INFOPLIST_FILE = "demo-macOS/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "kintan.demo-macOS";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
AC08610420B699E200D801FC /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 3D5C3988D63E62A43D829A21 /* Pods-demo-macOS.release.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
ENABLE_HARDENED_RUNTIME = YES;
|
||||
INFOPLIST_FILE = "demo-macOS/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "kintan.demo-macOS";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
AC0860D720B699E100D801FC /* Build configuration list for PBXProject "demo-macOS" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
AC08610020B699E200D801FC /* Debug */,
|
||||
AC08610120B699E200D801FC /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
AC08610220B699E200D801FC /* Build configuration list for PBXNativeTarget "demo-macOS" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
AC08610320B699E200D801FC /* Debug */,
|
||||
AC08610420B699E200D801FC /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = AC0860D420B699E100D801FC /* Project object */;
|
||||
}
|
||||
7
KSPlayer-main/Demo/demo-macOS/demo-macOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata
generated
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:demo-macOS.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
89
KSPlayer-main/Demo/demo-macOS/demo-macOS/AppDelegate.swift
Normal file
@@ -0,0 +1,89 @@
|
||||
//
|
||||
// AppDelegate.swift
|
||||
// demo-macOS
|
||||
//
|
||||
// Created by kintan on 2018/5/24.
|
||||
// Copyright © 2018年 kintan. All rights reserved.
|
||||
//
|
||||
|
||||
import AppKit
|
||||
|
||||
@main
|
||||
class AppDelegate: NSObject, NSApplicationDelegate {
|
||||
private lazy var openURLWindow = OpenURLWindowController()
|
||||
private var window = MainWindow()
|
||||
|
||||
func applicationWillFinishLaunching(_: Notification) {}
|
||||
|
||||
func applicationDidFinishLaunching(_: Notification) {
|
||||
NSApplication.shared.servicesProvider = self
|
||||
if window.vc.url == nil {
|
||||
openDocument(self)
|
||||
}
|
||||
}
|
||||
|
||||
func applicationWillTerminate(_: Notification) {
|
||||
// Insert code here to tear down your application
|
||||
}
|
||||
|
||||
@IBAction func openDocument(_: AnyObject) {
|
||||
let panel = NSOpenPanel()
|
||||
panel.title = NSLocalizedString("alert.choose_media_file.title", comment: "Choose Media File")
|
||||
panel.canCreateDirectories = false
|
||||
panel.canChooseFiles = true
|
||||
panel.canChooseDirectories = true
|
||||
panel.allowsMultipleSelection = false
|
||||
if panel.runModal() == .OK {
|
||||
for url in panel.urls {
|
||||
NSDocumentController.shared.noteNewRecentDocumentURL(url)
|
||||
}
|
||||
if let url = panel.urls.first {
|
||||
open(url: url)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@IBAction func openURL(_: AnyObject) {
|
||||
openURLWindow.showWindow(nil)
|
||||
openURLWindow.resetFields()
|
||||
}
|
||||
|
||||
func application(_: NSApplication, openFile _: String) -> Bool {
|
||||
true
|
||||
}
|
||||
|
||||
func application(_: NSApplication, openFiles filenames: [String]) {
|
||||
if let first = filenames.first {
|
||||
open(string: first)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - URL Scheme
|
||||
|
||||
@objc func handleURLEvent(event: NSAppleEventDescriptor, withReplyEvent _: NSAppleEventDescriptor) {
|
||||
guard let url = event.paramDescriptor(forKeyword: keyDirectObject)?.stringValue else { return }
|
||||
open(string: url)
|
||||
}
|
||||
|
||||
// MARK: - Accept dropped string and URL
|
||||
|
||||
// @objc func droppedText(_ pboard: NSPasteboard, userData _: String, error _: NSErrorPointer) {
|
||||
// if let url = pboard.string(forType: .string) {
|
||||
// open(string: url)
|
||||
// }
|
||||
// }
|
||||
|
||||
func open(string: String) {
|
||||
if string.first == "/" {
|
||||
open(url: URL(fileURLWithPath: string))
|
||||
} else {
|
||||
if let url = URL(string: string) {
|
||||
open(url: url)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func open(url: URL) {
|
||||
window.open(url: url)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"size" : "16x16",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"size" : "16x16",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"size" : "32x32",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"size" : "32x32",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"size" : "128x128",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"size" : "128x128",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"size" : "256x256",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"size" : "256x256",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"size" : "512x512",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"size" : "512x512",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
684
KSPlayer-main/Demo/demo-macOS/demo-macOS/Base.lproj/MainMenu.xib
Normal file
@@ -0,0 +1,684 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||
<dependencies>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14490.70"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<customObject id="-2" userLabel="File's Owner" customClass="NSApplication">
|
||||
<connections>
|
||||
<outlet property="delegate" destination="Voe-Tx-rLC" id="GzC-gU-4Uq"/>
|
||||
</connections>
|
||||
</customObject>
|
||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||
<customObject id="Voe-Tx-rLC" customClass="AppDelegate" customModule="demo_macOS" customModuleProvider="target"/>
|
||||
<customObject id="YLy-65-1bz" customClass="NSFontManager"/>
|
||||
<menu title="Main Menu" systemMenu="main" id="AYu-sK-qS6">
|
||||
<items>
|
||||
<menuItem title="demo-macOS" id="1Xt-HY-uBw">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="demo-macOS" systemMenu="apple" id="uQy-DD-JDr">
|
||||
<items>
|
||||
<menuItem title="About demo-macOS" id="5kV-Vb-QxS">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="orderFrontStandardAboutPanel:" target="-1" id="Exp-CZ-Vem"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="VOq-y0-SEH"/>
|
||||
<menuItem title="Preferences…" keyEquivalent="," id="BOF-NM-1cW"/>
|
||||
<menuItem isSeparatorItem="YES" id="wFC-TO-SCJ"/>
|
||||
<menuItem title="Services" id="NMo-om-nkz">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Services" systemMenu="services" id="hz9-B4-Xy5"/>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="4je-JR-u6R"/>
|
||||
<menuItem title="Hide demo-macOS" keyEquivalent="h" id="Olw-nP-bQN">
|
||||
<connections>
|
||||
<action selector="hide:" target="-1" id="PnN-Uc-m68"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Hide Others" keyEquivalent="h" id="Vdr-fp-XzO">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="hideOtherApplications:" target="-1" id="VT4-aY-XCT"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Show All" id="Kd2-mp-pUS">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="unhideAllApplications:" target="-1" id="Dhg-Le-xox"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="kCx-OE-vgT"/>
|
||||
<menuItem title="Quit demo-macOS" keyEquivalent="q" id="4sb-4s-VLi">
|
||||
<connections>
|
||||
<action selector="terminate:" target="-1" id="Te7-pn-YzF"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="File" id="dMs-cI-mzQ">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="File" id="bib-Uj-vzu">
|
||||
<items>
|
||||
<menuItem title="New" keyEquivalent="n" id="Was-JA-tGl">
|
||||
<connections>
|
||||
<action selector="newDocument:" target="-1" id="4Si-XN-c54"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Open…" keyEquivalent="o" id="IAo-SY-fd9">
|
||||
<connections>
|
||||
<action selector="openDocument:" target="-1" id="bVn-NM-KNZ"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Open URL" keyEquivalent="o" id="HWe-pN-Oil">
|
||||
<connections>
|
||||
<action selector="openURL:" target="Voe-Tx-rLC" id="9CD-uc-0Nk"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Open Recent" id="tXI-mr-wws">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Open Recent" systemMenu="recentDocuments" id="oas-Oc-fiZ">
|
||||
<items>
|
||||
<menuItem title="Clear Menu" id="vNY-rz-j42">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="clearRecentDocuments:" target="-1" id="Daa-9d-B3U"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="m54-Is-iLE"/>
|
||||
<menuItem title="Close" keyEquivalent="w" id="DVo-aG-piG">
|
||||
<connections>
|
||||
<action selector="performClose:" target="-1" id="HmO-Ls-i7Q"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Save…" keyEquivalent="s" id="pxx-59-PXV">
|
||||
<connections>
|
||||
<action selector="saveDocument:" target="-1" id="teZ-XB-qJY"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Save As…" keyEquivalent="S" id="Bw7-FT-i3A">
|
||||
<connections>
|
||||
<action selector="saveDocumentAs:" target="-1" id="mDf-zr-I0C"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Revert to Saved" keyEquivalent="r" id="KaW-ft-85H">
|
||||
<connections>
|
||||
<action selector="revertDocumentToSaved:" target="-1" id="iJ3-Pv-kwq"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="aJh-i4-bef"/>
|
||||
<menuItem title="Page Setup…" keyEquivalent="P" id="qIS-W8-SiK">
|
||||
<modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="runPageLayout:" target="-1" id="Din-rz-gC5"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Print…" keyEquivalent="p" id="aTl-1u-JFS">
|
||||
<connections>
|
||||
<action selector="print:" target="-1" id="qaZ-4w-aoO"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Edit" id="5QF-Oa-p0T">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Edit" id="W48-6f-4Dl">
|
||||
<items>
|
||||
<menuItem title="Undo" keyEquivalent="z" id="dRJ-4n-Yzg">
|
||||
<connections>
|
||||
<action selector="undo:" target="-1" id="M6e-cu-g7V"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Redo" keyEquivalent="Z" id="6dh-zS-Vam">
|
||||
<connections>
|
||||
<action selector="redo:" target="-1" id="oIA-Rs-6OD"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="WRV-NI-Exz"/>
|
||||
<menuItem title="Cut" keyEquivalent="x" id="uRl-iY-unG">
|
||||
<connections>
|
||||
<action selector="cut:" target="-1" id="YJe-68-I9s"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Copy" keyEquivalent="c" id="x3v-GG-iWU">
|
||||
<connections>
|
||||
<action selector="copy:" target="-1" id="G1f-GL-Joy"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Paste" keyEquivalent="v" id="gVA-U4-sdL">
|
||||
<connections>
|
||||
<action selector="paste:" target="-1" id="UvS-8e-Qdg"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Paste and Match Style" keyEquivalent="V" id="WeT-3V-zwk">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="pasteAsPlainText:" target="-1" id="cEh-KX-wJQ"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Delete" id="pa3-QI-u2k">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="delete:" target="-1" id="0Mk-Ml-PaM"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Select All" keyEquivalent="a" id="Ruw-6m-B2m">
|
||||
<connections>
|
||||
<action selector="selectAll:" target="-1" id="VNm-Mi-diN"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="uyl-h8-XO2"/>
|
||||
<menuItem title="Find" id="4EN-yA-p0u">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Find" id="1b7-l0-nxx">
|
||||
<items>
|
||||
<menuItem title="Find…" tag="1" keyEquivalent="f" id="Xz5-n4-O0W">
|
||||
<connections>
|
||||
<action selector="performFindPanelAction:" target="-1" id="cD7-Qs-BN4"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Find and Replace…" tag="12" keyEquivalent="f" id="YEy-JH-Tfz">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="performFindPanelAction:" target="-1" id="WD3-Gg-5AJ"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Find Next" tag="2" keyEquivalent="g" id="q09-fT-Sye">
|
||||
<connections>
|
||||
<action selector="performFindPanelAction:" target="-1" id="NDo-RZ-v9R"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Find Previous" tag="3" keyEquivalent="G" id="OwM-mh-QMV">
|
||||
<connections>
|
||||
<action selector="performFindPanelAction:" target="-1" id="HOh-sY-3ay"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Use Selection for Find" tag="7" keyEquivalent="e" id="buJ-ug-pKt">
|
||||
<connections>
|
||||
<action selector="performFindPanelAction:" target="-1" id="U76-nv-p5D"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Jump to Selection" keyEquivalent="j" id="S0p-oC-mLd">
|
||||
<connections>
|
||||
<action selector="centerSelectionInVisibleArea:" target="-1" id="IOG-6D-g5B"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Spelling and Grammar" id="Dv1-io-Yv7">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Spelling" id="3IN-sU-3Bg">
|
||||
<items>
|
||||
<menuItem title="Show Spelling and Grammar" keyEquivalent=":" id="HFo-cy-zxI">
|
||||
<connections>
|
||||
<action selector="showGuessPanel:" target="-1" id="vFj-Ks-hy3"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Check Document Now" keyEquivalent=";" id="hz2-CU-CR7">
|
||||
<connections>
|
||||
<action selector="checkSpelling:" target="-1" id="fz7-VC-reM"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="bNw-od-mp5"/>
|
||||
<menuItem title="Check Spelling While Typing" id="rbD-Rh-wIN">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleContinuousSpellChecking:" target="-1" id="7w6-Qz-0kB"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Check Grammar With Spelling" id="mK6-2p-4JG">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleGrammarChecking:" target="-1" id="muD-Qn-j4w"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Correct Spelling Automatically" id="78Y-hA-62v">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleAutomaticSpellingCorrection:" target="-1" id="2lM-Qi-WAP"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Substitutions" id="9ic-FL-obx">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Substitutions" id="FeM-D8-WVr">
|
||||
<items>
|
||||
<menuItem title="Show Substitutions" id="z6F-FW-3nz">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="orderFrontSubstitutionsPanel:" target="-1" id="oku-mr-iSq"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="gPx-C9-uUO"/>
|
||||
<menuItem title="Smart Copy/Paste" id="9yt-4B-nSM">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleSmartInsertDelete:" target="-1" id="3IJ-Se-DZD"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Smart Quotes" id="hQb-2v-fYv">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleAutomaticQuoteSubstitution:" target="-1" id="ptq-xd-QOA"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Smart Dashes" id="rgM-f4-ycn">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleAutomaticDashSubstitution:" target="-1" id="oCt-pO-9gS"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Smart Links" id="cwL-P1-jid">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleAutomaticLinkDetection:" target="-1" id="Gip-E3-Fov"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Data Detectors" id="tRr-pd-1PS">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleAutomaticDataDetection:" target="-1" id="R1I-Nq-Kbl"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Text Replacement" id="HFQ-gK-NFA">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleAutomaticTextReplacement:" target="-1" id="DvP-Fe-Py6"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Transformations" id="2oI-Rn-ZJC">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Transformations" id="c8a-y6-VQd">
|
||||
<items>
|
||||
<menuItem title="Make Upper Case" id="vmV-6d-7jI">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="uppercaseWord:" target="-1" id="sPh-Tk-edu"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Make Lower Case" id="d9M-CD-aMd">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="lowercaseWord:" target="-1" id="iUZ-b5-hil"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Capitalize" id="UEZ-Bs-lqG">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="capitalizeWord:" target="-1" id="26H-TL-nsh"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Speech" id="xrE-MZ-jX0">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Speech" id="3rS-ZA-NoH">
|
||||
<items>
|
||||
<menuItem title="Start Speaking" id="Ynk-f8-cLZ">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="startSpeaking:" target="-1" id="654-Ng-kyl"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Stop Speaking" id="Oyz-dy-DGm">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="stopSpeaking:" target="-1" id="dX8-6p-jy9"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Format" id="jxT-CU-nIS">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Format" id="GEO-Iw-cKr">
|
||||
<items>
|
||||
<menuItem title="Font" id="Gi5-1S-RQB">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Font" systemMenu="font" id="aXa-aM-Jaq">
|
||||
<items>
|
||||
<menuItem title="Show Fonts" keyEquivalent="t" id="Q5e-8K-NDq">
|
||||
<connections>
|
||||
<action selector="orderFrontFontPanel:" target="YLy-65-1bz" id="WHr-nq-2xA"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Bold" tag="2" keyEquivalent="b" id="GB9-OM-e27">
|
||||
<connections>
|
||||
<action selector="addFontTrait:" target="YLy-65-1bz" id="hqk-hr-sYV"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Italic" tag="1" keyEquivalent="i" id="Vjx-xi-njq">
|
||||
<connections>
|
||||
<action selector="addFontTrait:" target="YLy-65-1bz" id="IHV-OB-c03"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Underline" keyEquivalent="u" id="WRG-CD-K1S">
|
||||
<connections>
|
||||
<action selector="underline:" target="-1" id="FYS-2b-JAY"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="5gT-KC-WSO"/>
|
||||
<menuItem title="Bigger" tag="3" keyEquivalent="+" id="Ptp-SP-VEL">
|
||||
<connections>
|
||||
<action selector="modifyFont:" target="YLy-65-1bz" id="Uc7-di-UnL"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Smaller" tag="4" keyEquivalent="-" id="i1d-Er-qST">
|
||||
<connections>
|
||||
<action selector="modifyFont:" target="YLy-65-1bz" id="HcX-Lf-eNd"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="kx3-Dk-x3B"/>
|
||||
<menuItem title="Kern" id="jBQ-r6-VK2">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Kern" id="tlD-Oa-oAM">
|
||||
<items>
|
||||
<menuItem title="Use Default" id="GUa-eO-cwY">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="useStandardKerning:" target="-1" id="6dk-9l-Ckg"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Use None" id="cDB-IK-hbR">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="turnOffKerning:" target="-1" id="U8a-gz-Maa"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Tighten" id="46P-cB-AYj">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="tightenKerning:" target="-1" id="hr7-Nz-8ro"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Loosen" id="ogc-rX-tC1">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="loosenKerning:" target="-1" id="8i4-f9-FKE"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Ligatures" id="o6e-r0-MWq">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Ligatures" id="w0m-vy-SC9">
|
||||
<items>
|
||||
<menuItem title="Use Default" id="agt-UL-0e3">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="useStandardLigatures:" target="-1" id="7uR-wd-Dx6"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Use None" id="J7y-lM-qPV">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="turnOffLigatures:" target="-1" id="iX2-gA-Ilz"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Use All" id="xQD-1f-W4t">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="useAllLigatures:" target="-1" id="KcB-kA-TuK"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Baseline" id="OaQ-X3-Vso">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Baseline" id="ijk-EB-dga">
|
||||
<items>
|
||||
<menuItem title="Use Default" id="3Om-Ey-2VK">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="unscript:" target="-1" id="0vZ-95-Ywn"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Superscript" id="Rqc-34-cIF">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="superscript:" target="-1" id="3qV-fo-wpU"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Subscript" id="I0S-gh-46l">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="subscript:" target="-1" id="Q6W-4W-IGz"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Raise" id="2h7-ER-AoG">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="raiseBaseline:" target="-1" id="4sk-31-7Q9"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Lower" id="1tx-W0-xDw">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="lowerBaseline:" target="-1" id="OF1-bc-KW4"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="Ndw-q3-faq"/>
|
||||
<menuItem title="Show Colors" keyEquivalent="C" id="bgn-CT-cEk">
|
||||
<connections>
|
||||
<action selector="orderFrontColorPanel:" target="-1" id="mSX-Xz-DV3"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="iMs-zA-UFJ"/>
|
||||
<menuItem title="Copy Style" keyEquivalent="c" id="5Vv-lz-BsD">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="copyFont:" target="-1" id="GJO-xA-L4q"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Paste Style" keyEquivalent="v" id="vKC-jM-MkH">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="pasteFont:" target="-1" id="JfD-CL-leO"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Text" id="Fal-I4-PZk">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Text" id="d9c-me-L2H">
|
||||
<items>
|
||||
<menuItem title="Align Left" keyEquivalent="{" id="ZM1-6Q-yy1">
|
||||
<connections>
|
||||
<action selector="alignLeft:" target="-1" id="zUv-R1-uAa"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Center" keyEquivalent="|" id="VIY-Ag-zcb">
|
||||
<connections>
|
||||
<action selector="alignCenter:" target="-1" id="spX-mk-kcS"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Justify" id="J5U-5w-g23">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="alignJustified:" target="-1" id="ljL-7U-jND"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Align Right" keyEquivalent="}" id="wb2-vD-lq4">
|
||||
<connections>
|
||||
<action selector="alignRight:" target="-1" id="r48-bG-YeY"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="4s2-GY-VfK"/>
|
||||
<menuItem title="Writing Direction" id="H1b-Si-o9J">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Writing Direction" id="8mr-sm-Yjd">
|
||||
<items>
|
||||
<menuItem title="Paragraph" enabled="NO" id="ZvO-Gk-QUH">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
</menuItem>
|
||||
<menuItem id="YGs-j5-SAR">
|
||||
<string key="title"> Default</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeBaseWritingDirectionNatural:" target="-1" id="qtV-5e-UBP"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem id="Lbh-J2-qVU">
|
||||
<string key="title"> Left to Right</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeBaseWritingDirectionLeftToRight:" target="-1" id="S0X-9S-QSf"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem id="jFq-tB-4Kx">
|
||||
<string key="title"> Right to Left</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeBaseWritingDirectionRightToLeft:" target="-1" id="5fk-qB-AqJ"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="swp-gr-a21"/>
|
||||
<menuItem title="Selection" enabled="NO" id="cqv-fj-IhA">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
</menuItem>
|
||||
<menuItem id="Nop-cj-93Q">
|
||||
<string key="title"> Default</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeTextWritingDirectionNatural:" target="-1" id="lPI-Se-ZHp"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem id="BgM-ve-c93">
|
||||
<string key="title"> Left to Right</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeTextWritingDirectionLeftToRight:" target="-1" id="caW-Bv-w94"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem id="RB4-Sm-HuC">
|
||||
<string key="title"> Right to Left</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeTextWritingDirectionRightToLeft:" target="-1" id="EXD-6r-ZUu"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="fKy-g9-1gm"/>
|
||||
<menuItem title="Show Ruler" id="vLm-3I-IUL">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleRuler:" target="-1" id="FOx-HJ-KwY"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Copy Ruler" keyEquivalent="c" id="MkV-Pr-PK5">
|
||||
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="copyRuler:" target="-1" id="71i-fW-3W2"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Paste Ruler" keyEquivalent="v" id="LVM-kO-fVI">
|
||||
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="pasteRuler:" target="-1" id="cSh-wd-qM2"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="View" id="H8h-7b-M4v">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="View" id="HyV-fh-RgO">
|
||||
<items>
|
||||
<menuItem title="Show Toolbar" keyEquivalent="t" id="snW-S8-Cw5">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="toggleToolbarShown:" target="-1" id="BXY-wc-z0C"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Customize Toolbar…" id="1UK-8n-QPP">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="runToolbarCustomizationPalette:" target="-1" id="pQI-g3-MTW"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="hB3-LF-h0Y"/>
|
||||
<menuItem title="Show Sidebar" keyEquivalent="s" id="kIP-vf-haE">
|
||||
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="toggleSidebar:" target="-1" id="iwa-gc-5KM"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Enter Full Screen" keyEquivalent="f" id="4J7-dP-txa">
|
||||
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="toggleFullScreen:" target="-1" id="dU3-MA-1Rq"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Window" id="aUF-d1-5bR">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Window" systemMenu="window" id="Td7-aD-5lo">
|
||||
<items>
|
||||
<menuItem title="Minimize" keyEquivalent="m" id="OY7-WF-poV">
|
||||
<connections>
|
||||
<action selector="performMiniaturize:" target="-1" id="VwT-WD-YPe"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Zoom" id="R4o-n2-Eq4">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="performZoom:" target="-1" id="DIl-cC-cCs"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="eu3-7i-yIM"/>
|
||||
<menuItem title="Bring All to Front" id="LE2-aR-0XJ">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="arrangeInFront:" target="-1" id="DRN-fu-gQh"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Help" id="wpr-3q-Mcd">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Help" systemMenu="help" id="F2S-fz-NVQ">
|
||||
<items>
|
||||
<menuItem title="demo-macOS Help" keyEquivalent="?" id="FKE-Sm-Kum">
|
||||
<connections>
|
||||
<action selector="showHelp:" target="-1" id="y7X-2Q-9no"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</objects>
|
||||
</document>
|
||||
473
KSPlayer-main/Demo/demo-macOS/demo-macOS/Info.plist
Normal file
@@ -0,0 +1,473 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.video</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2018年 kintan. All rights reserved.</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
<key>CFBundleDocumentTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>mkv</string>
|
||||
<string>mka</string>
|
||||
<string>mk3d</string>
|
||||
<string>mks</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>doc_mkv.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Matroska video</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>mka</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>doc_mkv.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Matroska audio</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Default</string>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string></string>
|
||||
</array>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>rm</string>
|
||||
<string>rmvb</string>
|
||||
<string>ra</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>doc_rm.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Real Media file</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>asf</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>doc_asf.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Advanced Systems Format (ASF) media</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>aac</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>doc_aac.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Advanced Audio Coding (AAC) media</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>flv</string>
|
||||
<string>f4v</string>
|
||||
<string>f4p</string>
|
||||
<string>f4a</string>
|
||||
<string>f4b</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>doc_flv.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Flash Video file</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>webm</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>doc_webm.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>WebM media</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>3gp</string>
|
||||
<string>3g2</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>doc_3gp.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>3GPP media</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>mp3</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>doc_mp3.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>MPEG Layer III (MP3) audio</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>ogg</string>
|
||||
<string>oga</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>doc_ogg.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>OGG audio</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>ogm</string>
|
||||
<string>ogv</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>doc_ogg.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>OGG video</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>ts</string>
|
||||
<string>mts</string>
|
||||
<string>m2ts</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>doc_ts.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>MPEG transport stream (TS) media</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>avi</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>doc_avi.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>AVI media</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>wav</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>doc_wav.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Waveform Audio File (WAV) audio</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>m4a</string>
|
||||
<string>m4b</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>doc_m4a.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>MPEG-4 audio</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>wmv</string>
|
||||
<string>wma</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>doc_wmv.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Windows Media Video/Audio (WMV/WMA) media</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>qt</string>
|
||||
<string>mov</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>doc_qt.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>QuickTime media</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>flac</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>doc_flac.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Free Lossless Audio Codec (FLAC) audio</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>mpeg</string>
|
||||
<string>mpg</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>doc_mp4.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>MPEG video</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>mp4</string>
|
||||
<string>m4v</string>
|
||||
<string>m4b</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>doc_mp4.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>MPEG-4 video</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>dat</string>
|
||||
<string>divx</string>
|
||||
<string>vob</string>
|
||||
<string>amv</string>
|
||||
<string>mxf</string>
|
||||
<string>mcf</string>
|
||||
<string>swf</string>
|
||||
<string>xvid</string>
|
||||
<string>yuv</string>
|
||||
<string>dv</string>
|
||||
<string>wv</string>
|
||||
<string>*</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>doc_other_v.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Video file</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>aa3</string>
|
||||
<string>ac3</string>
|
||||
<string>acm</string>
|
||||
<string>aif</string>
|
||||
<string>aiff</string>
|
||||
<string>ape</string>
|
||||
<string>caf</string>
|
||||
<string>mid</string>
|
||||
<string>midi</string>
|
||||
<string>pcm</string>
|
||||
<string>vox</string>
|
||||
<string>tta</string>
|
||||
<string>tak</string>
|
||||
<string>opus</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>doc_other_a.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Audio file</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>m3u8</string>
|
||||
<string>m3u</string>
|
||||
<string>pls</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>doc_list.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Playlist</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>NSServices</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>NSMenuItem</key>
|
||||
<dict>
|
||||
<key>default</key>
|
||||
<string>Text Drop</string>
|
||||
</dict>
|
||||
<key>NSMessage</key>
|
||||
<string>droppedText</string>
|
||||
<key>NSSendTypes</key>
|
||||
<array>
|
||||
<string>NSStringPboardType</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>NSSupportsAutomaticGraphicsSwitching</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
33
KSPlayer-main/Demo/demo-macOS/demo-macOS/MainWindow.swift
Normal file
@@ -0,0 +1,33 @@
|
||||
//
|
||||
// MainWindow.swift
|
||||
// demo-macOS
|
||||
//
|
||||
// Created by kintan on 2018/10/29.
|
||||
// Copyright © 2018 kintan. All rights reserved.
|
||||
//
|
||||
|
||||
import Cocoa
|
||||
import KSPlayer
|
||||
|
||||
class MainWindow: NSWindow {
|
||||
let vc: ViewController
|
||||
override init(contentRect: NSRect, styleMask style: NSWindow.StyleMask, backing backingStoreType: NSWindow.BackingStoreType, defer flag: Bool) {
|
||||
KSOptions.firstPlayerType = KSMEPlayer.self
|
||||
KSOptions.secondPlayerType = KSMEPlayer.self
|
||||
KSOptions.logLevel = .debug
|
||||
KSOptions.isAutoPlay = true
|
||||
KSOptions.isSeekedAutoPlay = true
|
||||
vc = ViewController()
|
||||
super.init(contentRect: contentRect, styleMask: style, backing: backingStoreType, defer: flag)
|
||||
contentViewController = vc
|
||||
styleMask = [.closable, .miniaturizable, .resizable, .titled]
|
||||
}
|
||||
|
||||
func open(url: URL) {
|
||||
if !isVisible {
|
||||
makeKeyAndOrderFront(self)
|
||||
center()
|
||||
}
|
||||
vc.url = url
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,272 @@
|
||||
//
|
||||
// OpenURLWindowController.swift
|
||||
// iina
|
||||
//
|
||||
// Created by Collider LI on 25/8/2018.
|
||||
// Copyright © 2018 lhc. All rights reserved.
|
||||
//
|
||||
|
||||
import Cocoa
|
||||
|
||||
class OpenURLWindowController: NSWindowController, NSTextFieldDelegate, NSControlTextEditingDelegate {
|
||||
override var windowNibName: NSNib.Name {
|
||||
NSNib.Name("OpenURLWindowController")
|
||||
}
|
||||
|
||||
@IBOutlet var urlStackView: NSStackView!
|
||||
@IBOutlet var httpPrefixTextField: NSTextField!
|
||||
@IBOutlet var urlField: NSTextField!
|
||||
@IBOutlet var usernameField: NSTextField!
|
||||
@IBOutlet var passwordField: NSSecureTextField!
|
||||
@IBOutlet var rememberPasswordCheckBox: NSButton!
|
||||
@IBOutlet var errorMessageLabel: NSTextField!
|
||||
@IBOutlet var openButton: NSButton!
|
||||
|
||||
var isAlternativeAction = false
|
||||
|
||||
override func windowDidLoad() {
|
||||
super.windowDidLoad()
|
||||
window?.isMovableByWindowBackground = true
|
||||
window?.titlebarAppearsTransparent = true
|
||||
window?.titleVisibility = .hidden
|
||||
urlStackView.setVisibilityPriority(.notVisible, for: httpPrefixTextField)
|
||||
urlField.delegate = self
|
||||
for item in [.closeButton, .miniaturizeButton, .zoomButton] as [NSWindow.ButtonType] {
|
||||
window?.standardWindowButton(item)?.isHidden = true
|
||||
}
|
||||
}
|
||||
|
||||
override func cancelOperation(_: Any?) {
|
||||
window?.close()
|
||||
}
|
||||
|
||||
func resetFields() {
|
||||
urlField.stringValue = ""
|
||||
usernameField.stringValue = ""
|
||||
passwordField.stringValue = ""
|
||||
rememberPasswordCheckBox.state = .on
|
||||
urlStackView.setVisibilityPriority(.notVisible, for: httpPrefixTextField)
|
||||
window?.makeFirstResponder(urlField)
|
||||
}
|
||||
|
||||
@IBAction func cancelBtnAction(_: Any) {
|
||||
window?.close()
|
||||
}
|
||||
|
||||
@IBAction func openBtnAction(_: Any) {
|
||||
if let url = getURL().url {
|
||||
if rememberPasswordCheckBox.state == .on, let host = url.host {
|
||||
try? KeychainAccess.write(username: usernameField.stringValue,
|
||||
password: passwordField.stringValue,
|
||||
forService: .httpAuth,
|
||||
server: host,
|
||||
port: url.port)
|
||||
}
|
||||
window?.close()
|
||||
if let delegate = NSApplication.shared.delegate as? AppDelegate {
|
||||
delegate.open(url: url)
|
||||
}
|
||||
} else {
|
||||
Utility.showAlert("wrong_url_format")
|
||||
}
|
||||
}
|
||||
|
||||
private func getURL() -> (url: URL?, hasScheme: Bool) {
|
||||
guard !urlField.stringValue.isEmpty else { return (nil, false) }
|
||||
let username = usernameField.stringValue
|
||||
let password = passwordField.stringValue
|
||||
guard var urlValue = urlField.stringValue.addingPercentEncoding(withAllowedCharacters: .urlAllowed) else {
|
||||
return (nil, false)
|
||||
}
|
||||
var hasScheme = true
|
||||
if let url = URL(string: urlValue), url.scheme == nil {
|
||||
urlValue = "http://" + urlValue
|
||||
hasScheme = false
|
||||
}
|
||||
guard let nsurl = NSURL(string: urlValue)?.standardized, let urlComponents = NSURLComponents(url: nsurl, resolvingAgainstBaseURL: false) else { return (nil, false) }
|
||||
if !username.isEmpty {
|
||||
urlComponents.user = username
|
||||
if !password.isEmpty {
|
||||
urlComponents.password = password
|
||||
}
|
||||
}
|
||||
return (urlComponents.url, hasScheme)
|
||||
}
|
||||
|
||||
// NSControlTextEditingDelegate
|
||||
|
||||
func controlTextDidChange(_ obj: Notification) {
|
||||
if let textView = obj.userInfo?["NSFieldEditor"] as? NSTextView, let str = textView.textStorage?.string, str.isEmpty {
|
||||
errorMessageLabel.isHidden = true
|
||||
urlStackView.setVisibilityPriority(.notVisible, for: httpPrefixTextField)
|
||||
openButton.isEnabled = true
|
||||
return
|
||||
}
|
||||
let (url, hasScheme) = getURL()
|
||||
if let url, let host = url.host {
|
||||
errorMessageLabel.isHidden = true
|
||||
urlField.textColor = .labelColor
|
||||
openButton.isEnabled = true
|
||||
if hasScheme {
|
||||
urlStackView.setVisibilityPriority(.notVisible, for: httpPrefixTextField)
|
||||
} else {
|
||||
urlStackView.setVisibilityPriority(.mustHold, for: httpPrefixTextField)
|
||||
}
|
||||
// find saved password
|
||||
if let (username, password) = try? KeychainAccess.read(username: nil, forService: .httpAuth, server: host, port: url.port) {
|
||||
usernameField.stringValue = username
|
||||
passwordField.stringValue = password
|
||||
} else {
|
||||
usernameField.stringValue = ""
|
||||
passwordField.stringValue = ""
|
||||
}
|
||||
} else {
|
||||
urlField.textColor = .systemRed
|
||||
errorMessageLabel.isHidden = false
|
||||
urlStackView.setVisibilityPriority(.notVisible, for: httpPrefixTextField)
|
||||
openButton.isEnabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class KeychainAccess {
|
||||
enum KeychainError: Error {
|
||||
case noResult
|
||||
case unhandledError(message: String)
|
||||
case unexpectedData
|
||||
}
|
||||
|
||||
struct ServiceName: RawRepresentable {
|
||||
typealias RawValue = String
|
||||
var rawValue: String
|
||||
|
||||
init(rawValue: String) {
|
||||
self.rawValue = rawValue
|
||||
}
|
||||
|
||||
init(_ rawValue: String) {
|
||||
self.init(rawValue: rawValue)
|
||||
}
|
||||
|
||||
static let openSubAccount = ServiceName(rawValue: "IINA OpenSubtitles Account")
|
||||
static let httpAuth = ServiceName(rawValue: "IINA Saved HTTP Password")
|
||||
}
|
||||
|
||||
static func write(username: String, password: String, forService serviceName: ServiceName, server: String? = nil, port: Int? = nil) throws {
|
||||
let status: OSStatus
|
||||
|
||||
if let _ = try? read(username: username, forService: serviceName, server: nil, port: nil) {
|
||||
// if password exists, try to update the password
|
||||
var query: [String: Any] = [kSecAttrService as String: serviceName.rawValue]
|
||||
if let server { query[kSecAttrServer as String] = server }
|
||||
if let port { query[kSecAttrPort as String] = port }
|
||||
query[kSecClass as String] = server == nil && port == nil ? kSecClassGenericPassword : kSecClassInternetPassword
|
||||
|
||||
// create attributes for updating
|
||||
let passwordData = password.data(using: String.Encoding.utf8)!
|
||||
let attributes: [String: Any] = [kSecAttrAccount as String: username,
|
||||
kSecValueData as String: passwordData]
|
||||
// update
|
||||
status = SecItemUpdate(query as CFDictionary, attributes as CFDictionary)
|
||||
|
||||
} else {
|
||||
// try to write the password
|
||||
var query: [String: Any] = [kSecAttrService as String: serviceName.rawValue,
|
||||
kSecAttrLabel as String: serviceName.rawValue,
|
||||
kSecAttrAccount as String: username,
|
||||
kSecValueData as String: password]
|
||||
if let server { query[kSecAttrServer as String] = server }
|
||||
if let port { query[kSecAttrPort as String] = port }
|
||||
query[kSecClass as String] = server == nil && port == nil ? kSecClassGenericPassword : kSecClassInternetPassword
|
||||
|
||||
status = SecItemAdd(query as CFDictionary, nil)
|
||||
}
|
||||
|
||||
// check result
|
||||
guard status != errSecItemNotFound else { throw KeychainError.noResult }
|
||||
guard status == errSecSuccess else {
|
||||
let message = (SecCopyErrorMessageString(status, nil) as String?) ?? ""
|
||||
throw KeychainError.unhandledError(message: message)
|
||||
}
|
||||
}
|
||||
|
||||
static func read(username: String?, forService serviceName: ServiceName, server: String? = nil, port: Int? = nil) throws -> (username: String, password: String) {
|
||||
var query: [String: Any] = [kSecAttrService as String: serviceName.rawValue,
|
||||
kSecMatchLimit as String: kSecMatchLimitOne,
|
||||
kSecReturnAttributes as String: true,
|
||||
kSecReturnData as String: true]
|
||||
if let username { query[kSecAttrAccount as String] = username }
|
||||
if let server { query[kSecAttrServer as String] = server }
|
||||
if let port { query[kSecAttrPort as String] = port }
|
||||
|
||||
query[kSecClass as String] = server == nil && port == nil ? kSecClassGenericPassword : kSecClassInternetPassword
|
||||
|
||||
// initiate the search
|
||||
var item: CFTypeRef?
|
||||
let status = SecItemCopyMatching(query as CFDictionary, &item)
|
||||
guard status != errSecItemNotFound else { throw KeychainError.noResult }
|
||||
guard status == errSecSuccess else {
|
||||
let message = (SecCopyErrorMessageString(status, nil) as String?) ?? ""
|
||||
throw KeychainError.unhandledError(message: message)
|
||||
}
|
||||
|
||||
// get data
|
||||
guard let existingItem = item as? [String: Any],
|
||||
let passwordData = existingItem[kSecValueData as String] as? Data,
|
||||
let password = String(data: passwordData, encoding: String.Encoding.utf8),
|
||||
let account = existingItem[kSecAttrAccount as String] as? String
|
||||
else {
|
||||
throw KeychainError.unexpectedData
|
||||
}
|
||||
return (account, password)
|
||||
}
|
||||
}
|
||||
|
||||
enum Utility {
|
||||
static func showAlert(_ key: String, comment: String? = nil, arguments: [CVarArg]? = nil, style: NSAlert.Style = .critical, sheetWindow: NSWindow? = nil) {
|
||||
let alert = NSAlert()
|
||||
switch style {
|
||||
case .critical:
|
||||
alert.messageText = NSLocalizedString("alert.title_error", comment: "Error")
|
||||
case .informational:
|
||||
alert.messageText = NSLocalizedString("alert.title_info", comment: "Information")
|
||||
case .warning:
|
||||
alert.messageText = NSLocalizedString("alert.title_warning", comment: "Warning")
|
||||
@unknown default:
|
||||
break
|
||||
}
|
||||
|
||||
var format: String
|
||||
if let stringComment = comment {
|
||||
format = NSLocalizedString("alert." + key, comment: stringComment)
|
||||
} else {
|
||||
format = NSLocalizedString("alert." + key, comment: key)
|
||||
}
|
||||
|
||||
if let stringArguments = arguments {
|
||||
alert.informativeText = String(format: format, arguments: stringArguments)
|
||||
} else {
|
||||
alert.informativeText = String(format: format)
|
||||
}
|
||||
|
||||
alert.alertStyle = style
|
||||
if let sheetWindow {
|
||||
alert.beginSheetModal(for: sheetWindow)
|
||||
} else {
|
||||
alert.runModal()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension CharacterSet {
|
||||
static let urlAllowed: CharacterSet = {
|
||||
var set = CharacterSet.urlHostAllowed
|
||||
.union(.urlUserAllowed)
|
||||
.union(.urlPasswordAllowed)
|
||||
.union(.urlPathAllowed)
|
||||
.union(.urlQueryAllowed)
|
||||
.union(.urlFragmentAllowed)
|
||||
set.insert(charactersIn: "%")
|
||||
return set
|
||||
}()
|
||||
}
|
||||
@@ -0,0 +1,246 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||
<dependencies>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14460.31"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<customObject id="-2" userLabel="File's Owner" customClass="OpenURLWindowController" customModule="IINA" customModuleProvider="target">
|
||||
<connections>
|
||||
<outlet property="errorMessageLabel" destination="cCl-dx-rAP" id="PsQ-Xc-fWf"/>
|
||||
<outlet property="httpPrefixTextField" destination="eo6-z2-yqh" id="vac-xq-4hq"/>
|
||||
<outlet property="openButton" destination="bUw-Ua-E9U" id="8la-Az-aOD"/>
|
||||
<outlet property="passwordField" destination="P8y-xt-YCV" id="luf-wj-Kmt"/>
|
||||
<outlet property="rememberPasswordCheckBox" destination="NkO-nb-bTI" id="XRU-d9-JbB"/>
|
||||
<outlet property="urlField" destination="H7k-7S-pad" id="Jz2-kb-EOh"/>
|
||||
<outlet property="urlStackView" destination="cWl-pb-Ohf" id="Iuw-dG-7Yj"/>
|
||||
<outlet property="usernameField" destination="AAr-OR-upR" id="Cq4-BP-oaE"/>
|
||||
<outlet property="window" destination="F0z-JX-Cv5" id="gIp-Ho-8D9"/>
|
||||
</connections>
|
||||
</customObject>
|
||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||
<window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" titlebarAppearsTransparent="YES" id="F0z-JX-Cv5">
|
||||
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES" fullSizeContentView="YES"/>
|
||||
<windowCollectionBehavior key="collectionBehavior" fullScreenNone="YES"/>
|
||||
<rect key="contentRect" x="1062" y="556" width="576" height="270"/>
|
||||
<rect key="screenRect" x="0.0" y="0.0" width="3840" height="1057"/>
|
||||
<view key="contentView" wantsLayer="YES" misplaced="YES" id="se5-gp-TjO">
|
||||
<rect key="frame" x="0.0" y="0.0" width="576" height="270"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<visualEffectView appearanceType="inheritedVibrantLight" blendingMode="behindWindow" material="underWindowBackground" state="active" translatesAutoresizingMaskIntoConstraints="NO" id="X1z-XY-que">
|
||||
<rect key="frame" x="0.0" y="0.0" width="579" height="256"/>
|
||||
<subviews>
|
||||
<stackView distribution="fill" orientation="horizontal" alignment="top" spacing="4" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="cWl-pb-Ohf">
|
||||
<rect key="frame" x="16" y="216" width="547" height="24"/>
|
||||
<subviews>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="eo6-z2-yqh">
|
||||
<rect key="frame" x="-2" y="0.0" width="59" height="24"/>
|
||||
<textFieldCell key="cell" lineBreakMode="clipping" title="http://" id="kqT-tD-Wzp">
|
||||
<font key="font" metaFont="system" size="20"/>
|
||||
<color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="H7k-7S-pad">
|
||||
<rect key="frame" x="57" y="0.0" width="492" height="24"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" focusRingType="none" placeholderString="Please enter the URL here……" id="XV7-VP-Ua2">
|
||||
<font key="font" metaFont="system" size="20"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
<connections>
|
||||
<outlet property="nextKeyView" destination="AAr-OR-upR" id="ffa-tn-kzC"/>
|
||||
</connections>
|
||||
</textField>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="24" id="oA2-k7-DLz"/>
|
||||
</constraints>
|
||||
<visibilityPriorities>
|
||||
<integer value="1000"/>
|
||||
<integer value="1000"/>
|
||||
</visibilityPriorities>
|
||||
<customSpacing>
|
||||
<real value="3.4028234663852886e+38"/>
|
||||
<real value="3.4028234663852886e+38"/>
|
||||
</customSpacing>
|
||||
</stackView>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="bUw-Ua-E9U">
|
||||
<rect key="frame" x="496" y="9" width="73" height="32"/>
|
||||
<buttonCell key="cell" type="push" title="Open" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="8sC-lH-DOd">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
<string key="keyEquivalent" base64-UTF8="YES">
|
||||
DQ
|
||||
</string>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="openBtnAction:" target="-2" id="Kjc-7q-M9P"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="B9e-iq-atc">
|
||||
<rect key="frame" x="418" y="9" width="82" height="32"/>
|
||||
<buttonCell key="cell" type="push" title="Cancel" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="iNG-ee-EW6">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
<string key="keyEquivalent" base64-UTF8="YES">
|
||||
Gw
|
||||
</string>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="cancelBtnAction:" target="-2" id="EhB-pE-plk"/>
|
||||
</connections>
|
||||
</button>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="atI-YI-EWn">
|
||||
<rect key="frame" x="22" y="175" width="139" height="17"/>
|
||||
<textFieldCell key="cell" lineBreakMode="clipping" title="HTTP Authentication" id="wxH-ic-Uug">
|
||||
<font key="font" metaFont="systemBold"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField hidden="YES" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="cCl-dx-rAP">
|
||||
<rect key="frame" x="14" y="198" width="78" height="14"/>
|
||||
<textFieldCell key="cell" controlSize="small" lineBreakMode="clipping" title="URL is invalid." id="gaI-DT-l2c">
|
||||
<font key="font" metaFont="smallSystem"/>
|
||||
<color key="textColor" name="systemRedColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<box title="Box" titlePosition="noTitle" translatesAutoresizingMaskIntoConstraints="NO" id="qud-MM-CKm">
|
||||
<rect key="frame" x="21" y="57" width="537" height="112"/>
|
||||
<view key="contentView" id="UGp-0p-kT0">
|
||||
<rect key="frame" x="3" y="3" width="531" height="106"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="EO0-B1-NEj">
|
||||
<rect key="frame" x="14" y="76" width="58" height="14"/>
|
||||
<textFieldCell key="cell" controlSize="small" lineBreakMode="clipping" title="Username" id="Q1z-9O-n4X">
|
||||
<font key="font" metaFont="smallSystem"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="11C-SC-jkc">
|
||||
<rect key="frame" x="270" y="76" width="55" height="14"/>
|
||||
<textFieldCell key="cell" controlSize="small" lineBreakMode="clipping" title="Password" id="uM6-Bp-Wdk">
|
||||
<font key="font" metaFont="smallSystem"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="AAr-OR-upR">
|
||||
<rect key="frame" x="16" y="46" width="240" height="22"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" id="i6U-Vn-OMz">
|
||||
<font key="font" usesAppearanceFont="YES"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<secureTextField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="P8y-xt-YCV">
|
||||
<rect key="frame" x="272" y="46" width="239" height="22"/>
|
||||
<secureTextFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" id="ub0-4i-uZc">
|
||||
<font key="font" usesAppearanceFont="YES"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
<allowedInputSourceLocales>
|
||||
<string>NSAllRomanInputSourcesLocaleIdentifier</string>
|
||||
</allowedInputSourceLocales>
|
||||
</secureTextFieldCell>
|
||||
<connections>
|
||||
<outlet property="nextKeyView" destination="AAr-OR-upR" id="ilu-Y6-atZ"/>
|
||||
</connections>
|
||||
</secureTextField>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="NkO-nb-bTI">
|
||||
<rect key="frame" x="14" y="14" width="386" height="18"/>
|
||||
<buttonCell key="cell" type="check" title="Remember username and password for this host in keychain" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="m0D-hR-3pr">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="NkO-nb-bTI" firstAttribute="top" secondItem="AAr-OR-upR" secondAttribute="bottom" constant="16" id="7bM-Z7-MN0"/>
|
||||
<constraint firstItem="AAr-OR-upR" firstAttribute="leading" secondItem="UGp-0p-kT0" secondAttribute="leading" constant="16" id="DBS-ij-CMO"/>
|
||||
<constraint firstItem="AAr-OR-upR" firstAttribute="width" secondItem="P8y-xt-YCV" secondAttribute="width" id="EWq-rn-Tc4"/>
|
||||
<constraint firstItem="P8y-xt-YCV" firstAttribute="top" secondItem="11C-SC-jkc" secondAttribute="bottom" constant="8" id="G6n-UA-M3G"/>
|
||||
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="11C-SC-jkc" secondAttribute="trailing" id="JBv-3h-ccU"/>
|
||||
<constraint firstItem="NkO-nb-bTI" firstAttribute="leading" secondItem="UGp-0p-kT0" secondAttribute="leading" constant="16" id="MEN-Re-ZwA"/>
|
||||
<constraint firstItem="P8y-xt-YCV" firstAttribute="firstBaseline" secondItem="AAr-OR-upR" secondAttribute="firstBaseline" id="NS4-ko-SBG"/>
|
||||
<constraint firstItem="P8y-xt-YCV" firstAttribute="leading" secondItem="AAr-OR-upR" secondAttribute="trailing" constant="16" id="QZ0-cA-UwK"/>
|
||||
<constraint firstItem="11C-SC-jkc" firstAttribute="leading" secondItem="P8y-xt-YCV" secondAttribute="leading" id="Qm5-U1-Myz"/>
|
||||
<constraint firstItem="AAr-OR-upR" firstAttribute="top" secondItem="EO0-B1-NEj" secondAttribute="bottom" constant="8" id="RpX-3v-vz3"/>
|
||||
<constraint firstAttribute="trailing" secondItem="P8y-xt-YCV" secondAttribute="trailing" constant="20" id="bqw-9o-Sn0"/>
|
||||
<constraint firstItem="11C-SC-jkc" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="EO0-B1-NEj" secondAttribute="trailing" constant="16" id="hHV-3B-aTI"/>
|
||||
<constraint firstItem="EO0-B1-NEj" firstAttribute="leading" secondItem="AAr-OR-upR" secondAttribute="leading" id="rIg-rF-XAc"/>
|
||||
<constraint firstAttribute="bottom" secondItem="NkO-nb-bTI" secondAttribute="bottom" constant="16" id="rKX-Pt-Q3E"/>
|
||||
<constraint firstItem="EO0-B1-NEj" firstAttribute="top" secondItem="UGp-0p-kT0" secondAttribute="top" constant="16" id="sOH-7L-hej"/>
|
||||
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="NkO-nb-bTI" secondAttribute="trailing" constant="16" id="zZN-Rr-lcH"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</box>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="atI-YI-EWn" firstAttribute="leading" secondItem="X1z-XY-que" secondAttribute="leading" constant="24" id="140-si-az8"/>
|
||||
<constraint firstItem="cWl-pb-Ohf" firstAttribute="leading" secondItem="X1z-XY-que" secondAttribute="leading" constant="16" id="NDt-VE-GP3"/>
|
||||
<constraint firstItem="atI-YI-EWn" firstAttribute="top" secondItem="cWl-pb-Ohf" secondAttribute="bottom" constant="24" id="NeK-m3-nZS"/>
|
||||
<constraint firstAttribute="trailing" secondItem="qud-MM-CKm" secondAttribute="trailing" constant="24" id="OZq-1f-H6w"/>
|
||||
<constraint firstAttribute="bottom" secondItem="bUw-Ua-E9U" secondAttribute="bottom" constant="16" id="SQO-h2-ADL"/>
|
||||
<constraint firstAttribute="trailing" secondItem="bUw-Ua-E9U" secondAttribute="trailing" constant="16" id="UXp-Iy-h0A"/>
|
||||
<constraint firstItem="cCl-dx-rAP" firstAttribute="leading" secondItem="cWl-pb-Ohf" secondAttribute="leading" id="YfV-XA-IcB"/>
|
||||
<constraint firstItem="B9e-iq-atc" firstAttribute="firstBaseline" secondItem="bUw-Ua-E9U" secondAttribute="firstBaseline" id="aJP-wq-LQf"/>
|
||||
<constraint firstItem="qud-MM-CKm" firstAttribute="top" secondItem="atI-YI-EWn" secondAttribute="bottom" constant="8" id="aSE-Zk-ndp"/>
|
||||
<constraint firstItem="cCl-dx-rAP" firstAttribute="top" secondItem="cWl-pb-Ohf" secondAttribute="bottom" constant="4" id="gfM-Cv-7gx"/>
|
||||
<constraint firstItem="cCl-dx-rAP" firstAttribute="trailing" relation="lessThanOrEqual" secondItem="cWl-pb-Ohf" secondAttribute="trailing" id="hCS-RN-v0g"/>
|
||||
<constraint firstItem="bUw-Ua-E9U" firstAttribute="top" secondItem="qud-MM-CKm" secondAttribute="bottom" constant="24" id="mk1-1P-FBY"/>
|
||||
<constraint firstItem="qud-MM-CKm" firstAttribute="leading" secondItem="X1z-XY-que" secondAttribute="leading" constant="24" id="qlr-tB-eyb"/>
|
||||
<constraint firstItem="cWl-pb-Ohf" firstAttribute="top" secondItem="X1z-XY-que" secondAttribute="top" constant="16" id="sWy-6R-ljD"/>
|
||||
<constraint firstItem="B9e-iq-atc" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="X1z-XY-que" secondAttribute="leading" constant="16" id="spF-kB-s1L"/>
|
||||
<constraint firstItem="bUw-Ua-E9U" firstAttribute="leading" secondItem="B9e-iq-atc" secondAttribute="trailing" constant="8" id="tNl-gV-uSX"/>
|
||||
<constraint firstAttribute="trailing" secondItem="cWl-pb-Ohf" secondAttribute="trailing" constant="16" id="y1Z-e7-Gjk"/>
|
||||
</constraints>
|
||||
</visualEffectView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="X1z-XY-que" secondAttribute="trailing" id="Eyf-vR-YrS"/>
|
||||
<constraint firstAttribute="bottom" secondItem="X1z-XY-que" secondAttribute="bottom" id="T34-vK-ECf"/>
|
||||
<constraint firstItem="X1z-XY-que" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" id="Zzo-7D-h9G"/>
|
||||
<constraint firstItem="X1z-XY-que" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" id="e5q-Il-ITO"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<connections>
|
||||
<outlet property="delegate" destination="-2" id="0bl-1N-AYu"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="158" y="171"/>
|
||||
</window>
|
||||
<secureTextField verticalHuggingPriority="750" id="a3w-Hu-aMP">
|
||||
<rect key="frame" x="0.0" y="0.0" width="96" height="22"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<secureTextFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" usesSingleLineMode="YES" id="o6r-Zv-w8b">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
<allowedInputSourceLocales>
|
||||
<string>NSAllRomanInputSourcesLocaleIdentifier</string>
|
||||
</allowedInputSourceLocales>
|
||||
</secureTextFieldCell>
|
||||
<point key="canvasLocation" x="194" y="425"/>
|
||||
</secureTextField>
|
||||
<secureTextField verticalHuggingPriority="750" id="hjA-b6-vjs">
|
||||
<rect key="frame" x="0.0" y="0.0" width="96" height="22"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<secureTextFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" usesSingleLineMode="YES" id="BAX-zD-Sub">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
<allowedInputSourceLocales>
|
||||
<string>NSAllRomanInputSourcesLocaleIdentifier</string>
|
||||
</allowedInputSourceLocales>
|
||||
</secureTextFieldCell>
|
||||
<point key="canvasLocation" x="113" y="428"/>
|
||||
</secureTextField>
|
||||
</objects>
|
||||
</document>
|
||||
@@ -0,0 +1,52 @@
|
||||
//
|
||||
// ViewController.swift
|
||||
// demo-macOS
|
||||
//
|
||||
// Created by kintan on 2018/5/24.
|
||||
// Copyright © 2018年 kintan. All rights reserved.
|
||||
//
|
||||
|
||||
import AppKit
|
||||
import KSPlayer
|
||||
|
||||
class ViewController: NSViewController {
|
||||
private let playerView = MacVideoPlayerView()
|
||||
var url: URL? {
|
||||
didSet {
|
||||
if let url {
|
||||
let res0 = KSPlayerResourceDefinition(url: url, definition: "高清", options: KSOptions())
|
||||
let asset = KSPlayerResource(name: url.lastPathComponent, definitions: [res0], cover: URL(string: "https://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Big_buck_bunny_poster_big.jpg/848px-Big_buck_bunny_poster_big.jpg"))
|
||||
playerView.set(resource: asset)
|
||||
} else {
|
||||
playerView.resetPlayer()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
init() {
|
||||
super.init(nibName: nil, bundle: nil)
|
||||
}
|
||||
|
||||
@available(*, unavailable)
|
||||
required init?(coder _: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
view.addSubview(playerView)
|
||||
playerView.translatesAutoresizingMaskIntoConstraints = false
|
||||
NSLayoutConstraint.activate([
|
||||
playerView.topAnchor.constraint(equalTo: view.topAnchor),
|
||||
playerView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
||||
playerView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
||||
playerView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
||||
])
|
||||
}
|
||||
|
||||
override var representedObject: Any? {
|
||||
didSet {
|
||||
// Update the view, if already loaded.
|
||||
}
|
||||
}
|
||||
}
|
||||
19
KSPlayer-main/Demo/demo-macOS/demo-macOS/ViewController.xib
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="11134" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11134"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<customObject id="-2" userLabel="File's Owner" customClass="ViewController" customModuleProvider="target">
|
||||
<connections>
|
||||
<outlet property="view" destination="Hz6-mo-xeY" id="0bl-1N-x8E"/>
|
||||
</connections>
|
||||
</customObject>
|
||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||
<customView id="Hz6-mo-xeY">
|
||||
<rect key="frame" x="0.0" y="0.0" width="480" height="272"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
</customView>
|
||||
</objects>
|
||||
</document>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict/>
|
||||
</plist>
|
||||
415
KSPlayer-main/Demo/demo-tvOS/demo-tvOS.xcodeproj/project.pbxproj
Normal file
@@ -0,0 +1,415 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 54;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
4F8BF0EAD4FD485055852FBD /* Pods_demo_tvOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F227C20AECAAE8524D2F0F1D /* Pods_demo_tvOS.framework */; };
|
||||
AC08611F20B69A1C00D801FC /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = AC08611E20B69A1C00D801FC /* Assets.xcassets */; };
|
||||
AC3A420223D32DFE00B666A4 /* MasterViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC3A41FE23D32DFD00B666A4 /* MasterViewController.swift */; };
|
||||
AC3A420323D32DFE00B666A4 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC3A41FF23D32DFE00B666A4 /* AppDelegate.swift */; };
|
||||
AC3A420423D32DFE00B666A4 /* DetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC3A420023D32DFE00B666A4 /* DetailViewController.swift */; };
|
||||
AC3A420523D32DFE00B666A4 /* AudioViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC3A420123D32DFE00B666A4 /* AudioViewController.swift */; };
|
||||
AC78D5DC2B09057900A28998 /* test.m3u in Resources */ = {isa = PBXBuildFile; fileRef = AC78D5DB2B09057900A28998 /* test.m3u */; };
|
||||
AC80333224BA1B54002B3D40 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AC80333124BA1B54002B3D40 /* Main.storyboard */; };
|
||||
ACBBA9802A8503F400D262FC /* RootViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ACBBA97F2A8503F400D262FC /* RootViewController.swift */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
055202483CC6922E098C6565 /* Pods-demo-tvOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-demo-tvOS.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-demo-tvOS/Pods-demo-tvOS.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
AC08611420B69A1C00D801FC /* demo-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "demo-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
AC08611E20B69A1C00D801FC /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
AC08612020B69A1C00D801FC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
AC3A41FE23D32DFD00B666A4 /* MasterViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = MasterViewController.swift; path = "../../demo-iOS/demo-iOS/MasterViewController.swift"; sourceTree = "<group>"; };
|
||||
AC3A41FF23D32DFE00B666A4 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = "../../demo-iOS/demo-iOS/AppDelegate.swift"; sourceTree = "<group>"; };
|
||||
AC3A420023D32DFE00B666A4 /* DetailViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = DetailViewController.swift; path = "../../demo-iOS/demo-iOS/DetailViewController.swift"; sourceTree = "<group>"; };
|
||||
AC3A420123D32DFE00B666A4 /* AudioViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AudioViewController.swift; path = "../../demo-iOS/demo-iOS/AudioViewController.swift"; sourceTree = "<group>"; };
|
||||
AC78D5DB2B09057900A28998 /* test.m3u */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = test.m3u; path = ../../../Tests/KSPlayerTests/Resources/test.m3u; sourceTree = "<group>"; };
|
||||
AC80333124BA1B54002B3D40 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = "<group>"; };
|
||||
ACBBA97F2A8503F400D262FC /* RootViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = RootViewController.swift; path = "../../demo-iOS/demo-iOS/RootViewController.swift"; sourceTree = "<group>"; };
|
||||
D4B47B55C1204959E7C6D995 /* Pods-demo-tvOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-demo-tvOS.release.xcconfig"; path = "../Pods/Target Support Files/Pods-demo-tvOS/Pods-demo-tvOS.release.xcconfig"; sourceTree = "<group>"; };
|
||||
F227C20AECAAE8524D2F0F1D /* Pods_demo_tvOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_demo_tvOS.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
AC08611120B69A1C00D801FC /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
4F8BF0EAD4FD485055852FBD /* Pods_demo_tvOS.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
AC08610B20B69A1C00D801FC = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
AC08611620B69A1C00D801FC /* demo-tvOS */,
|
||||
AC08611520B69A1C00D801FC /* Products */,
|
||||
CF87FE6837F03B47FBE2E033 /* Pods */,
|
||||
EF7E5CCE0EBCE2DEEC5EF789 /* Frameworks */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
AC08611520B69A1C00D801FC /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
AC08611420B69A1C00D801FC /* demo-tvOS.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
AC08611620B69A1C00D801FC /* demo-tvOS */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
AC3A41FF23D32DFE00B666A4 /* AppDelegate.swift */,
|
||||
ACBBA97F2A8503F400D262FC /* RootViewController.swift */,
|
||||
AC3A420123D32DFE00B666A4 /* AudioViewController.swift */,
|
||||
AC3A420023D32DFE00B666A4 /* DetailViewController.swift */,
|
||||
AC3A41FE23D32DFD00B666A4 /* MasterViewController.swift */,
|
||||
AC78D5DB2B09057900A28998 /* test.m3u */,
|
||||
AC08611E20B69A1C00D801FC /* Assets.xcassets */,
|
||||
AC80333124BA1B54002B3D40 /* Main.storyboard */,
|
||||
AC08612020B69A1C00D801FC /* Info.plist */,
|
||||
);
|
||||
path = "demo-tvOS";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
CF87FE6837F03B47FBE2E033 /* Pods */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
055202483CC6922E098C6565 /* Pods-demo-tvOS.debug.xcconfig */,
|
||||
D4B47B55C1204959E7C6D995 /* Pods-demo-tvOS.release.xcconfig */,
|
||||
);
|
||||
name = Pods;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
EF7E5CCE0EBCE2DEEC5EF789 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
F227C20AECAAE8524D2F0F1D /* Pods_demo_tvOS.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
AC08611320B69A1C00D801FC /* demo-tvOS */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = AC08613920B69A1D00D801FC /* Build configuration list for PBXNativeTarget "demo-tvOS" */;
|
||||
buildPhases = (
|
||||
A099CE7BFDF0BA6150CCFFF5 /* [CP] Check Pods Manifest.lock */,
|
||||
AC08611020B69A1C00D801FC /* Sources */,
|
||||
AC08611120B69A1C00D801FC /* Frameworks */,
|
||||
AC08611220B69A1C00D801FC /* Resources */,
|
||||
78093281A353CB2BE6C24961 /* [CP] Copy Pods Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "demo-tvOS";
|
||||
productName = "demo-tvOS";
|
||||
productReference = AC08611420B69A1C00D801FC /* demo-tvOS.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
AC08610C20B69A1C00D801FC /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
BuildIndependentTargetsInParallel = YES;
|
||||
LastSwiftUpdateCheck = 0930;
|
||||
LastUpgradeCheck = 1500;
|
||||
ORGANIZATIONNAME = kintan;
|
||||
TargetAttributes = {
|
||||
AC08611320B69A1C00D801FC = {
|
||||
CreatedOnToolsVersion = 9.3.1;
|
||||
LastSwiftMigration = 1130;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = AC08610F20B69A1C00D801FC /* Build configuration list for PBXProject "demo-tvOS" */;
|
||||
compatibilityVersion = "Xcode 11.0";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = AC08610B20B69A1C00D801FC;
|
||||
productRefGroup = AC08611520B69A1C00D801FC /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
AC08611320B69A1C00D801FC /* demo-tvOS */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
AC08611220B69A1C00D801FC /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
AC80333224BA1B54002B3D40 /* Main.storyboard in Resources */,
|
||||
AC78D5DC2B09057900A28998 /* test.m3u in Resources */,
|
||||
AC08611F20B69A1C00D801FC /* Assets.xcassets in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
78093281A353CB2BE6C24961 /* [CP] Copy Pods Resources */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-demo-tvOS/Pods-demo-tvOS-resources-${CONFIGURATION}-input-files.xcfilelist",
|
||||
);
|
||||
name = "[CP] Copy Pods Resources";
|
||||
outputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-demo-tvOS/Pods-demo-tvOS-resources-${CONFIGURATION}-output-files.xcfilelist",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-demo-tvOS/Pods-demo-tvOS-resources.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
A099CE7BFDF0BA6150CCFFF5 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||
"${PODS_ROOT}/Manifest.lock",
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-demo-tvOS-checkManifestLockResult.txt",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
AC08611020B69A1C00D801FC /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
ACBBA9802A8503F400D262FC /* RootViewController.swift in Sources */,
|
||||
AC3A420423D32DFE00B666A4 /* DetailViewController.swift in Sources */,
|
||||
AC3A420523D32DFE00B666A4 /* AudioViewController.swift in Sources */,
|
||||
AC3A420323D32DFE00B666A4 /* AppDelegate.swift in Sources */,
|
||||
AC3A420223D32DFE00B666A4 /* MasterViewController.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
AC08613720B69A1D00D801FC /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = appletvos;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
TVOS_DEPLOYMENT_TARGET = 13.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
AC08613820B69A1D00D801FC /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = appletvos;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
TVOS_DEPLOYMENT_TARGET = 13.0;
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
AC08613A20B69A1D00D801FC /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 055202483CC6922E098C6565 /* Pods-demo-tvOS.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
|
||||
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1.1.1.1;
|
||||
DEVELOPMENT_TEAM = 3RVHT92X9D;
|
||||
INFOPLIST_FILE = "demo-tvOS/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.1.1;
|
||||
OTHER_CODE_SIGN_FLAGS = "--deep";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = kintan.player.demo.tvos;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = 3;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
AC08613B20B69A1D00D801FC /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = D4B47B55C1204959E7C6D995 /* Pods-demo-tvOS.release.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
|
||||
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1.1.1.1;
|
||||
DEVELOPMENT_TEAM = 6A4WSM8YTR;
|
||||
INFOPLIST_FILE = "demo-tvOS/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.1.1;
|
||||
OTHER_CODE_SIGN_FLAGS = "--deep";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = kintan.player.demo.tvos;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = 3;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
AC08610F20B69A1C00D801FC /* Build configuration list for PBXProject "demo-tvOS" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
AC08613720B69A1D00D801FC /* Debug */,
|
||||
AC08613820B69A1D00D801FC /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
AC08613920B69A1D00D801FC /* Build configuration list for PBXNativeTarget "demo-tvOS" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
AC08613A20B69A1D00D801FC /* Debug */,
|
||||
AC08613B20B69A1D00D801FC /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = AC08610C20B69A1C00D801FC /* Project object */;
|
||||
}
|
||||