Compare commits

..

51 Commits

Author SHA1 Message Date
Arkadiusz Fal
41de28a698 Bump build number to 197 2024-11-08 16:29:59 +01:00
Arkadiusz Fal
7baab7a88a Update github actions checkout version 2024-11-08 15:26:55 +01:00
Arkadiusz Fal
43599632b2 Update changelog 2024-11-08 15:20:06 +01:00
Arkadiusz Fal
e4f413ed2d Update packages 2024-11-08 15:20:06 +01:00
Arkadiusz Fal
661b7547c5 Fix application groups 2024-11-08 15:09:59 +01:00
Arkadiusz Fal
d69f410d92 Add Tamil language 2024-11-08 15:07:29 +01:00
Arkadiusz Fal
db7abe31ea Merge pull request #836 from weblate/weblate-yattee-localizable-strings
Translations update from Hosted Weblate
2024-11-08 15:05:22 +01:00
ButterflyOfFire
fff36ece26 Translated using Weblate (Kabyle)
Currently translated at 17.0% (96 of 562 strings)

Translation: Yattee/Localizable.strings
Translate-URL: https://hosted.weblate.org/projects/yattee/localizable-strings/kab/
2024-11-08 14:04:18 +00:00
ButterflyOfFire
8a0e9ae75a Added translation using Weblate (Kabyle) 2024-11-08 14:04:17 +00:00
trilame
d6e5b5ed76 Translated using Weblate (French)
Currently translated at 100.0% (562 of 562 strings)

Translation: Yattee/Localizable.strings
Translate-URL: https://hosted.weblate.org/projects/yattee/localizable-strings/fr/
2024-11-08 14:04:16 +00:00
தமிழ்நேரம்
cef1a1caea Translated using Weblate (Tamil)
Currently translated at 100.0% (562 of 562 strings)

Translation: Yattee/Localizable.strings
Translate-URL: https://hosted.weblate.org/projects/yattee/localizable-strings/ta/
2024-11-08 14:04:16 +00:00
தமிழ்நேரம்
6c6abe8c84 Added translation using Weblate (Tamil) 2024-11-08 14:04:15 +00:00
Istvan Tanczos
9732537602 Translated using Weblate (Hungarian)
Currently translated at 1.0% (6 of 562 strings)

Translation: Yattee/Localizable.strings
Translate-URL: https://hosted.weblate.org/projects/yattee/localizable-strings/hu/
2024-11-08 14:04:15 +00:00
Istvan Tanczos
c0deeabaed Added translation using Weblate (Hungarian) 2024-11-08 14:04:14 +00:00
Arkadiusz Fal
f29dbcbe36 Merge pull request #834 from mmaalo/norwegian100
Norwegian Language
2024-11-08 15:04:05 +01:00
Arkadiusz Fal
c7e1a50e56 Merge pull request #833 from blennster/main
Fix uneven playback when using MPV and not syncing refreshrate
2024-11-08 15:03:51 +01:00
Arkadiusz Fal
dd205db15f Merge pull request #824 from yattee/mpvkit-0-39-0
update MPVKit to v0.39.0
2024-11-08 15:03:18 +01:00
Arkadiusz Fal
9ca5d292ec Merge pull request #820 from yattee/video-details-gestures
add drag gestures to video details
2024-11-08 15:03:07 +01:00
Arkadiusz Fal
748bc16342 Merge pull request #818 from yattee/changes-to-opengl-view
improvements to MPVGLView
2024-11-08 15:02:15 +01:00
Arkadiusz Fal
798d2fc67f Merge pull request #817 from yattee/fix-subtitles
improved subtitle handling
2024-11-08 15:01:56 +01:00
Arkadiusz Fal
a5a88f8890 Merge pull request #815 from yattee/refined-audio-ducking
proper audio interrupt and route change handling
2024-11-08 15:01:27 +01:00
Arkadiusz Fal
f69ccb6bd6 Merge pull request #814 from yattee/fullscreen-gesture-toggle
allow users to disable fullscreen swipe gesture
2024-11-08 15:01:06 +01:00
Arkadiusz Fal
892b3dea17 Merge pull request #813 from yattee/update-introspect
Update SwiftUI-Introspect
2024-11-08 15:00:35 +01:00
mmaalo
9a11e9f9f5 completed Localizable.strings for norwegian language 2024-10-07 21:23:12 +02:00
Emil Blennow
055d5575ba fix uneven playback when using MPV and not syncing refreshrate 2024-10-06 17:32:02 +02:00
Toni Förster
28b6a517b6 update MPVKit to v0.39.0
Signed-off-by: Toni Förster <toni.foerster@gmail.com>
2024-09-24 10:41:02 +02:00
Toni Förster
b4bcd0c0a0 add drag gestures to video details 2024-09-15 20:56:04 +02:00
Toni Förster
e62010d5d5 improvements to MPVGLView
- add Pixel Buffer Object to (PBO)
- add some debug logging
- add scissor testing
- add dirty region checking

Signed-off-by: Toni Förster <toni.foerster@gmail.com>
2024-09-14 15:04:17 +02:00
Toni Förster
3339e8cb1f improved subtitle handling
- fix subtitle disabling not working
- make subtitle adding/removing async
- make subtitle menu non blocking

Signed-off-by: Toni Förster <toni.foerster@gmail.com>
2024-09-14 11:33:12 +02:00
Toni Förster
4855f9bead fix tvOS build
Signed-off-by: Toni Förster <toni.foerster@gmail.com>
2024-09-13 11:48:40 +02:00
Toni Förster
a65ed67751 proper audio interrupt and route change handling
- set AVAudioSession inactive on pause and stop
- handle audio route changes
2024-09-13 11:21:07 +02:00
Toni Förster
72dcbe4515 allow user to disable fullscreen swipe gesture
furthermore, some rewording

Signed-off-by: Toni Förster <toni.foerster@gmail.com>
2024-09-12 16:57:48 +02:00
Toni Förster
7e02b08933 update SwiftUI-Introspect 2024-09-11 20:55:00 +02:00
Arkadiusz Fal
8596ee8811 Bump build number to 196 2024-09-11 09:37:13 +02:00
Arkadiusz Fal
894439ad5e Update CHANGELOG 2024-09-11 09:35:32 +02:00
Arkadiusz Fal
5dad7a1b47 Update dependencies 2024-09-11 09:31:24 +02:00
Arkadiusz Fal
6d48a825cd Merge pull request #809 from yattee/refactor-search
refactor Search
2024-09-11 09:29:43 +02:00
Arkadiusz Fal
ed11e593ff Merge pull request #810 from yattee/auto-retry-video-loading
Retry loading video before presenting error
2024-09-11 09:29:28 +02:00
Arkadiusz Fal
102dfba751 Merge pull request #805 from yattee/mpv-better-performance
MPV: improved A/V sync
2024-09-11 09:29:14 +02:00
Arkadiusz Fal
4202b27c03 Merge pull request #807 from yattee/more-robust-resolution-handling
more robust resolution handling
2024-09-11 09:29:00 +02:00
Arkadiusz Fal
2f937f74fa Merge pull request #806 from yattee/orientation-location-cleanup
Orientation/Fullscreen fixes and cleanup
2024-09-11 09:28:39 +02:00
Toni Förster
34a957b28e use system background color for background
Signed-off-by: Toni Förster <toni.foerster@gmail.com>
2024-09-11 08:55:18 +02:00
Toni Förster
0bef798341 add border around search field
Signed-off-by: Toni Förster <toni.foerster@gmail.com>
2024-09-10 19:01:41 +02:00
Toni Förster
28a7b6e981 auto retry loading the video before showing error
Signed-off-by: Toni Förster <toni.foerster@gmail.com>
2024-09-10 11:07:20 +02:00
Toni Förster
4663aab3da refactor Search
- have a separate body view for each os
- macOS: set navigation title for search
- macOS: set min width to 835 for main content
- macOS: set main window min height to 600
- macOS: don’t have text behind the cancel button
- split SearchTextField into macOS and iOS/tvOS
- iOS: move search menu to the right
- iOS: unified search field
- make min width a constant
- add option to disable search suggestions

Signed-off-by: Toni Förster <toni.foerster@gmail.com>
2024-09-10 09:38:14 +02:00
Toni Förster
0de0445805 check if subtitles are added before removing them
Signed-off-by: Toni Förster <toni.foerster@gmail.com>
2024-09-09 14:18:49 +02:00
Toni Förster
9cb0325503 more robust resolution handling
Currently, we have a hard-coded list of resolutions. Since Invidious reports the actual resolution of a stream and does not hard-code them to a fixed value anymore, resolutions that are not in the list won’t be handled, and the stream cannot be played back.

Instead of hard-coding even more resolutions (and inadvertently might not cover all), we revert the list back to a finite set of resolutions, the users can select from. All other resolutions are handled dynamically and compared to the existing set of defined resolutions when selecting the best stream for playback.

Signed-off-by: Toni Förster <toni.foerster@gmail.com>
2024-09-09 12:59:39 +02:00
Toni Förster
5e85fd294c MPV: improved A/V sync
- use displays refresh rate
- execute needs drawing with higher priority
- run create() with higher priority
- determine the number of threads used for rendering
- enable VSYNC and change video-sync  to display-resample
- iOS/tvOS: set new display refresh rate on change
- run setSize with higher priority
- add more options to MPVClient
- get refresh rate updates
- sync refresh rate to fps
- update CADisplayLink to current refresh rate
- update refresh rate on macOS
- Add experimental feature to sync display  with content fps

Signed-off-by: Toni Förster <toni.foerster@gmail.com>
2024-09-08 15:59:42 +02:00
Toni Förster
b2421da95d apply new fullscreen logic to AppleAVPlayerView
Signed-off-by: Toni Förster <toni.foerster@gmail.com>
2024-09-06 17:13:08 +02:00
Toni Förster
4e4add3c42 fix double rotation
Signed-off-by: Toni Förster <toni.foerster@gmail.com>
2024-09-06 16:47:15 +02:00
Toni Förster
2185718d50 orientation fullscreen code cleanup
Signed-off-by: Toni Förster <toni.foerster@gmail.com>
2024-09-06 15:46:58 +02:00
52 changed files with 2133 additions and 719 deletions

View File

@@ -29,7 +29,7 @@ jobs:
name: Releasing ${{ matrix.lane }} version to TestFlight
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
@@ -53,7 +53,7 @@ jobs:
name: Build and notarize macOS app
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
@@ -86,7 +86,7 @@ jobs:
name: Create GitHub release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: echo "BUILD_NUMBER=$(cat Yattee.xcodeproj/project.pbxproj | grep -m 1 CURRENT_PROJECT_VERSION | cut -d' ' -f3 | sed 's/;//g')" >> $GITHUB_ENV
- run: echo "VERSION_NUMBER=$(cat Yattee.xcodeproj/project.pbxproj | grep -m 1 MARKETING_VERSION | cut -d' ' -f3 | sed 's/;//g')" >> $GITHUB_ENV
- uses: actions/download-artifact@v3

View File

@@ -1,9 +1,17 @@
## Build 195
* iOS: Simplified fullscreen and orientation by @stonerl in https://github.com/yattee/yattee/pull/786
* macOS: only apply player shortcuts when window is active by @stonerl in https://github.com/yattee/yattee/pull/802
* player controls: add background opacity selection by @stonerl in https://github.com/yattee/yattee/pull/799
* add missing Shorts resolutions by @stonerl in https://github.com/yattee/yattee/pull/797
* use -O1 on macOS by @stonerl in https://github.com/yattee/yattee/pull/801
## Build 197
## What's Changed
* Allow users to disable fullscreen swipe gesture by @stonerl in https://github.com/yattee/yattee/pull/814
* Proper audio interrupt and route change handling by @stonerl in https://github.com/yattee/yattee/pull/815
* Improved subtitle handling by @stonerl in https://github.com/yattee/yattee/pull/817
* Improvements to MPVGLView by @stonerl in https://github.com/yattee/yattee/pull/818
* Add drag gestures to video details by @stonerl in https://github.com/yattee/yattee/pull/820
* Fix uneven playback when using MPV and not syncing refreshrate by @blennster in https://github.com/yattee/yattee/pull/833
* Norwegian Language by @mmaalo in https://github.com/yattee/yattee/pull/834
* Translations update from Hosted Weblate by @weblate in https://github.com/yattee/yattee/pull/836
* Update MPVKit to v0.39.0 by @stonerl in https://github.com/yattee/yattee/pull/824
* Update SwiftUI-Introspect by @stonerl in https://github.com/yattee/yattee/pull/813
* Update other packages
## Previous builds
* Add skip, play/pause, and fullscreen shortcuts to macOS player (by @rickykresslein)
@@ -22,6 +30,16 @@
* Add import export of missing settings
* macOS: Fix settings windows layout
* Fix seek OSD layout on tvOS, revert OSD position
* Orientation/Fullscreen fixes and cleanup by @stonerl in https://github.com/yattee/yattee/pull/806
* More robust resolution handling by @stonerl in https://github.com/yattee/yattee/pull/807
* MPV: improved A/V sync by @stonerl in https://github.com/yattee/yattee/pull/805
* Retry loading video before presenting error by @stonerl in https://github.com/yattee/yattee/pull/810
* Refactor Search by @stonerl in https://github.com/yattee/yattee/pull/809
* iOS: Simplified fullscreen and orientation by @stonerl in https://github.com/yattee/yattee/pull/786
* macOS: only apply player shortcuts when window is active by @stonerl in https://github.com/yattee/yattee/pull/802
* player controls: add background opacity selection by @stonerl in https://github.com/yattee/yattee/pull/799
* add missing Shorts resolutions by @stonerl in https://github.com/yattee/yattee/pull/797
* use -O1 on macOS by @stonerl in https://github.com/yattee/yattee/pull/801
* Gestures: swipe up toggles fullscreen by @stonerl in https://github.com/yattee/yattee/pull/778
* dont open video when dismissing context menu by @stonerl in https://github.com/yattee/yattee/pull/780
* mpv: remove video layer when entering background by @stonerl in https://github.com/yattee/yattee/pull/793

View File

@@ -10,20 +10,20 @@ GEM
artifactory (3.0.17)
atomos (0.1.3)
aws-eventstream (1.3.0)
aws-partitions (1.970.0)
aws-sdk-core (3.203.0)
aws-partitions (1.1002.0)
aws-sdk-core (3.212.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-partitions (~> 1, >= 1.992.0)
aws-sigv4 (~> 1.9)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.89.0)
aws-sdk-core (~> 3, >= 3.203.0)
aws-sdk-kms (1.95.0)
aws-sdk-core (~> 3, >= 3.210.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.160.0)
aws-sdk-core (~> 3, >= 3.203.0)
aws-sdk-s3 (1.170.0)
aws-sdk-core (~> 3, >= 3.210.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.5)
aws-sigv4 (1.9.1)
aws-sigv4 (1.10.1)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
base64 (0.2.0)
@@ -38,8 +38,8 @@ GEM
domain_name (0.6.20240107)
dotenv (2.8.1)
emoji_regex (3.2.3)
excon (0.111.0)
faraday (1.10.3)
excon (0.112.0)
faraday (1.10.4)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
@@ -65,10 +65,10 @@ GEM
faraday-patron (1.0.0)
faraday-rack (1.0.0)
faraday-retry (1.0.3)
faraday_middleware (1.2.0)
faraday_middleware (1.2.1)
faraday (~> 1.0)
fastimage (2.3.1)
fastlane (2.222.0)
fastlane (2.225.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0)
@@ -84,6 +84,7 @@ GEM
faraday-cookie_jar (~> 0.0.6)
faraday_middleware (~> 1.0)
fastimage (>= 2.1.0, < 3.0.0)
fastlane-sirp (>= 1.0.0)
gh_inspector (>= 1.1.2, < 2.0.0)
google-apis-androidpublisher_v3 (~> 0.3)
google-apis-playcustomapp_v1 (~> 0.1)
@@ -109,6 +110,8 @@ GEM
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)
fastlane-sirp (1.0.0)
sysrandom (~> 1.0)
gh_inspector (1.1.3)
google-apis-androidpublisher_v3 (0.54.0)
google-apis-core (>= 0.11.0, < 2.a)
@@ -151,17 +154,17 @@ GEM
domain_name (~> 0.5)
httpclient (2.8.3)
jmespath (1.6.2)
json (2.7.2)
jwt (2.8.2)
json (2.8.1)
jwt (2.9.3)
base64
mini_magick (4.13.2)
mini_mime (1.1.5)
multi_json (1.15.0)
multipart-post (2.4.1)
nanaimo (0.3.0)
nanaimo (0.4.0)
naturally (2.2.1)
nkf (0.2.0)
optparse (0.5.0)
optparse (0.6.0)
os (1.1.4)
plist (3.7.1)
public_suffix (6.0.1)
@@ -171,7 +174,7 @@ GEM
trailblazer-option (>= 0.1.1, < 0.2.0)
uber (< 0.2.0)
retriable (3.1.2)
rexml (3.3.7)
rexml (3.3.9)
rouge (2.0.7)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
@@ -184,6 +187,7 @@ GEM
simctl (1.6.10)
CFPropertyList
naturally
sysrandom (1.0.5)
terminal-notifier (2.0.0)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
@@ -193,15 +197,15 @@ GEM
tty-spinner (0.9.3)
tty-cursor (~> 0.7)
uber (0.1.0)
unicode-display_width (2.5.0)
unicode-display_width (2.6.0)
word_wrap (1.0.0)
xcodeproj (1.25.0)
xcodeproj (1.27.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (>= 3.3.2, < 4.0)
nanaimo (~> 0.4.0)
rexml (>= 3.3.6, < 4.0)
xcpretty (0.3.0)
rouge (~> 2.0.7)
xcpretty-travis-formatter (1.0.1)
@@ -209,6 +213,7 @@ GEM
PLATFORMS
arm64-darwin-21
arm64-darwin-24
x86_64-darwin-19
x86_64-darwin-20
x86_64-linux

View File

@@ -515,7 +515,8 @@ final class PeerTubeAPI: Service, ObservableObject, VideosAPI {
.dictionaryValue["files"]?.arrayValue.first?
.dictionaryValue["fileUrl"]?.url
{
streams.append(SingleAssetStream(instance: account.instance, avAsset: AVURLAsset(url: fileURL), resolution: .hd720p30, kind: .stream))
let resolution = Stream.Resolution.predefined(.hd720p30)
streams.append(SingleAssetStream(instance: account.instance, avAsset: AVURLAsset(url: fileURL), resolution: resolution, kind: .stream))
}
return streams

View File

@@ -5,6 +5,7 @@ final class AdvancedSettingsGroupExporter: SettingsGroupExporter {
override var globalJSON: JSON {
[
"showPlayNowInBackendContextMenu": Defaults[.showPlayNowInBackendContextMenu],
"videoLoadingRetryCount": Defaults[.videoLoadingRetryCount],
"showMPVPlaybackStats": Defaults[.showMPVPlaybackStats],
"mpvEnableLogging": Defaults[.mpvEnableLogging],
"mpvCacheSecs": Defaults[.mpvCacheSecs],
@@ -13,6 +14,7 @@ final class AdvancedSettingsGroupExporter: SettingsGroupExporter {
"mpvDeinterlace": Defaults[.mpvDeinterlace],
"mpvHWdec": Defaults[.mpvHWdec],
"mpvDemuxerLavfProbeInfo": Defaults[.mpvDemuxerLavfProbeInfo],
"mpvSetRefreshToContentFPS": Defaults[.mpvSetRefreshToContentFPS],
"mpvInitialAudioSync": Defaults[.mpvInitialAudioSync],
"showCacheStatus": Defaults[.showCacheStatus],
"feedCacheSize": Defaults[.feedCacheSize]

View File

@@ -11,6 +11,7 @@ final class BrowsingSettingsGroupExporter: SettingsGroupExporter {
"favorites": Defaults[.favorites].compactMap { jsonFromString(FavoriteItem.bridge.serialize($0)) },
"widgetsSettings": Defaults[.widgetsSettings].compactMap { widgetSettingsJSON($0) },
"startupSection": Defaults[.startupSection].rawValue,
"showSearchSuggestions": Defaults[.showSearchSuggestions],
"visibleSections": Defaults[.visibleSections].compactMap { $0.rawValue },
"showOpenActionsToolbarItem": Defaults[.showOpenActionsToolbarItem],
"accountPickerDisplaysAnonymousAccounts": Defaults[.accountPickerDisplaysAnonymousAccounts],

View File

@@ -5,6 +5,7 @@ final class ConstrolsSettingsGroupExporter: SettingsGroupExporter {
override var globalJSON: JSON {
[
"avPlayerUsesSystemControls": Defaults[.avPlayerUsesSystemControls],
"fullscreenPlayerGestureEnabled": Defaults[.fullscreenPlayerGestureEnabled],
"horizontalPlayerGestureEnabled": Defaults[.horizontalPlayerGestureEnabled],
"seekGestureSensitivity": Defaults[.seekGestureSensitivity],
"seekGestureSpeed": Defaults[.seekGestureSpeed],

View File

@@ -9,6 +9,10 @@ struct AdvancedSettingsGroupImporter {
Defaults[.showPlayNowInBackendContextMenu] = showPlayNowInBackendContextMenu
}
if let videoLoadingRetryCount = json["videoLoadingRetryCount"].int {
Defaults[.videoLoadingRetryCount] = videoLoadingRetryCount
}
if let showMPVPlaybackStats = json["showMPVPlaybackStats"].bool {
Defaults[.showMPVPlaybackStats] = showMPVPlaybackStats
}
@@ -41,6 +45,10 @@ struct AdvancedSettingsGroupImporter {
Defaults[.mpvDemuxerLavfProbeInfo] = mpvDemuxerLavfProbeInfo
}
if let mpvSetRefreshToContentFPS = json["mpvSetRefreshToContentFPS"].bool {
Defaults[.mpvSetRefreshToContentFPS] = mpvSetRefreshToContentFPS
}
if let mpvInitialAudioSync = json["mpvInitialAudioSync"].bool {
Defaults[.mpvInitialAudioSync] = mpvInitialAudioSync
}

View File

@@ -46,6 +46,10 @@ struct BrowsingSettingsGroupImporter {
Defaults[.startupSection] = startupSection
}
if let showSearchSuggestions = json["showSearchSuggestions"].bool {
Defaults[.showSearchSuggestions] = showSearchSuggestions
}
if let visibleSections = json["visibleSections"].array {
let sections = visibleSections.compactMap { visibleSectionJSON in
if let visibleSectionString = visibleSectionJSON.rawString(options: []),

View File

@@ -9,6 +9,10 @@ struct ConstrolsSettingsGroupImporter {
Defaults[.avPlayerUsesSystemControls] = avPlayerUsesSystemControls
}
if let fullscreenPlayerGestureEnabled = json["fullscreenPlayerGestureEnabled"].bool {
Defaults[.fullscreenPlayerGestureEnabled] = fullscreenPlayerGestureEnabled
}
if let horizontalPlayerGestureEnabled = json["horizontalPlayerGestureEnabled"].bool {
Defaults[.horizontalPlayerGestureEnabled] = horizontalPlayerGestureEnabled
}

View File

@@ -181,7 +181,9 @@ final class AVPlayerBackend: PlayerBackend {
{
seek(to: 0, seekType: .loopRestart)
}
#if !os(macOS)
model.setAudioSessionActive(true)
#endif
avPlayer.play()
// Setting hasStarted to true the first time player started
@@ -196,7 +198,9 @@ final class AVPlayerBackend: PlayerBackend {
guard avPlayer.timeControlStatus != .paused else {
return
}
#if !os(macOS)
model.setAudioSessionActive(false)
#endif
avPlayer.pause()
model.objectWillChange.send()
}
@@ -210,6 +214,9 @@ final class AVPlayerBackend: PlayerBackend {
}
func stop() {
#if !os(macOS)
model.setAudioSessionActive(false)
#endif
avPlayer.replaceCurrentItem(with: nil)
hasStarted = false
}
@@ -364,11 +371,7 @@ final class AVPlayerBackend: PlayerBackend {
let startPlaying = {
#if !os(macOS)
do {
try AVAudioSession.sharedInstance().setActive(true)
} catch {
self.logger.error("Error setting up audio session: \(error)")
}
self.model.setAudioSessionActive(true)
#endif
self.setRate(self.model.currentRate)

View File

@@ -11,6 +11,7 @@ import SwiftUI
final class MPVBackend: PlayerBackend {
static var timeUpdateInterval = 0.5
static var networkStateUpdateInterval = 0.1
static var refreshRateUpdateInterval = 0.5
private var logger = Logger(label: "mpv-backend")
@@ -22,13 +23,14 @@ final class MPVBackend: PlayerBackend {
var stream: Stream?
var video: Video?
var captions: Captions? { didSet {
guard let captions else {
client?.removeSubs()
return
var captions: Captions? {
didSet {
Task {
await handleCaptionsChange()
}
}
addSubTrack(captions.url)
}}
}
var currentTime: CMTime?
var loadedVideo = false
@@ -89,6 +91,7 @@ final class MPVBackend: PlayerBackend {
private var clientTimer: Repeater!
private var networkStateTimer: Repeater!
private var refreshRateTimer: Repeater!
private var onFileLoaded: (() -> Void)?
@@ -184,27 +187,30 @@ final class MPVBackend: PlayerBackend {
}
init() {
// swiftlint:disable shorthand_optional_binding
clientTimer = .init(interval: .seconds(Self.timeUpdateInterval), mode: .infinite) { [weak self] _ in
guard let self = self, self.model.activeBackend == .mpv else {
guard let self, self.model.activeBackend == .mpv else {
return
}
self.getTimeUpdates()
}
networkStateTimer = .init(interval: .seconds(Self.networkStateUpdateInterval), mode: .infinite) { [weak self] _ in
guard let self = self, self.model.activeBackend == .mpv else {
guard let self, self.model.activeBackend == .mpv else {
return
}
self.updateNetworkState()
}
// swiftlint:enable shorthand_optional_binding
refreshRateTimer = .init(interval: .seconds(Self.refreshRateUpdateInterval), mode: .infinite) { [weak self] _ in
guard let self, self.model.activeBackend == .mpv else { return }
self.checkAndUpdateRefreshRate()
}
}
typealias AreInIncreasingOrder = (Stream, Stream) -> Bool
func canPlay(_ stream: Stream) -> Bool {
stream.resolution != .unknown && stream.format != .av1
stream.format != .av1
}
func playStream(_ stream: Stream, of video: Video, preservingTime: Bool, upgrading: Bool) {
@@ -246,11 +252,7 @@ final class MPVBackend: PlayerBackend {
let startPlaying = {
#if !os(macOS)
do {
try AVAudioSession.sharedInstance().setActive(true)
} catch {
self.logger.error("Error setting up audio session: \(error)")
}
self.model.setAudioSessionActive(true)
#endif
DispatchQueue.main.async { [weak self] in
@@ -343,8 +345,20 @@ final class MPVBackend: PlayerBackend {
startClientUpdates()
}
func startRefreshRateUpdates() {
refreshRateTimer.start()
}
func stopRefreshRateUpdates() {
refreshRateTimer.pause()
}
func play() {
#if !os(macOS)
model.setAudioSessionActive(true)
#endif
startClientUpdates()
startRefreshRateUpdates()
if controls.presentingControls {
startControlsUpdates()
@@ -371,7 +385,11 @@ final class MPVBackend: PlayerBackend {
}
func pause() {
#if !os(macOS)
model.setAudioSessionActive(false)
#endif
stopClientUpdates()
stopRefreshRateUpdates()
client?.pause()
isPaused = true
@@ -391,6 +409,11 @@ final class MPVBackend: PlayerBackend {
}
func stop() {
#if !os(macOS)
model.setAudioSessionActive(false)
#endif
stopClientUpdates()
stopRefreshRateUpdates()
client?.stop()
isPlaying = false
isPaused = false
@@ -472,6 +495,52 @@ final class MPVBackend: PlayerBackend {
}
}
private func checkAndUpdateRefreshRate() {
guard let screenRefreshRate = client?.getScreenRefreshRate() else {
logger.warning("Failed to get screen refresh rate.")
return
}
let contentFps = client?.currentContainerFps ?? screenRefreshRate
guard Defaults[.mpvSetRefreshToContentFPS] else {
// If the current refresh rate doesn't match the screen refresh rate, reset it
if client?.currentRefreshRate != screenRefreshRate {
client?.updateRefreshRate(to: screenRefreshRate)
client?.currentRefreshRate = screenRefreshRate
#if !os(macOS)
notifyViewToUpdateDisplayLink(with: screenRefreshRate)
#endif
logger.info("Reset refresh rate to screen's rate: \(screenRefreshRate) Hz")
}
return
}
// Adjust the refresh rate to match the content if it differs
if screenRefreshRate != contentFps {
client?.updateRefreshRate(to: contentFps)
client?.currentRefreshRate = contentFps
#if !os(macOS)
notifyViewToUpdateDisplayLink(with: contentFps)
#endif
logger.info("Adjusted screen refresh rate to match content: \(contentFps) Hz")
} else if client?.currentRefreshRate != screenRefreshRate {
// Ensure the refresh rate is set back to the screen's rate if no adjustment is needed
client?.updateRefreshRate(to: screenRefreshRate)
client?.currentRefreshRate = screenRefreshRate
#if !os(macOS)
notifyViewToUpdateDisplayLink(with: screenRefreshRate)
#endif
logger.info("Checked and reset refresh rate to screen's rate: \(screenRefreshRate) Hz")
}
}
#if !os(macOS)
private func notifyViewToUpdateDisplayLink(with refreshRate: Int) {
NotificationCenter.default.post(name: .updateDisplayLinkFrameRate, object: nil, userInfo: ["refreshRate": refreshRate])
}
#endif
func handle(_ event: UnsafePointer<mpv_event>!) {
logger.info(.init(stringLiteral: "RECEIVED event: \(String(cString: mpv_event_name(event.pointee.event_id)))"))
@@ -552,8 +621,14 @@ final class MPVBackend: PlayerBackend {
}
func addSubTrack(_ url: URL) {
client?.removeSubs()
client?.addSubTrack(url)
Task {
if let areSubtitlesAdded = client?.areSubtitlesAdded {
if await areSubtitlesAdded() {
await client?.removeSubs()
}
}
await client?.addSubTrack(url)
}
}
func setVideoToAuto() {
@@ -617,6 +692,17 @@ final class MPVBackend: PlayerBackend {
}
}
private func handleCaptionsChange() async {
guard let captions else {
if let isSubtitlesAdded = client?.areSubtitlesAdded, await isSubtitlesAdded() {
await client?.removeSubs()
}
return
}
addSubTrack(captions.url)
}
private func handlePropertyChange(_ name: String, _ property: mpv_event_property) {
switch name {
case "pause":

View File

@@ -6,6 +6,8 @@ import Logging
#if !os(macOS)
import Siesta
import UIKit
#else
import AppKit
#endif
final class MPVClient: ObservableObject {
@@ -29,6 +31,7 @@ final class MPVClient: ObservableObject {
var backend: MPVBackend!
var seeking = false
var currentRefreshRate = 60
func create(frame: CGRect? = nil) {
#if !os(macOS)
@@ -39,7 +42,7 @@ final class MPVClient: ObservableObject {
mpv = mpv_create()
if mpv == nil {
print("failed creating context\n")
logger.critical("failed creating context\n")
exit(1)
}
@@ -76,6 +79,29 @@ final class MPVClient: ObservableObject {
checkError(mpv_set_option_string(mpv, "user-agent", UserAgentManager.shared.userAgent))
checkError(mpv_set_option_string(mpv, "initial-audio-sync", Defaults[.mpvInitialAudioSync] ? "yes" : "no"))
// Enable VSYNC needed for `video-sync`
if Defaults[.mpvSetRefreshToContentFPS] {
checkError(mpv_set_option_string(mpv, "opengl-swapinterval", "1"))
checkError(mpv_set_option_string(mpv, "video-sync", "display-resample"))
checkError(mpv_set_option_string(mpv, "interpolation", "yes"))
checkError(mpv_set_option_string(mpv, "tscale", "mitchell"))
checkError(mpv_set_option_string(mpv, "tscale-window", "blackman"))
checkError(mpv_set_option_string(mpv, "vd-lavc-framedrop", "nonref"))
checkError(mpv_set_option_string(mpv, "display-fps-override", "\(String(getScreenRefreshRate()))"))
}
// CPU //
// Determine number of threads based on system core count
let numberOfCores = ProcessInfo.processInfo.processorCount
let threads = numberOfCores * 2
// Log the number of cores and threads
logger.info("Number of CPU cores: \(numberOfCores)")
// Set the number of threads dynamically
checkError(mpv_set_option_string(mpv, "vd-lavc-threads", "\(threads)"))
// GPU //
checkError(mpv_set_option_string(mpv, "hwdec", Defaults[.mpvHWdec]))
@@ -83,7 +109,6 @@ final class MPVClient: ObservableObject {
// We set set everything to OpenGL so MPV doesn't have to probe for other APIs.
checkError(mpv_set_option_string(mpv, "gpu-api", "opengl"))
checkError(mpv_set_option_string(mpv, "opengl-swapinterval", "0"))
#if !os(macOS)
checkError(mpv_set_option_string(mpv, "opengl-es", "yes"))
@@ -114,7 +139,7 @@ final class MPVClient: ObservableObject {
get_proc_address_ctx: nil
)
queue = DispatchQueue(label: "mpv")
queue = DispatchQueue(label: "mpv", qos: .userInteractive, attributes: [.concurrent])
withUnsafeMutablePointer(to: &initParams) { initParams in
var params = [
@@ -124,7 +149,7 @@ final class MPVClient: ObservableObject {
]
if mpv_render_context_create(&mpvGL, mpv, &params) < 0 {
print("failed to initialize mpv GL context")
logger.critical("failed to initialize mpv GL context")
exit(1)
}
@@ -320,6 +345,31 @@ final class MPVClient: ObservableObject {
mpv.isNil ? false : getFlag("eof-reached")
}
var currentContainerFps: Int {
guard !mpv.isNil else { return 30 }
let fps = getDouble("container-fps")
return Int(fps.rounded())
}
func areSubtitlesAdded() async -> Bool {
guard !mpv.isNil else { return false }
let trackCount = await Task(operation: { getInt("track-list/count") }).value
guard trackCount > 0 else { return false }
for index in 0 ..< trackCount {
if let trackType = await Task(operation: { getString("track-list/\(index)/type") }).value, trackType == "sub" {
return true
}
}
return false
}
func logCurrentFps() {
let fps = currentContainerFps
logger.info("Current container FPS: \(fps)")
}
func seek(relative time: CMTime, completionHandler: ((Bool) -> Void)? = nil) {
guard !seeking else {
logger.warning("ignoring seek, another in progress")
@@ -363,7 +413,7 @@ final class MPVClient: ObservableObject {
return
}
DispatchQueue.main.async { [weak self] in
DispatchQueue.main.async(qos: .userInteractive) { [weak self] in
guard let self else { return }
let model = self.backend.model
let aspectRatio = self.aspectRatio > 0 && self.aspectRatio < VideoPlayerView.defaultAspectRatio ? self.aspectRatio : VideoPlayerView.defaultAspectRatio
@@ -442,16 +492,59 @@ final class MPVClient: ObservableObject {
}
}
func updateRefreshRate(to refreshRate: Int) {
setString("display-fps-override", "\(String(refreshRate))")
logger.info("Updated refresh rate during playback to: \(refreshRate) Hz")
}
// Retrieve the screen's current refresh rate dynamically.
func getScreenRefreshRate() -> Int {
var refreshRate = 60 // Default to 60 Hz in case of failure
#if os(macOS)
// macOS implementation using NSScreen
if let screen = NSScreen.main,
let displayID = screen.deviceDescription[NSDeviceDescriptionKey("NSScreenNumber")] as? CGDirectDisplayID,
let mode = CGDisplayCopyDisplayMode(displayID),
mode.refreshRate > 0
{
refreshRate = Int(mode.refreshRate)
logger.info("Screen refresh rate: \(refreshRate) Hz")
} else {
logger.warning("Failed to get refresh rate from NSScreen.")
}
#else
// iOS implementation using UIScreen with a failover
let mainScreen = UIScreen.main
refreshRate = mainScreen.maximumFramesPerSecond
// Failover: if maximumFramesPerSecond is 0 or an unexpected value
if refreshRate <= 0 {
refreshRate = 60 // Fallback to 60 Hz
logger.warning("Failed to get refresh rate from UIScreen, falling back to 60 Hz.")
} else {
logger.info("Screen refresh rate: \(refreshRate) Hz")
}
#endif
currentRefreshRate = refreshRate
return refreshRate
}
func addVideoTrack(_ url: URL) {
command("video-add", args: [url.absoluteString])
}
func addSubTrack(_ url: URL) {
command("sub-add", args: [url.absoluteString])
func addSubTrack(_ url: URL) async {
await Task {
command("sub-add", args: [url.absoluteString])
}.value
}
func removeSubs() {
command("sub-remove")
func removeSubs() async {
await Task {
command("sub-remove")
}.value
}
func setVideoToAuto() {

View File

@@ -153,8 +153,9 @@ extension PlayerBackend {
// Filter out non-HLS streams and streams with resolution more than maxResolution
let nonHLSStreams = streams.filter {
let isHLS = $0.kind == .hls
// Safely unwrap resolution and maxResolution.value to avoid crashes
let isWithinResolution = ($0.resolution != nil && maxResolution.value != nil) ? $0.resolution! <= maxResolution.value! : false
// Check if the stream's resolution is within the maximum allowed resolution
let isWithinResolution = $0.resolution.map { $0 <= maxResolution.value } ?? false
logger.info("Stream ID: \($0.id) - Kind: \(String(describing: $0.kind)) - Resolution: \(String(describing: $0.resolution)) - Bitrate: \($0.bitrate ?? 0)")
logger.info("Is HLS: \(isHLS), Is within resolution: \(isWithinResolution)")
return !isHLS && isWithinResolution
@@ -188,8 +189,8 @@ extension PlayerBackend {
}
let filteredStreams = adjustedStreams.filter { stream in
// Safely unwrap resolution and maxResolution.value to avoid crashes
let isWithinResolution = (stream.resolution != nil && maxResolution.value != nil) ? stream.resolution! <= maxResolution.value! : false
// Check if the stream's resolution is within the maximum allowed resolution
let isWithinResolution = stream.resolution <= maxResolution.value
logger.info("Filtered stream ID: \(stream.id) - Is within max resolution: \(isWithinResolution)")
return isWithinResolution
}

View File

@@ -136,7 +136,9 @@ final class PlayerModel: ObservableObject {
}
}
@Default(.rotateToLandscapeOnEnterFullScreen) private var rotateToLandscapeOnEnterFullScreen
@Default(.rotateToLandscapeOnEnterFullScreen) var rotateToLandscapeOnEnterFullScreen
@Default(.lockPortraitWhenBrowsing) var lockPortraitWhenBrowsing
var fullscreenInitiatedByButton = false
#endif
@Published var currentChapterIndex: Int?
@@ -201,6 +203,9 @@ final class PlayerModel: ObservableObject {
var rateToRestore: Float?
private var remoteCommandCenterConfigured = false
// Used in the PlayerModel extension in PlayerQueue
var retryAttempts = [String: Int]()
#if os(macOS)
var keyPressMonitor: Any?
#endif
@@ -209,7 +214,7 @@ final class PlayerModel: ObservableObject {
#if os(iOS)
isOrientationLocked = Defaults[.isOrientationLocked]
if isOrientationLocked, Defaults[.lockPortraitWhenBrowsing] {
if isOrientationLocked, lockPortraitWhenBrowsing {
lockedOrientation = UIInterfaceOrientationMask.portrait
Orientation.lockOrientation(.portrait, andRotateTo: .portrait)
} else if isOrientationLocked {
@@ -227,6 +232,14 @@ final class PlayerModel: ObservableObject {
name: AVAudioSession.interruptionNotification,
object: nil
)
// Register for audio session route change notifications
NotificationCenter.default.addObserver(
self,
selector: #selector(handleRouteChange(_:)),
name: AVAudioSession.routeChangeNotification,
object: AVAudioSession.sharedInstance()
)
#endif
playbackMode = Defaults[.playbackMode]
@@ -245,7 +258,15 @@ final class PlayerModel: ObservableObject {
#if !os(macOS)
deinit {
NotificationCenter.default.removeObserver(self, name: AVAudioSession.interruptionNotification, object: nil)
NotificationCenter.default.removeObserver(
self, name: AVAudioSession.interruptionNotification, object: nil
)
NotificationCenter.default.removeObserver(
self,
name: AVAudioSession.routeChangeNotification,
object: AVAudioSession.sharedInstance()
)
}
#endif
@@ -532,8 +553,8 @@ final class PlayerModel: ObservableObject {
}
private func handlePresentationChange() {
#if !os(iOS)
// TODO: Check whether this is neede on tvOS and macOS
#if os(macOS)
// TODO: Check whether this is needed on macOS
backend.setNeedsDrawing(presentingPlayer)
#endif
@@ -564,10 +585,10 @@ final class PlayerModel: ObservableObject {
if !presentingPlayer {
#if os(iOS)
if Defaults[.lockPortraitWhenBrowsing] {
if lockPortraitWhenBrowsing {
Orientation.lockOrientation(.portrait, andRotateTo: .portrait)
} else {
Orientation.lockOrientation(.allButUpsideDown)
Orientation.lockOrientation(.all)
}
#endif
}
@@ -821,7 +842,7 @@ final class PlayerModel: ObservableObject {
} else {
isOrientationLocked = false
lockedOrientation = nil
Orientation.lockOrientation(.allButUpsideDown)
Orientation.lockOrientation(.all)
}
}
#endif
@@ -1007,23 +1028,21 @@ final class PlayerModel: ObservableObject {
}
#else
func handleEnterForeground() {
DispatchQueue.global(qos: .userInteractive).async { [weak self] in
guard let self = self else { return }
if !self.musicMode, self.activeBackend == .mpv {
self.mpvBackend.addVideoTrackFromStream()
self.mpvBackend.setVideoToAuto()
self.mpvBackend.controls.resetTimer()
} else if !self.musicMode, self.activeBackend == .appleAVPlayer {
self.avPlayerBackend.bindPlayerToLayer()
}
}
#if os(iOS)
OrientationTracker.shared.startDeviceOrientationTracking()
#endif
#if os(tvOS)
// TODO: Not sure if this is realy needed on tvOS, maybe it can be removed.
setNeedsDrawing(presentingPlayer)
#endif
if !musicMode, activeBackend == .mpv {
mpvBackend.addVideoTrackFromStream()
mpvBackend.setVideoToAuto()
mpvBackend.controls.resetTimer()
} else if !musicMode, activeBackend == .appleAVPlayer {
avPlayerBackend.bindPlayerToLayer()
}
guard closePiPAndOpenPlayerOnEnteringForeground, playingInPictureInPicture else {
return
}
@@ -1149,16 +1168,27 @@ final class PlayerModel: ObservableObject {
#if os(iOS)
if playingFullScreen {
if activeBackend == .appleAVPlayer, avPlayerUsesSystemControls {
fullscreenInitiatedByButton = initiatedByButton
avPlayerBackend.controller.enterFullScreen(animated: true)
return
}
let lockOrientation = rotateToLandscapeOnEnterFullScreen.interfaceOrientation
if currentVideoIsLandscape {
if initiatedByButton {
Orientation.lockOrientation(self.isOrientationLocked ? (lockOrientation == .landscapeRight ? .landscapeRight : .landscapeLeft) : .landscape)
Orientation.lockOrientation(isOrientationLocked
? (lockOrientation == .landscapeRight ? .landscapeRight : .landscapeLeft)
: .landscape)
}
let orientation = OrientationTracker.shared.currentDeviceOrientation.isLandscape ? OrientationTracker.shared.currentInterfaceOrientation : self.rotateToLandscapeOnEnterFullScreen.interfaceOrientation
Orientation.lockOrientation(self.isOrientationLocked ? (lockOrientation == .landscapeRight ? .landscapeRight : .landscapeLeft) : .landscape, andRotateTo: orientation)
let orientation = OrientationTracker.shared.currentDeviceOrientation.isLandscape
? OrientationTracker.shared.currentInterfaceOrientation
: rotateToLandscapeOnEnterFullScreen.interfaceOrientation
Orientation.lockOrientation(
isOrientationLocked
? (lockOrientation == .landscapeRight ? .landscapeRight : .landscapeLeft)
: .all,
andRotateTo: orientation
)
}
} else {
if activeBackend == .appleAVPlayer, avPlayerUsesSystemControls {
@@ -1166,11 +1196,11 @@ final class PlayerModel: ObservableObject {
avPlayerBackend.controller.dismiss(animated: true)
return
}
if Defaults[.lockPortraitWhenBrowsing] {
if lockPortraitWhenBrowsing {
lockedOrientation = UIInterfaceOrientationMask.portrait
}
let rotationOrientation = Defaults[.lockPortraitWhenBrowsing] ? UIInterfaceOrientation.portrait : nil
Orientation.lockOrientation(Defaults[.lockPortraitWhenBrowsing] ? .portrait : .allButUpsideDown, andRotateTo: rotationOrientation)
let rotationOrientation = lockPortraitWhenBrowsing ? UIInterfaceOrientation.portrait : nil
Orientation.lockOrientation(lockPortraitWhenBrowsing ? .portrait : .all, andRotateTo: rotationOrientation)
}
#endif
}
@@ -1262,12 +1292,27 @@ final class PlayerModel: ObservableObject {
}
#if !os(macOS)
func setAudioSessionActive(_ setActive: Bool) {
DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) {
do {
try AVAudioSession.sharedInstance().setActive(setActive)
} catch {
self.logger.error("Error setting up audio session: \(error)")
}
}
}
@objc func handleAudioSessionInterruption(_ notification: Notification) {
logger.info("Audio session interruption received.")
logger.info("Notification received: \(notification)")
logger.info("Notification object: \(String(describing: notification.object))")
guard let info = notification.userInfo,
let typeValue = info[AVAudioSessionInterruptionTypeKey] as? UInt,
guard let info = notification.userInfo else {
logger.info("userInfo is missing in the notification.")
return
}
// Extract the interruption type
guard let typeValue = info[AVAudioSessionInterruptionTypeKey] as? UInt,
let type = AVAudioSession.InterruptionType(rawValue: typeValue)
else {
logger.info("AVAudioSessionInterruptionTypeKey is missing or not a UInt in userInfo.")
@@ -1276,23 +1321,103 @@ final class PlayerModel: ObservableObject {
logger.info("Interruption type received: \(type)")
// Check availability for iOS 14.5 or newer to handle interruption reason
// Currently only for debugging purpose
#if os(iOS)
if #available(iOS 14.5, *) {
// Extract the interruption reason, if available
if let reasonValue = info[AVAudioSessionInterruptionReasonKey] as? UInt,
let reason = AVAudioSession.InterruptionReason(rawValue: reasonValue)
{
logger.info("Interruption reason received: \(reason)")
switch reason {
case .default:
logger.info("Interruption reason: Default or unspecified interruption occurred.")
case .appWasSuspended:
logger.info("Interruption reason: The app was suspended during the interruption.")
@unknown default:
logger.info("Unknown interruption reason received.")
}
} else {
logger.info("AVAudioSessionInterruptionReasonKey is missing or not a UInt in userInfo.")
}
} else {
logger.info("Interruption reason handling is not available on this iOS version.")
}
#endif
// Handle the specific interruption type
switch type {
case .began:
logger.info("Audio session interrupted.")
// We need to call pause() to set all variables correctly, and play()
// directly afterwards, because the .began interrupt is sent after audio
// ducking ended and playback would pause. Audio ducking usually happens
// when using headphones.
pause()
play()
logger.info("Audio session interrupted (began).")
case .ended:
// Extract any interruption options, if available
if let optionsValue = info[AVAudioSessionInterruptionOptionKey] as? UInt {
logger.info("Interruption options received: \(optionsValue)")
if optionsValue & AVAudioSession.InterruptionOptions.shouldResume.rawValue != 0 {
play()
logger.info("Interruption option indicates playback should resume automatically.")
} else {
logger.info("Interruption option indicates playback should not resume automatically.")
}
} else {
logger.info("AVAudioSessionInterruptionOptionKey is missing or not a UInt in userInfo.")
}
logger.info("Audio session interruption ended.")
// We need to call pause() to set all variables correctly.
// Otherwise, playback does not resume when the interruption ends.
pause()
play()
// Check if audio was resumed or if there's any indication of ducking
let currentVolume = AVAudioSession.sharedInstance().outputVolume
logger.info("Current output volume: \(currentVolume)")
default:
break
logger.info("Unknown interruption type received.")
}
}
@objc func handleRouteChange(_ notification: Notification) {
logger.info("Audio route change received.")
guard let info = notification.userInfo else {
logger.info("userInfo is missing in the notification.")
return
}
guard let reasonValue = info[AVAudioSessionRouteChangeReasonKey] as? UInt,
let reason = AVAudioSession.RouteChangeReason(rawValue: reasonValue)
else {
logger.info("AVAudioSessionRouteChangeReasonKey is missing or not a UInt in userInfo.")
return
}
logger.info("Route change reason received: \(reason)")
let currentCategory = AVAudioSession.sharedInstance().category
logger.info("Current audio session category before change: \(currentCategory)")
switch reason {
case .categoryChange:
logger.info("Audio session category changed.")
let newCategory = AVAudioSession.sharedInstance().category
logger.info("New audio session category: \(newCategory)")
case .oldDeviceUnavailable, .newDeviceAvailable:
logger.info("Audio route change may indicate ducking or device change.")
let currentRoute = AVAudioSession.sharedInstance().currentRoute
logger.info("Current audio route: \(currentRoute)")
for output in currentRoute.outputs {
logger.info("Output port type: \(output.portType), UID: \(output.uid)")
switch output.portType {
case .headphones, .bluetoothA2DP:
logger.info("Detected port type \(output.portType). Executing play().")
play()
default:
logger.info("Detected port type \(output.portType). Executing pause().")
pause()
}
}
case .noSuitableRouteForCategory:
logger.info("No suitable route for the current category.")
default:
logger.info("Unhandled route change reason: \(reason)")
}
}
#endif

View File

@@ -359,6 +359,31 @@ extension PlayerModel {
}
private func videoLoadFailureHandler(_ error: RequestError, video: Video? = nil) {
guard let video else {
presentErrorAlert(error)
return
}
let videoID = video.videoID
let currentRetry = retryAttempts[videoID] ?? 0
if currentRetry < Defaults[.videoLoadingRetryCount] {
retryAttempts[videoID] = currentRetry + 1
logger.info("Retry attempt \(currentRetry + 1) for video \(videoID) due to error: \(error)")
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { [weak self] in
guard let self else { return }
self.enqueueVideo(video, play: true, prepending: true, loadDetails: true)
}
return
}
retryAttempts[videoID] = 0
presentErrorAlert(error, video: video)
}
private func presentErrorAlert(_ error: RequestError, video: Video? = nil) {
var message = error.userMessage
if let errorDictionary = error.json.dictionaryObject,
let errorMessage = errorDictionary["message"] ?? errorDictionary["error"],

View File

@@ -76,7 +76,8 @@ struct QualityProfile: Hashable, Identifiable, Defaults.Serializable {
return true
}
let resolutionMatch = !stream.resolution.isNil && resolution.value >= stream.resolution
let defaultResolution = Stream.Resolution.custom(height: 720, refreshRate: 30)
let resolutionMatch = resolution.value ?? defaultResolution >= stream.resolution
if resolutionMatch, formats.contains(.stream), stream.kind == .stream {
return true

View File

@@ -18,6 +18,8 @@ final class SearchModel: ObservableObject {
@Published var focused = false
@Default(.showSearchSuggestions) private var showSearchSuggestions
#if os(iOS)
var textField: UITextField!
#elseif os(macOS)
@@ -102,7 +104,7 @@ final class SearchModel: ObservableObject {
}}
func loadSuggestions(_ query: String) {
guard accounts.app.supportsSearchSuggestions else {
guard accounts.app.supportsSearchSuggestions, showSearchSuggestions else {
querySuggestions.removeAll()
return
}

View File

@@ -4,292 +4,126 @@ import Foundation
// swiftlint:disable:next final_class
class Stream: Equatable, Hashable, Identifiable {
enum Resolution: String, CaseIterable, Comparable, Defaults.Serializable {
// Some 16:19 and 16:10 resolutions are also used in 2:1 videos
enum Resolution: Comparable, Codable, Defaults.Serializable {
case predefined(PredefinedResolution)
case custom(height: Int, refreshRate: Int)
// 8K UHD (16:9) Resolutions
case hd4320p60
case hd4320p50
case hd4320p48
case hd4320p30
case hd4320p25
case hd4320p24
enum PredefinedResolution: String, CaseIterable, Codable {
// 8K UHD (16:9) Resolutions
case hd4320p60, hd4320p30
// 5K (16:9) Resolutions
case hd2560p60
case hd2560p50
case hd2560p48
case hd2560p30
case hd2560p25
case hd2560p24
// 4K UHD (16:9) Resolutions
case hd2160p60, hd2160p30
// 2:1 Aspect Ratio (Univisium) Resolutions
case hd2880p60
case hd2880p50
case hd2880p48
case hd2880p30
case hd2880p25
case hd2880p24
// 1440p (16:9) Resolutions
case hd1440p60, hd1440p30
// 16:10 Resolutions
case hd2400p60
case hd2400p50
case hd2400p48
case hd2400p30
case hd2400p25
case hd2400p24
// 1080p (Full HD, 16:9) Resolutions
case hd1080p60, hd1080p30
// 16:9 Resolutions
case hd2160p60
case hd2160p50
case hd2160p48
case hd2160p30
case hd2160p25
case hd2160p24
// 720p (HD, 16:9) Resolutions
case hd720p60, hd720p30
// 16:10 Resolutions
case hd1600p60
case hd1600p50
case hd1600p48
case hd1600p30
case hd1600p25
case hd1600p24
// 16:9 Resolutions
case hd1440p60
case hd1440p50
case hd1440p48
case hd1440p30
case hd1440p25
case hd1440p24
// 16:10 Resolutions
case hd1280p60
case hd1280p50
case hd1280p48
case hd1280p30
case hd1280p25
case hd1280p24
// 16:10 Resolutions
case hd1200p60
case hd1200p50
case hd1200p48
case hd1200p30
case hd1200p25
case hd1200p24
// 16:9 Resolutions
case hd1080p60
case hd1080p50
case hd1080p48
case hd1080p30
case hd1080p25
case hd1080p24
// 16:10 Resolutions
case hd1050p60
case hd1050p50
case hd1050p48
case hd1050p30
case hd1050p25
case hd1050p24
// 16:9 Resolutions
case hd960p60
case hd960p50
case hd960p48
case hd960p30
case hd960p25
case hd960p24
// 16:10 Resolutions
case hd900p60
case hd900p50
case hd900p48
case hd900p30
case hd900p25
case hd900p24
// 16:10 Resolutions
case hd800p60
case hd800p50
case hd800p48
case hd800p30
case hd800p25
case hd800p24
// 16:9 Resolutions
case hd720p60
case hd720p50
case hd720p48
case hd720p30
case hd720p25
case hd720p24
// Standard Definition (SD) Resolutions
case sd854p30
case sd854p25
case sd768p30
case sd768p25
case sd640p30
case sd640p25
case sd480p30
case sd480p25
case sd428p30
case sd428p25
case sd426p30
case sd426p25
case sd360p30
case sd360p25
case sd320p30
case sd320p25
case sd256p30
case sd256p25
case sd240p30
case sd240p25
case sd214p30
case sd214p25
case sd144p30
case sd144p25
case sd128p30
case sd128p25
case unknown
// Standard Definition (SD) Resolutions
case sd480p30
case sd360p30
case sd240p30
case sd144p30
}
var name: String {
"\(height)p\(refreshRate != -1 && refreshRate != 30 ? ", \(refreshRate) fps" : "")"
switch self {
case let .predefined(predefined):
return predefined.rawValue
case let .custom(height, refreshRate):
return "\(height)p\(refreshRate != 30 ? ", \(refreshRate) fps" : "")"
}
}
var height: Int {
if self == .unknown {
return -1
switch self {
case let .predefined(predefined):
return predefined.height
case let .custom(height, _):
return height
}
let resolutionPart = rawValue.components(separatedBy: "p").first!
return Int(resolutionPart.components(separatedBy: CharacterSet.decimalDigits.inverted).joined())!
}
var refreshRate: Int {
if self == .unknown {
return -1
switch self {
case let .predefined(predefined):
return predefined.refreshRate
case let .custom(_, refreshRate):
return refreshRate
}
let refreshRatePart = rawValue.components(separatedBy: "p")[1]
if refreshRatePart.isEmpty {
return 30
}
return Int(refreshRatePart.components(separatedBy: CharacterSet.decimalDigits.inverted).joined()) ?? -1
}
// These values are an approximation.
// https://support.google.com/youtube/answer/1722171?hl=en#zippy=%2Cbitrate
var bitrate: Int {
switch self {
// 8K UHD (16:9) Resolutions
case .hd4320p60, .hd4320p50, .hd4320p48, .hd4320p30, .hd4320p25, .hd4320p24:
return 85_000_000 // 85 Mbit/s
// 5K (16:9) Resolutions
case .hd2880p60, .hd2880p50, .hd2880p48, .hd2880p30, .hd2880p25, .hd2880p24:
return 45_000_000 // 45 Mbit/s
// 2:1 Aspect Ratio (Univisium) Resolutions
case .hd2560p60, .hd2560p50, .hd2560p48, .hd2560p30, .hd2560p25, .hd2560p24:
return 30_000_000 // 30 Mbit/s
// 16:10 Resolutions
case .hd2400p60, .hd2400p50, .hd2400p48, .hd2400p30, .hd2400p25, .hd2400p24:
return 35_000_000 // 35 Mbit/s
// 4K UHD (16:9) Resolutions
case .hd2160p60, .hd2160p50, .hd2160p48, .hd2160p30, .hd2160p25, .hd2160p24:
return 56_000_000 // 56 Mbit/s
// 16:10 Resolutions
case .hd1600p60, .hd1600p50, .hd1600p48, .hd1600p30, .hd1600p25, .hd1600p24:
return 20_000_000 // 20 Mbit/s
// 1440p (16:9) Resolutions
case .hd1440p60, .hd1440p50, .hd1440p48, .hd1440p30, .hd1440p25, .hd1440p24:
return 24_000_000 // 24 Mbit/s
// 1280p (16:10) Resolutions
case .hd1280p60, .hd1280p50, .hd1280p48, .hd1280p30, .hd1280p25, .hd1280p24:
return 15_000_000 // 15 Mbit/s
// 1200p (16:10) Resolutions
case .hd1200p60, .hd1200p50, .hd1200p48, .hd1200p30, .hd1200p25, .hd1200p24:
return 18_000_000 // 18 Mbit/s
// 1080p (16:9) Resolutions
case .hd1080p60, .hd1080p50, .hd1080p48, .hd1080p30, .hd1080p25, .hd1080p24:
return 12_000_000 // 12 Mbit/s
// 1050p (16:10) Resolutions
case .hd1050p60, .hd1050p50, .hd1050p48, .hd1050p30, .hd1050p25, .hd1050p24:
return 10_000_000 // 10 Mbit/s
// 960p Resolutions
case .hd960p60, .hd960p50, .hd960p48, .hd960p30, .hd960p25, .hd960p24:
return 8_000_000 // 8 Mbit/s
// 900p (16:10) Resolutions
case .hd900p60, .hd900p50, .hd900p48, .hd900p30, .hd900p25, .hd900p24:
return 7_000_000 // 7 Mbit/s
// 800p (16:10) Resolutions
case .hd800p60, .hd800p50, .hd800p48, .hd800p30, .hd800p25, .hd800p24:
return 6_000_000 // 6 Mbit/s
// 720p (16:9) Resolutions
case .hd720p60, .hd720p50, .hd720p48, .hd720p30, .hd720p25, .hd720p24:
return 9_500_000 // 9.5 Mbit/s
// Standard Definition (SD) Resolutions
case .sd854p30, .sd854p25, .sd768p30, .sd768p25, .sd640p30, .sd640p25:
return 4_000_000 // 4 Mbit/s
case .sd480p30, .sd480p25:
return 2_500_000 // 2.5 Mbit/s
case .sd428p30, .sd428p25, .sd426p30, .sd426p25:
return 2_000_000 // 2 Mbit/s
case .sd360p30, .sd360p25:
return 1_500_000 // 1.5 Mbit/s
case .sd320p30, .sd320p25:
return 1_200_000 // 1.2 Mbit/s
case .sd256p30, .sd256p25, .sd240p30, .sd240p25:
return 1_000_000 // 1 Mbit/s
case .sd214p30, .sd214p25:
return 800_000 // 0.8 Mbit/s
case .sd144p30, .sd144p25:
return 600_000 // 0.6 Mbit/s
case .sd128p30, .sd128p25:
return 400_000 // 0.4 Mbit/s
case .unknown:
return 0
case let .predefined(predefined):
return predefined.bitrate
case let .custom(height, refreshRate):
// Find the closest predefined resolution based on height and refresh rate
let closestPredefined = Stream.Resolution.PredefinedResolution.allCases.min {
abs($0.height - height) + abs($0.refreshRate - refreshRate) <
abs($1.height - height) + abs($1.refreshRate - refreshRate)
}
// Return the bitrate of the closest predefined resolution or a default bitrate if no close match is found
return closestPredefined?.bitrate ?? 5_000_000
}
}
static func from(resolution: String, fps: Int? = nil) -> Self {
allCases.first { $0.rawValue.contains(resolution) && $0.refreshRate == (fps ?? 30) } ?? .unknown
if let predefined = PredefinedResolution(rawValue: resolution) {
return .predefined(predefined)
}
// Attempt to parse height and refresh rate
if let height = Int(resolution.components(separatedBy: "p").first ?? ""), height > 0 {
let refreshRate = fps ?? 30
return .custom(height: height, refreshRate: refreshRate)
}
// Default behavior if parsing fails
return .custom(height: 720, refreshRate: 30)
}
static func < (lhs: Self, rhs: Self) -> Bool {
lhs.height == rhs.height ? (lhs.refreshRate < rhs.refreshRate) : (lhs.height < rhs.height)
}
enum CodingKeys: String, CodingKey {
case predefined
case custom
case height
case refreshRate
}
init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self)
if let predefinedValue = try? container.decode(PredefinedResolution.self, forKey: .predefined) {
self = .predefined(predefinedValue)
} else if let height = try? container.decode(Int.self, forKey: .height),
let refreshRate = try? container.decode(Int.self, forKey: .refreshRate)
{
self = .custom(height: height, refreshRate: refreshRate)
} else {
// Set default resolution to 720p 30 if decoding fails
self = .custom(height: 720, refreshRate: 30)
}
}
func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
switch self {
case let .predefined(predefinedValue):
try container.encode(predefinedValue, forKey: .predefined)
case let .custom(height, refreshRate):
try container.encode(height, forKey: .height)
try container.encode(refreshRate, forKey: .refreshRate)
}
}
}
enum Kind: String, Comparable {
@@ -482,3 +316,97 @@ class Stream: Equatable, Hashable, Identifiable {
}
}
}
extension Stream.Resolution.PredefinedResolution {
var height: Int {
switch self {
// 8K UHD (16:9) Resolutions
case .hd4320p60, .hd4320p30:
return 4320
// 4K UHD (16:9) Resolutions
case .hd2160p60, .hd2160p30:
return 2160
// 1440p (16:9) Resolutions
case .hd1440p60, .hd1440p30:
return 1440
// 1080p (Full HD, 16:9) Resolutions
case .hd1080p60, .hd1080p30:
return 1080
// 720p (HD, 16:9) Resolutions
case .hd720p60, .hd720p30:
return 720
// Standard Definition (SD) Resolutions
case .sd480p30:
return 480
case .sd360p30:
return 360
case .sd240p30:
return 240
case .sd144p30:
return 144
}
}
var refreshRate: Int {
switch self {
// 60 fps Resolutions
case .hd4320p60, .hd2160p60, .hd1440p60, .hd1080p60, .hd720p60:
return 60
// 30 fps Resolutions
case .hd4320p30, .hd2160p30, .hd1440p30, .hd1080p30, .hd720p30,
.sd480p30, .sd360p30, .sd240p30, .sd144p30:
return 30
}
}
// These values are an approximation.
// https://support.google.com/youtube/answer/1722171?hl=en#zippy=%2Cbitrate
var bitrate: Int {
switch self {
// 8K UHD (16:9) Resolutions
case .hd4320p60:
return 180_000_000 // Midpoint between 120 Mbps and 240 Mbps
case .hd4320p30:
return 120_000_000 // Midpoint between 80 Mbps and 160 Mbps
// 4K UHD (16:9) Resolutions
case .hd2160p60:
return 60_500_000 // Midpoint between 53 Mbps and 68 Mbps
case .hd2160p30:
return 40_000_000 // Midpoint between 35 Mbps and 45 Mbps
// 1440p (2K) Resolutions
case .hd1440p60:
return 24_000_000 // 24 Mbps
case .hd1440p30:
return 16_000_000 // 16 Mbps
// 1080p (Full HD, 16:9) Resolutions
case .hd1080p60:
return 12_000_000 // 12 Mbps
case .hd1080p30:
return 8_000_000 // 8 Mbps
// 720p (HD, 16:9) Resolutions
case .hd720p60:
return 7_500_000 // 7.5 Mbps
case .hd720p30:
return 5_000_000 // 5 Mbps
// Standard Definition (SD) Resolutions
case .sd480p30:
return 2_500_000 // 2.5 Mbps
case .sd360p30:
return 1_000_000 // 1 Mbps
case .sd240p30:
return 1_000_000 // 1 Mbps
case .sd144p30:
return 600_000 // 0.6 Mbps
}
}
}

View File

@@ -0,0 +1,38 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "1.000",
"green" : "1.000",
"red" : "1.000"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.110",
"green" : "0.110",
"red" : "0.118"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@@ -63,6 +63,14 @@ enum Constants {
#endif
}
static var detailsVisibility: Bool {
#if os(iOS)
false
#else
true
#endif
}
static var progressViewScale: Double {
#if os(macOS)
0.4
@@ -95,11 +103,11 @@ enum Constants {
#endif
}
static var detailsVisibility: Bool {
#if os(iOS)
false
static var contentViewMinWidth: Double {
#if os(macOS)
835
#else
true
0
#endif
}

View File

@@ -15,6 +15,7 @@ extension Defaults.Keys {
static let favorites = Key<[FavoriteItem]>("favorites", default: [])
static let widgetsSettings = Key<[WidgetSettings]>("widgetsSettings", default: [])
static let startupSection = Key<StartupSection>("startupSection", default: .home)
static let showSearchSuggestions = Key<Bool>("showSearchSuggestions", default: true)
static let visibleSections = Key<Set<VisibleSection>>("visibleSections", default: [.subscriptions, .trending, .playlists])
static let showOpenActionsToolbarItem = Key<Bool>("showOpenActionsToolbarItem", default: false)
@@ -115,6 +116,7 @@ extension Defaults.Keys {
static let avPlayerUsesSystemControls = Key<Bool>("avPlayerUsesSystemControls", default: Constants.isTvOS)
static let horizontalPlayerGestureEnabled = Key<Bool>("horizontalPlayerGestureEnabled", default: true)
static let fullscreenPlayerGestureEnabled = Key<Bool>("fullscreenPlayerGestureEnabled", default: true)
static let seekGestureSensitivity = Key<Double>("seekGestureSensitivity", default: 30.0)
static let seekGestureSpeed = Key<Double>("seekGestureSpeed", default: 0.5)
@@ -358,6 +360,7 @@ extension Defaults.Keys {
// MARK: Group - Advanced
static let showPlayNowInBackendContextMenu = Key<Bool>("showPlayNowInBackendContextMenu", default: false)
static let videoLoadingRetryCount = Key<Int>("videoLoadingRetryCount", default: 10)
static let showMPVPlaybackStats = Key<Bool>("showMPVPlaybackStats", default: false)
static let mpvEnableLogging = Key<Bool>("mpvEnableLogging", default: false)
@@ -368,6 +371,7 @@ extension Defaults.Keys {
static let mpvHWdec = Key<String>("hwdec", default: "auto-safe")
static let mpvDemuxerLavfProbeInfo = Key<String>("mpvDemuxerLavfProbeInfo", default: "no")
static let mpvInitialAudioSync = Key<Bool>("mpvInitialAudioSync", default: true)
static let mpvSetRefreshToContentFPS = Key<Bool>("mpvSetRefreshToContentFPS", default: false)
static let showCacheStatus = Key<Bool>("showCacheStatus", default: false)
static let feedCacheSize = Key<String>("feedCacheSize", default: "50")
@@ -424,18 +428,34 @@ enum ResolutionSetting: String, CaseIterable, Defaults.Serializable {
case sd240p30
case sd144p30
var value: Stream.Resolution! {
.init(rawValue: rawValue)
var value: Stream.Resolution {
if let predefined = Stream.Resolution.PredefinedResolution(rawValue: rawValue) {
return .predefined(predefined)
}
// Provide a default value of 720p 30
return .custom(height: 720, refreshRate: 30)
}
var description: String {
switch self {
case .hd2160p60:
return "4K, 60fps"
case .hd2160p30:
return "4K"
let resolution = value
let height = resolution.height
let refreshRate = resolution.refreshRate
// Superscript labels
let superscript4K = "⁴ᴷ"
let superscriptHD = "ᴴᴰ"
// Special handling for specific resolutions
switch height {
case 2160:
// 4K superscript after the refresh rate
return refreshRate == 30 ? "2160p \(superscript4K)" : "2160p\(refreshRate) \(superscript4K)"
case 1440, 1080:
// HD superscript after the refresh rate
return refreshRate == 30 ? "\(height)p \(superscriptHD)" : "\(height)p\(refreshRate) \(superscriptHD)"
default:
return value.name
// Default formatting for other resolutions
return refreshRate == 30 ? "\(height)p" : "\(height)p\(refreshRate)"
}
}
}

View File

@@ -152,7 +152,7 @@ struct HomeView: View {
#endif
#if os(macOS)
.background(Color.secondaryBackground)
.frame(minWidth: 360)
.frame(minWidth: Constants.contentViewMinWidth)
.toolbar {
ToolbarItemGroup(placement: .automatic) {
HideWatchedButtons()

View File

@@ -15,7 +15,7 @@ struct AppSidebarNavigation: View {
var body: some View {
#if os(iOS)
content.introspect(.viewController, on: .iOS(.v15, .v16, .v17)) { viewController in
content.introspect(.viewController, on: .iOS(.v15, .v16, .v17, .v18)) { viewController in
// workaround for an empty supplementary view on launch
// the supplementary view is determined by the default selection inside the
// primary view, but the primary view is not loaded so its selection is not read

View File

@@ -169,7 +169,7 @@ struct ContentView: View {
.statusBarHidden(player.playingFullScreen)
#endif
#if os(macOS)
.frame(minWidth: 1200)
.frame(minWidth: 1200, minHeight: 600)
#endif
}

View File

@@ -4,11 +4,6 @@ import SwiftUI
#if !os(macOS)
final class AppleAVPlayerViewControllerDelegate: NSObject, AVPlayerViewControllerDelegate {
#if os(iOS)
@Default(.rotateToLandscapeOnEnterFullScreen) private var rotateToLandscapeOnEnterFullScreen
@Default(.avPlayerUsesSystemControls) private var avPlayerUsesSystemControls
#endif
var player: PlayerModel { .shared }
func playerViewControllerShouldAutomaticallyDismissAtPictureInPictureStart(_: AVPlayerViewController) -> Bool {
@@ -17,14 +12,23 @@ import SwiftUI
#if os(iOS)
func playerViewController(_: AVPlayerViewController, willBeginFullScreenPresentationWithAnimationCoordinator _: UIViewControllerTransitionCoordinator) {
if PlayerModel.shared.currentVideoIsLandscape {
let delay = PlayerModel.shared.activeBackend == .appleAVPlayer && avPlayerUsesSystemControls ? 0.8 : 0
// not sure why but first rotation call is ignore so doing rotate to same orientation first
Delay.by(delay) {
let orientation = OrientationTracker.shared.currentDeviceOrientation.isLandscape ? OrientationTracker.shared.currentInterfaceOrientation : self.rotateToLandscapeOnEnterFullScreen.interfaceOrientation
Orientation.lockOrientation(.allButUpsideDown, andRotateTo: OrientationTracker.shared.currentInterfaceOrientation)
Orientation.lockOrientation(.allButUpsideDown, andRotateTo: orientation)
let lockOrientation = player.rotateToLandscapeOnEnterFullScreen.interfaceOrientation
if player.currentVideoIsLandscape {
if player.fullscreenInitiatedByButton {
Orientation.lockOrientation(player.isOrientationLocked
? (lockOrientation == .landscapeRight ? .landscapeRight : .landscapeLeft)
: .landscape)
}
let orientation = OrientationTracker.shared.currentDeviceOrientation.isLandscape
? OrientationTracker.shared.currentInterfaceOrientation
: player.rotateToLandscapeOnEnterFullScreen.interfaceOrientation
Orientation.lockOrientation(
player.isOrientationLocked
? (lockOrientation == .landscapeRight ? .landscapeRight : .landscapeLeft)
: .all,
andRotateTo: orientation
)
}
}
@@ -36,9 +40,11 @@ import SwiftUI
}
if !context.isCancelled {
#if os(iOS)
if Constants.isIPhone {
Orientation.lockOrientation(.allButUpsideDown, andRotateTo: .portrait)
if self.player.lockPortraitWhenBrowsing {
self.player.lockedOrientation = UIInterfaceOrientationMask.portrait
}
let rotationOrientation = self.player.lockPortraitWhenBrowsing ? UIInterfaceOrientation.portrait : nil
Orientation.lockOrientation(self.player.lockPortraitWhenBrowsing ? .portrait : .all, andRotateTo: rotationOrientation)
if wasPlaying {
self.player.play()

View File

@@ -5,6 +5,8 @@ struct ControlsOverlay: View {
@ObservedObject private var player = PlayerModel.shared
private var model = PlayerControlsModel.shared
@State private var availableCaptions: [Captions] = []
@State private var isLoadingCaptions = true
@State private var contentSize: CGSize = .zero
@Default(.showMPVPlaybackStats) private var showMPVPlaybackStats
@@ -335,7 +337,6 @@ struct ControlsOverlay: View {
Image(systemName: "text.bubble")
if let captions = captionsBinding.wrappedValue,
let language = LanguageCodes(rawValue: captions.code)
{
Text("\(language.description.capitalized) (\(language.rawValue))")
.foregroundColor(.accentColor)
@@ -380,17 +381,16 @@ struct ControlsOverlay: View {
.contextMenu {
Button("Disabled") { captionsBinding.wrappedValue = nil }
ForEach(player.currentVideo?.captions ?? []) { caption in
ForEach(availableCaptions) { caption in
Button(caption.description) { captionsBinding.wrappedValue = caption }
}
Button("Cancel", role: .cancel) {}
}
#endif
}
@ViewBuilder private var captionsPicker: some View {
let captions = player.currentVideo?.captions ?? []
let captions = availableCaptions
Picker("Captions", selection: captionsBinding) {
if captions.isEmpty {
Text("Not available").tag(Captions?.none)
@@ -402,6 +402,31 @@ struct ControlsOverlay: View {
}
}
.disabled(captions.isEmpty)
.onAppear {
loadCaptions()
}
}
private func loadCaptions() {
isLoadingCaptions = true
// Fetch captions asynchronously
Task {
let fetchedCaptions = await fetchCaptions()
await MainActor.run {
// Update state on the main thread
self.availableCaptions = fetchedCaptions
self.isLoadingCaptions = false
}
}
}
private func fetchCaptions() async -> [Captions] {
// Access currentVideo from the main actor context
await MainActor.run {
// Safely access the main actor-isolated currentVideo property
player.currentVideo?.captions ?? []
}
}
private var captionsBinding: Binding<Captions?> {

View File

@@ -6,10 +6,12 @@ import OpenGLES
final class MPVOGLView: GLKView {
private var logger = Logger(label: "stream.yattee.mpv.oglview")
private var defaultFBO: GLint?
private var displayLink: CADisplayLink?
var mpvGL: UnsafeMutableRawPointer?
var queue = DispatchQueue(label: "stream.yattee.opengl")
var queue = DispatchQueue(label: "stream.yattee.opengl", qos: .userInteractive)
var needsDrawing = true
private var dirtyRegion: CGRect?
override init(frame: CGRect) {
guard let context = EAGLContext(api: .openGLES2) else {
@@ -29,6 +31,70 @@ final class MPVOGLView: GLKView {
enableSetNeedsDisplay = false
fillBlack()
setupDisplayLink()
setupNotifications()
}
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
setupDisplayLink()
setupNotifications()
}
private func setupDisplayLink() {
displayLink = CADisplayLink(target: self, selector: #selector(updateFrame))
displayLink?.add(to: .main, forMode: .common)
}
// Set up observers to detect display changes and custom refresh rate updates.
private func setupNotifications() {
NotificationCenter.default.addObserver(self, selector: #selector(updateDisplayLinkFromNotification(_:)), name: .updateDisplayLinkFrameRate, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(screenDidChange), name: UIScreen.didConnectNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(screenDidChange), name: UIScreen.didDisconnectNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(screenDidChange), name: UIScreen.modeDidChangeNotification, object: nil)
}
@objc private func screenDidChange(_: Notification) {
// Update the display link refresh rate when the screen configuration changes
updateDisplayLinkFrameRate()
}
// Update the display link frame rate from the notification.
@objc private func updateDisplayLinkFromNotification(_ notification: Notification) {
guard let userInfo = notification.userInfo,
let refreshRate = userInfo["refreshRate"] as? Int else { return }
displayLink?.preferredFramesPerSecond = refreshRate
logger.info("Updated CADisplayLink frame rate to: \(refreshRate) from backend notification.")
}
// Update the display link's preferred frame rate based on the current screen refresh rate.
private func updateDisplayLinkFrameRate() {
guard let displayLink else { return }
let refreshRate = getScreenRefreshRate()
displayLink.preferredFramesPerSecond = refreshRate
logger.info("Updated CADisplayLink preferred frames per second to: \(refreshRate)")
}
// Retrieve the screen's current refresh rate dynamically.
private func getScreenRefreshRate() -> Int {
// Use the main screen's maximumFramesPerSecond property
let refreshRate = UIScreen.main.maximumFramesPerSecond
logger.info("Screen refresh rate: \(refreshRate) Hz")
return refreshRate
}
@objc private func updateFrame() {
// Trigger the drawing process if needed
if needsDrawing {
markRegionAsDirty(bounds)
setNeedsDisplay()
}
}
deinit {
// Invalidate the display link and remove observers to avoid memory leaks
displayLink?.invalidate()
NotificationCenter.default.removeObserver(self)
}
func fillBlack() {
@@ -36,36 +102,99 @@ final class MPVOGLView: GLKView {
glClear(UInt32(GL_COLOR_BUFFER_BIT))
}
// Function to set a dirty region when a part of the screen changes
func markRegionAsDirty(_ region: CGRect) {
if dirtyRegion == nil {
dirtyRegion = region
} else {
// Expand the dirty region to include the new region
dirtyRegion = dirtyRegion!.union(region)
}
}
// Logic to decide if only part of the screen needs updating
private func needsPartialUpdate() -> Bool {
// Check if there is a defined dirty region that needs updating
if let dirtyRegion, !dirtyRegion.isEmpty {
// Set up glScissor based on dirtyRegion coordinates
glScissor(GLint(dirtyRegion.origin.x), GLint(dirtyRegion.origin.y), GLsizei(dirtyRegion.width), GLsizei(dirtyRegion.height))
return true
}
return false
}
// Call this function when you know the entire screen needs updating
private func clearDirtyRegion() {
dirtyRegion = nil
}
override func draw(_: CGRect) {
guard needsDrawing, let mpvGL else {
guard needsDrawing, let mpvGL else { return }
// Ensure the correct context is set
guard EAGLContext.setCurrent(context) else {
logger.error("Failed to set current OpenGL context.")
return
}
// Bind the default framebuffer
glGetIntegerv(UInt32(GL_FRAMEBUFFER_BINDING), &defaultFBO!)
// Ensure the framebuffer is valid
guard defaultFBO != nil && defaultFBO! != 0 else {
logger.error("Invalid framebuffer ID.")
return
}
// Get the current viewport dimensions
var dims: [GLint] = [0, 0, 0, 0]
glGetIntegerv(GLenum(GL_VIEWPORT), &dims)
// Check if we need partial updates
if needsPartialUpdate() {
logger.info("Performing partial update with scissor test.")
glEnable(GLenum(GL_SCISSOR_TEST))
}
// Set up the OpenGL FBO data
var data = mpv_opengl_fbo(
fbo: Int32(defaultFBO!),
w: Int32(dims[2]),
h: Int32(dims[3]),
internal_format: 0
)
// Flip Y coordinate for proper rendering
var flip: CInt = 1
withUnsafeMutablePointer(to: &flip) { flip in
withUnsafeMutablePointer(to: &data) { data in
// Render with the provided OpenGL FBO parameters
withUnsafeMutablePointer(to: &flip) { flipPtr in
withUnsafeMutablePointer(to: &data) { dataPtr in
var params = [
mpv_render_param(type: MPV_RENDER_PARAM_OPENGL_FBO, data: data),
mpv_render_param(type: MPV_RENDER_PARAM_FLIP_Y, data: flip),
mpv_render_param(type: MPV_RENDER_PARAM_OPENGL_FBO, data: dataPtr),
mpv_render_param(type: MPV_RENDER_PARAM_FLIP_Y, data: flipPtr),
mpv_render_param()
]
mpv_render_context_render(OpaquePointer(mpvGL), &params)
// Call the render function and check for errors
let result = mpv_render_context_render(OpaquePointer(mpvGL), &params)
if result < 0 {
logger.error("mpv_render_context_render() failed with error code: \(result)")
} else {
logger.info("mpv_render_context_render() called successfully.")
}
}
}
}
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
// Disable the scissor test after rendering if it was enabled
if needsPartialUpdate() {
glDisable(GLenum(GL_SCISSOR_TEST))
}
// Clear dirty region after drawing
clearDirtyRegion()
}
}
extension Notification.Name {
static let updateDisplayLinkFrameRate = Notification.Name("updateDisplayLinkFrameRate")
}

View File

@@ -43,7 +43,7 @@ struct PlayerBackendView: View {
Color.clear
.onAppear { player.playerSize = proxy.size }
.onChange(of: proxy.size) { _ in player.playerSize = proxy.size }
.onChange(of: player.controls.presentingOverlays) { _ in player.playerSize = proxy.size }
.onChange(of: player.currentItem?.id) { _ in player.playerSize = proxy.size }
})
#if !os(tvOS)

View File

@@ -56,14 +56,13 @@ extension VideoPlayerView {
player.seek.gestureStart = time
}
let timeSeek = (time / player.playerSize.width) * horizontalDrag * seekGestureSpeed
player.seek.gestureSeek = timeSeek
}
return
}
// Toggle fullscreen on upward drag only when not disabled
if verticalDrag < -50 {
if fullscreenPlayerGestureEnabled, verticalDrag < -50 {
player.toggleFullScreenAction()
disableGestureTemporarily()
return
@@ -80,6 +79,54 @@ extension VideoPlayerView {
}
}
var detailsDragGesture: some Gesture {
DragGesture(minimumDistance: 30)
.onChanged { value in
handleDetailsDragChange(value)
}
.onEnded { value in
handleDetailsDragEnd(value)
}
}
private func handleDetailsDragChange(_ value: DragGesture.Value) {
let maxOffset = -player.playerSize.height
// Continuous drag update for smooth movement of VideoDetails
if fullScreenDetails {
// Allow only downward dragging when in fullscreen
if value.translation.height > 0 {
detailViewDragOffset = min(value.translation.height, abs(maxOffset))
}
} else {
// Allow only upward dragging when not in fullscreen
if value.translation.height < 0 {
detailViewDragOffset = max(value.translation.height, maxOffset)
}
}
}
private func handleDetailsDragEnd(_ value: DragGesture.Value) {
if value.translation.height < -50, !fullScreenDetails {
// Swipe up to enter fullscreen
withAnimation(Constants.overlayAnimation) {
fullScreenDetails = true
detailViewDragOffset = 0
}
} else if value.translation.height > 50, fullScreenDetails {
// Swipe down to exit fullscreen
withAnimation(Constants.overlayAnimation) {
fullScreenDetails = false
detailViewDragOffset = 0
}
} else {
// Reset offset if drag was not significant
withAnimation(Constants.overlayAnimation) {
detailViewDragOffset = 0
}
}
}
func onPlayerDragGestureEnded() {
if horizontalPlayerGestureEnabled, isHorizontalDrag {
isHorizontalDrag = false
@@ -108,7 +155,6 @@ extension VideoPlayerView {
}
}
// Function to temporarily disable the toggle gesture after a fullscreen change
private func disableGestureTemporarily() {
disableToggleGesture = true
DispatchQueue.main.asyncAfter(deadline: .now() + 1.5) {

View File

@@ -223,7 +223,7 @@ struct VideoDetails: View {
.frame(maxWidth: .infinity, alignment: .leading)
.contentShape(Rectangle())
.padding(.horizontal, 16)
// swiftlint:disable trailing_closure
// TODO: when setting tvOS minimum to 16, the platform modifier can be removed
#if !os(tvOS)
.simultaneousGesture( // Simultaneous gesture to prioritize button tap
@@ -234,7 +234,7 @@ struct VideoDetails: View {
}
)
#endif
// swiftlint:enable trailing_closure
if VideoActions().isAnyActionVisible() {
VideoActions(video: player.videoForDisplay)
.padding(.vertical, 5)

View File

@@ -24,13 +24,12 @@ struct VideoPlayerView: View {
#if os(macOS)
335
#else
200
140
#endif
}
@State private var playerSize: CGSize = .zero { didSet { updateSidebarQueue() } }
@State private var hoveringPlayer = false
@State private var fullScreenDetails = false
@State private var sidebarQueue = defaultSidebarQueueValue
@Environment(\.colorScheme) private var colorScheme
@@ -51,12 +50,14 @@ struct VideoPlayerView: View {
@State var isHorizontalDrag = false
@State var isVerticalDrag = false
@State var viewDragOffset = Self.hiddenOffset
@State var detailViewDragOffset: Double = 0
// swiftlint:enable private_swiftui_state
#endif
// swiftlint:disable private_swiftui_state
@State var disableToggleGesture = false
@State var fullScreenDetails = false
// swiftlint:enable private_swiftui_state
@ObservedObject var player = PlayerModel.shared // swiftlint:disable:this swiftui_state_private
@@ -66,6 +67,7 @@ struct VideoPlayerView: View {
#endif
@Default(.horizontalPlayerGestureEnabled) var horizontalPlayerGestureEnabled
@Default(.fullscreenPlayerGestureEnabled) var fullscreenPlayerGestureEnabled
@Default(.seekGestureSpeed) var seekGestureSpeed
@Default(.seekGestureSensitivity) var seekGestureSensitivity
@Default(.playerSidebar) var playerSidebar
@@ -307,6 +309,8 @@ struct VideoPlayerView: View {
#endif
.id(player.currentVideo?.cacheKey)
.transition(.opacity)
.offset(y: detailViewDragOffset)
.gesture(detailsDragGesture)
} else {
VStack {}
}

View File

@@ -9,7 +9,7 @@ struct FocusableSearchTextField: View {
var body: some View {
SearchTextField()
#if os(macOS)
.introspect(.textField, on: .macOS(.v12, .v13, .v14)) { textField in
.introspect(.textField, on: .macOS(.v12, .v13, .v14, .v15)) { textField in
state.textField = textField
}
.onAppear {
@@ -18,7 +18,7 @@ struct FocusableSearchTextField: View {
}
}
#elseif os(iOS)
.introspect(.textField, on: .iOS(.v15, .v16, .v17)) { textField in
.introspect(.textField, on: .iOS(.v15, .v16, .v17, .v18)) { textField in
state.textField = textField
}
.onChange(of: state.focused) { newValue in

View File

@@ -1,64 +1,99 @@
import Repeat
import SwiftUI
struct SearchTextField: View {
private var navigation = NavigationModel.shared
@ObservedObject private var state = SearchModel.shared
var body: some View {
ZStack {
#if os(macOS)
#if os(macOS)
var body: some View {
ZStack {
fieldBorder
#endif
HStack(spacing: 0) {
#if os(macOS)
HStack(spacing: 0) {
Image(systemName: "magnifyingglass")
.resizable()
.scaledToFill()
.frame(width: 12, height: 12)
.padding(.horizontal, 8)
.padding(.horizontal, 6)
.opacity(0.8)
#endif
TextField("Search...", text: $state.queryText) {
state.changeQuery { query in
query.query = state.queryText
navigation.hideKeyboard()
}
RecentsModel.shared.addQuery(state.queryText)
}
.disableAutocorrection(true)
#if os(macOS)
.frame(maxWidth: 190)
.textFieldStyle(.plain)
#else
.frame(minWidth: 200)
.textFieldStyle(.roundedBorder)
.padding(.horizontal, 5)
.padding(.trailing, state.queryText.isEmpty ? 0 : 10)
#endif
if !state.queryText.isEmpty {
clearButton
} else {
#if os(macOS)
GeometryReader { geometry in
TextField("Search...", text: $state.queryText) {
state.changeQuery { query in
query.query = state.queryText
navigation.hideKeyboard()
}
RecentsModel.shared.addQuery(state.queryText)
}
.disableAutocorrection(true)
.frame(maxWidth: geometry.size.width - 5)
.textFieldStyle(.plain)
.padding(.vertical, 8)
.frame(height: 27, alignment: .center)
}
if !state.queryText.isEmpty {
clearButton
} else {
clearButton
.opacity(0)
#endif
}
}
}
.transaction { t in t.animation = nil }
}
.transaction { t in t.animation = nil }
}
#else
var body: some View {
ZStack {
HStack {
HStack(spacing: 0) {
Image(systemName: "magnifyingglass")
.foregroundColor(.gray)
.padding(.leading, 5)
.padding(.trailing, 5)
.imageScale(.medium)
TextField("Search...", text: $state.queryText) {
state.changeQuery { query in
query.query = state.queryText
navigation.hideKeyboard()
}
RecentsModel.shared.addQuery(state.queryText)
}
.disableAutocorrection(true)
.textFieldStyle(.plain)
.padding(.vertical, 7)
if !state.queryText.isEmpty {
clearButton
.padding(.leading, 5)
.padding(.trailing, 5)
}
}
.background(
RoundedRectangle(cornerRadius: 8)
.fill(Color("SearchTextFieldBackground"))
)
.overlay(
RoundedRectangle(cornerRadius: 8)
.stroke(Color(UIColor.secondarySystemBackground), lineWidth: 1)
)
.frame(maxWidth: .infinity, alignment: .leading)
}
.padding(.horizontal, 0)
}
.transaction { t in t.animation = nil }
}
#endif
private var fieldBorder: some View {
RoundedRectangle(cornerRadius: 5, style: .continuous)
.fill(Color.background)
.frame(width: 250, height: 32)
.frame(width: 250, height: 27)
.overlay(
RoundedRectangle(cornerRadius: 5, style: .continuous)
.stroke(Color.gray.opacity(0.4), lineWidth: 1)
.frame(width: 250, height: 31)
.frame(width: 250, height: 27)
)
}
@@ -67,15 +102,14 @@ struct SearchTextField: View {
self.state.queryText = ""
}) {
Image(systemName: "xmark.circle.fill")
#if os(macOS)
.imageScale(.small)
#else
.imageScale(.medium)
#endif
}
.buttonStyle(PlainButtonStyle())
#if os(macOS)
.padding(.trailing, 10)
.padding(.trailing, 5)
#elseif os(iOS)
.padding(.trailing, 5)
.foregroundColor(.gray)
#endif
.opacity(0.7)
}

View File

@@ -30,6 +30,7 @@ struct SearchView: View {
@Default(.saveRecents) private var saveRecents
@Default(.showHome) private var showHome
@Default(.searchListingStyle) private var searchListingStyle
@Default(.showSearchSuggestions) private var showSearchSuggestions
private var videos = [Video]()
@@ -38,9 +39,9 @@ struct SearchView: View {
self.videos = videos
}
var body: some View {
VStack {
#if os(iOS)
#if os(iOS)
var body: some View {
VStack {
VStack {
if accounts.app.supportsSearchSuggestions, state.query.query != state.queryText {
SearchSuggestions()
@@ -51,27 +52,155 @@ struct SearchView: View {
}
.backport
.scrollDismissesKeyboardInteractively()
#else
}
.environment(\.listingStyle, searchListingStyle)
.toolbar {
ToolbarItem(placement: .principal) {
if #available(iOS 15, *) {
FocusableSearchTextField()
} else {
SearchTextField()
}
}
ToolbarItem(placement: .navigationBarTrailing) {
searchMenu
}
}
.navigationBarTitleDisplayMode(.inline)
.ignoresSafeArea(.keyboard, edges: .bottom)
.navigationTitle("Search")
.onAppear {
if let query {
state.queryText = query.query
state.resetQuery(query)
updateFavoriteItem()
}
if !videos.isEmpty {
state.store.replace(ContentItem.array(of: videos))
}
}
.onChange(of: accounts.current) { _ in
state.reloadQuery()
}
.onChange(of: state.queryText) { newQuery in
if newQuery.isEmpty {
favoriteItem = nil
state.resetQuery()
} else {
updateFavoriteItem()
}
state.loadSuggestions(newQuery)
}
.onChange(of: searchSortOrder) { order in
state.changeQuery { query in
query.sortBy = order
updateFavoriteItem()
}
}
.onChange(of: searchDate) { date in
state.changeQuery { query in
query.date = date
updateFavoriteItem()
}
}
.onChange(of: searchDuration) { duration in
state.changeQuery { query in
query.duration = duration
updateFavoriteItem()
}
}
}
#elseif os(tvOS)
var body: some View {
VStack {
ZStack {
results
#if os(macOS)
if accounts.app.supportsSearchSuggestions, state.query.query != state.queryText {
HStack {
Spacer()
SearchSuggestions()
.borderLeading(width: 1, color: Color("ControlsBorderColor"))
.frame(maxWidth: 280)
.opacity(state.queryText.isEmpty ? 0 : 1)
}
}
#endif
}
#endif
}
.environment(\.listingStyle, searchListingStyle)
.onAppear {
if let query {
state.queryText = query.query
state.resetQuery(query)
updateFavoriteItem()
}
if !videos.isEmpty {
state.store.replace(ContentItem.array(of: videos))
}
}
.onChange(of: accounts.current) { _ in
state.reloadQuery()
}
.onChange(of: state.queryText) { newQuery in
if newQuery.isEmpty {
favoriteItem = nil
state.resetQuery()
} else {
updateFavoriteItem()
}
if showSearchSuggestions {
state.loadSuggestions(newQuery)
}
searchDebounce.invalidate()
recentsDebounce.invalidate()
searchDebounce.debouncing(2) {
state.changeQuery { query in
query.query = newQuery
}
}
recentsDebounce.debouncing(10) {
recents.addQuery(newQuery)
}
}
.onChange(of: searchSortOrder) { order in
state.changeQuery { query in
query.sortBy = order
updateFavoriteItem()
}
}
.onChange(of: searchDate) { date in
state.changeQuery { query in
query.date = date
updateFavoriteItem()
}
}
.onChange(of: searchDuration) { duration in
state.changeQuery { query in
query.duration = duration
updateFavoriteItem()
}
}
.searchable(text: $state.queryText) {
if !state.queryText.isEmpty {
ForEach(state.querySuggestions, id: \.self) { suggestion in
Text(suggestion)
.searchCompletion(suggestion)
}
}
}
}
.environment(\.listingStyle, searchListingStyle)
.toolbar {
#if os(macOS)
#elseif os(macOS)
var body: some View {
ZStack {
results
if accounts.app.supportsSearchSuggestions, state.query.query != state.queryText, showSearchSuggestions {
HStack {
Spacer()
SearchSuggestions()
.borderLeading(width: 1, color: Color("ControlsBorderColor"))
.frame(maxWidth: 262)
.opacity(state.queryText.isEmpty ? 0 : 1)
}
}
}
.environment(\.listingStyle, searchListingStyle)
.toolbar {
ToolbarItemGroup(placement: toolbarPlacement) {
ListingStyleButtons(listingStyle: $searchListingStyle)
HideWatchedButtons()
@@ -84,7 +213,6 @@ struct SearchView: View {
HStack {
Text("Sort:")
.foregroundColor(.secondary)
searchSortOrderPicker
}
}
@@ -101,94 +229,52 @@ struct SearchView: View {
SearchTextField()
}
}
#endif
}
.onAppear {
if let query {
state.queryText = query.query
state.resetQuery(query)
updateFavoriteItem()
}
if !videos.isEmpty {
state.store.replace(ContentItem.array(of: videos))
}
}
.onChange(of: accounts.current) { _ in
state.reloadQuery()
}
.onChange(of: state.queryText) { newQuery in
if newQuery.isEmpty {
favoriteItem = nil
state.resetQuery()
} else {
updateFavoriteItem()
}
state.loadSuggestions(newQuery)
#if os(tvOS)
searchDebounce.invalidate()
recentsDebounce.invalidate()
searchDebounce.debouncing(2) {
state.changeQuery { query in
query.query = newQuery
}
.onAppear {
if let query {
state.queryText = query.query
state.resetQuery(query)
updateFavoriteItem()
}
recentsDebounce.debouncing(10) {
recents.addQuery(newQuery)
}
#endif
}
.onChange(of: searchSortOrder) { order in
state.changeQuery { query in
query.sortBy = order
updateFavoriteItem()
}
}
.onChange(of: searchDate) { date in
state.changeQuery { query in
query.date = date
updateFavoriteItem()
}
}
.onChange(of: searchDuration) { duration in
state.changeQuery { query in
query.duration = duration
updateFavoriteItem()
}
}
#if os(tvOS)
.searchable(text: $state.queryText) {
if !state.queryText.isEmpty {
ForEach(state.querySuggestions, id: \.self) { suggestion in
Text(suggestion)
.searchCompletion(suggestion)
if !videos.isEmpty {
state.store.replace(ContentItem.array(of: videos))
}
}
}
#else
.ignoresSafeArea(.keyboard, edges: .bottom)
.navigationTitle("Search")
#endif
#if os(iOS)
.toolbar {
ToolbarItem(placement: .navigationBarLeading) {
searchMenu
.onChange(of: accounts.current) { _ in
state.reloadQuery()
}
ToolbarItem(placement: .principal) {
if #available(iOS 15, *) {
FocusableSearchTextField()
.onChange(of: state.queryText) { newQuery in
if newQuery.isEmpty {
favoriteItem = nil
state.resetQuery()
} else {
SearchTextField()
updateFavoriteItem()
}
state.loadSuggestions(newQuery)
}
.onChange(of: searchSortOrder) { order in
state.changeQuery { query in
query.sortBy = order
updateFavoriteItem()
}
}
.onChange(of: searchDate) { date in
state.changeQuery { query in
query.date = date
updateFavoriteItem()
}
}
.onChange(of: searchDuration) { duration in
state.changeQuery { query in
query.duration = duration
updateFavoriteItem()
}
}
.frame(minWidth: Constants.contentViewMinWidth)
.navigationTitle("Search")
}
.navigationBarTitleDisplayMode(.inline)
#endif
}
#endif
#if os(iOS)
var searchMenu: some View {
@@ -230,11 +316,10 @@ struct SearchView: View {
}
} label: {
HStack {
Image(systemName: "magnifyingglass")
Image(systemName: "chevron.down.circle.fill")
.foregroundColor(.accentColor)
.imageScale(.large)
}
.foregroundColor(.accentColor)
.imageScale(.medium)
}
}
#endif

View File

@@ -11,9 +11,11 @@ struct AdvancedSettings: View {
@Default(.mpvHWdec) private var mpvHWdec
@Default(.mpvDemuxerLavfProbeInfo) private var mpvDemuxerLavfProbeInfo
@Default(.mpvInitialAudioSync) private var mpvInitialAudioSync
@Default(.mpvSetRefreshToContentFPS) private var mpvSetRefreshToContentFPS
@Default(.showCacheStatus) private var showCacheStatus
@Default(.feedCacheSize) private var feedCacheSize
@Default(.showPlayNowInBackendContextMenu) private var showPlayNowInBackendContextMenu
@Default(.videoLoadingRetryCount) private var videoLoadingRetryCount
@State private var filesToShare = [MPVClient.logFile]
@State private var presentingShareSheet = false
@@ -64,6 +66,7 @@ struct AdvancedSettings: View {
@ViewBuilder var advancedSettings: some View {
Section(header: SettingsHeader(text: "Advanced")) {
showPlayNowInBackendButtonsToggle
videoLoadingRetryCountField
}
Section(header: SettingsHeader(text: "MPV"), footer: mpvFooter) {
@@ -245,6 +248,12 @@ struct AdvancedSettings: View {
#endif
}
Toggle(isOn: $mpvSetRefreshToContentFPS) {
HStack {
Text("Sync refresh rate with content FPS EXPERIMENTAL")
}
}
if mpvEnableLogging {
logButton
}
@@ -281,6 +290,19 @@ struct AdvancedSettings: View {
Toggle("Show video context menu options to force selected backend", isOn: $showPlayNowInBackendContextMenu)
}
private var videoLoadingRetryCountField: some View {
HStack {
Text("Maximum retries for video loading")
.frame(minWidth: 200, alignment: .leading)
.multilineTextAlignment(.leading)
TextField("Limit", value: $videoLoadingRetryCount, formatter: NumberFormatter())
.multilineTextAlignment(.trailing)
#if !os(macOS)
.keyboardType(.numberPad)
#endif
}
}
var showMPVPlaybackStatsToggle: some View {
Toggle("Show playback statistics", isOn: $showMPVPlaybackStats)
}

View File

@@ -20,6 +20,7 @@ struct BrowsingSettings: View {
@Default(.showOpenActionsToolbarItem) private var showOpenActionsToolbarItem
@Default(.visibleSections) private var visibleSections
@Default(.startupSection) private var startupSection
@Default(.showSearchSuggestions) private var showSearchSuggestions
@Default(.playerButtonSingleTapGesture) private var playerButtonSingleTapGesture
@Default(.playerButtonDoubleTapGesture) private var playerButtonDoubleTapGesture
@Default(.playerButtonShowsControlButtonsWhenMinimized) private var playerButtonShowsControlButtonsWhenMinimized
@@ -67,6 +68,7 @@ struct BrowsingSettings: View {
homeSettings
if !accounts.isEmpty {
startupSectionPicker
showSearchSuggestionsToggle
visibleSectionsSettings
}
let interface = interfaceSettings
@@ -170,7 +172,7 @@ struct BrowsingSettings: View {
Orientation.lockOrientation(.portrait, andRotateTo: .portrait)
} else {
enterFullscreenInLandscape = false
Orientation.lockOrientation(.allButUpsideDown)
Orientation.lockOrientation(.all)
}
}
}
@@ -246,6 +248,10 @@ struct BrowsingSettings: View {
}
}
private var showSearchSuggestionsToggle: some View {
Toggle("Show search suggestions", isOn: $showSearchSuggestions)
}
private func toggleSection(_ section: VisibleSection, value: Bool) {
if value {
visibleSections.insert(section)

View File

@@ -8,6 +8,7 @@ struct PlayerControlsSettings: View {
@Default(.playerControlsLayout) private var playerControlsLayout
@Default(.fullScreenPlayerControlsLayout) private var fullScreenPlayerControlsLayout
@Default(.horizontalPlayerGestureEnabled) private var horizontalPlayerGestureEnabled
@Default(.fullscreenPlayerGestureEnabled) private var fullscreenPlayerGestureEnabled
@Default(.seekGestureSpeed) private var seekGestureSpeed
@Default(.seekGestureSensitivity) private var seekGestureSensitivity
@Default(.buttonBackwardSeekDuration) private var buttonBackwardSeekDuration
@@ -64,9 +65,10 @@ struct PlayerControlsSettings: View {
@ViewBuilder var sections: some View {
#if !os(tvOS)
Section(header: SettingsHeader(text: "Controls".localized()), footer: controlsLayoutFooter) {
#if !os(tvOS)
avPlayerUsesSystemControlsToggle
Section(header: SettingsHeader(text: "Player Controls".localized()), footer: controlsLayoutFooter) {
avPlayerUsesSystemControlsToggle
#if os(iOS)
fullscreenPlayerGestureEnabledToggle
#endif
horizontalPlayerGestureEnabledToggle
SettingsHeader(text: "Seek gesture sensitivity".localized(), secondary: true)
@@ -112,7 +114,7 @@ struct PlayerControlsSettings: View {
}
var controlsButtonsSection: some View {
Section(header: SettingsHeader(text: "Controls Buttons".localized())) {
Section(header: SettingsHeader(text: "Player Control Buttons".localized())) {
controlButtonToggles
}
}
@@ -157,8 +159,12 @@ struct PlayerControlsSettings: View {
#endif
}
private var fullscreenPlayerGestureEnabledToggle: some View {
Toggle("Swipe up toggles fullscreen", isOn: $fullscreenPlayerGestureEnabled)
}
private var horizontalPlayerGestureEnabledToggle: some View {
Toggle("Seek with horizontal swipe on video", isOn: $horizontalPlayerGestureEnabled)
Toggle("Seek with horizontal swipe", isOn: $horizontalPlayerGestureEnabled)
}
private var avPlayerUsesSystemControlsToggle: some View {

View File

@@ -315,7 +315,9 @@ struct QualityProfileForm: View {
func isResolutionDisabled(_ resolution: ResolutionSetting) -> Bool {
guard backend == .appleAVPlayer else { return false }
return resolution.value > .hd720p30
let hd720p30 = Stream.Resolution.predefined(.hd720p30)
return resolution.value > hd720p30
}
func initializeForm() {

View File

@@ -38,12 +38,14 @@ struct SubscriptionsView: View {
}
.pickerStyle(.segmented)
.labelStyle(.titleOnly)
subscriptionsMenu
}
.frame(maxWidth: 500)
}
ToolbarItem(placement: .navigationBarTrailing) {
subscriptionsMenu
}
ToolbarItem {
RequestErrorButton(error: requestError)
}
@@ -88,7 +90,7 @@ struct SubscriptionsView: View {
SettingsButtons()
}
} label: {
HStack(spacing: 12) {
HStack {
Image(systemName: "chevron.down.circle.fill")
.foregroundColor(.accentColor)
.imageScale(.large)

View File

@@ -52,7 +52,7 @@ struct VerticalCells<Header: View>: View {
.edgesIgnoringSafeArea(edgesIgnoringSafeArea)
#if os(macOS)
.background(Color.secondaryBackground)
.frame(minWidth: 360)
.frame(minWidth: Constants.contentViewMinWidth)
#endif
}

View File

@@ -211,7 +211,7 @@ struct YatteeApp: App {
let rotationOrientation =
OrientationTracker.shared.currentDeviceOrientation.rawValue == 4 ? UIInterfaceOrientation.landscapeRight :
(OrientationTracker.shared.currentDeviceOrientation.rawValue == 3 ? UIInterfaceOrientation.landscapeLeft : UIInterfaceOrientation.portrait)
Orientation.lockOrientation(.allButUpsideDown, andRotateTo: rotationOrientation)
Orientation.lockOrientation(.all, andRotateTo: rotationOrientation)
}
}
#endif

View File

@@ -398,7 +398,7 @@
"Hardware decoder" = "Décodeur matériel";
"Stream FPS" = "IPS du flux";
"Cached time" = "Temps mis en cache";
"Dropped frames" = "Images perdus";
"Dropped frames" = "Images perdues";
"Any format" = "Tout formats";
"Playlist is empty\n\nTap and hold on a video and then \n\"Add to Playlist\"" = "La liste de lecture est vide\n\nAppuyez longuement sur une vidéo, puis sur\n\"Ajouter à la liste de lecture\"";
"Comments are disabled" = "Les commentaires sont désactivés";

View File

@@ -0,0 +1,8 @@
" subscribers" = " feliratkozók";
"%@ Channel" = "%@ Csatorna";
"%@ Playlist" = "%@ Lejátszási lista";
"10 seconds forwards/backwards" = "10 másodperc előre/vissza";
"%@ subscribers" = "%@ feliratkozók";
"%lld videos" = "%lld videók";

View File

@@ -0,0 +1,98 @@
"Accounts" = "Imiḍanen";
"Chapters" = "Ixfawen";
"Clear" = "Sfeḍ";
"Close Video" = "Mdel tavidyutt";
"Donations" = "Mudd tawsa";
"Error" = "Tuccḍa";
"Help" = "Tallalt";
"Movies" = "Isura";
"Music" = "Aẓawan";
"Profiles" = "Imaɣnuyen";
"Search" = "Nadi";
"Search..." = "Nadi...";
"Settings" = "Iɣewwaṛen";
"TV" = "Tiliẓri";
"Year" = "Aseggas";
"Size" = "Tiddi";
"Address" = "Tansa";
"Channel" = "Abadu";
"Export..." = "Sifeḍ…";
"Advanced" = "Talqayt";
"All" = "Akk";
"Anonymous" = "Udrig";
"Any" = "Menwala";
"Automatic" = "S wudem awurman";
"Battery" = "Aẓru";
"Blue" = "Azegzaw";
"Button" = "Taqeffalt";
"Cancel" = "Sefsex";
"Category" = "Taggayt";
"Close" = "Mdel";
"Contact" = "Anermes";
"Comments" = "Iwenniten";
"Country" = "Tamurt";
"Continue" = "Ddu";
"Date" = "Azemz";
"Duration" = "Tanzagt";
"Delete" = "Kkes";
"Done" = "Immed";
"Edit" = "Ẓreg";
"Favorites" = "Imenyafen";
"Filter" = "Imzizdig";
"History" = "Amazray";
"Hour" = "Asrag";
"Info" = "Talɣut";
"Interface" = "Agrudem";
"Month" = "Ayyur";
"Name" = "Isem";
"Password" = "Awal n uεeddi";
"Edit..." = "Ẓreg...";
"Quality" = "Taɣara";
"Red" = "Azeggaɣ";
"Remove" = "Kkes";
"Replies" = "Tiririyin";
"Reset" = "Wennez";
"Restart" = "Ales asenker";
"Save" = "Sekles";
"Share..." = "Bḍu…";
"Source" = "Aɣbalu";
"unknown" = "arussin";
"URL" = "URL";
"Username" = "Isem n useqdac";
"Today" = "Ass-a";
"Videos" = "Tividyutin";
"Views" = "Timezriyin";
"Week" = "Amalas";
"Wiki" = "Wiki";
"Wi-Fi" = "Wi-Fi";
"Welcome" = "Ansuf";
"Yattee" = "Yattee";
"Statistics" = "Tidaddanin";
"Home" = "Tazwara";
"Hide" = "Ffer-it";
"Translations" = "Tisuqilin";
"Files" = "Ifuyla";
"Open" = "Ldi";
"Add" = "Rnu";
"Paste" = "Senṭeḍ";
"Channels" = "Ibuda";
"Share" = "Bḍu";
"Video" = "Tavidyutt";
"Documents" = "Isemliyen";
"Codec" = "Akudak";
"Audio" = "Imesli";
"File" = "Afaylu";
"FPS" = "FPS";
"Description" = "Aglam";
"Remove…" = "Kkes…";
"List" = "Tabdart";
"Export" = "Sifeḍ";
"Import" = "Kter";
"Platform" = "Tiɣerɣert";
"Add Account" = "Rnu amiḍan";
"Add Account..." = "Rnu amiḍan…";
"Add profile..." = "Rnu amaɣnu…";
"Clear History" = "Sfeḍ amazray";
"Discord Server" = "Aqeddac Discord";

View File

@@ -405,75 +405,75 @@
"No chapters information available" = "Ingen tilgjengelig kapittelinfo";
"Comments are disabled" = "Kommentarer er avskrudd";
"Press and hold remote button to open captions and quality menus" = "Trykk og hold fjernknappen for å åpne meny for undertekster og kvalitet";
"Paste" = "";
"Codec" = "";
"Open Videos" = "";
"Files" = "";
"Open Video" = "";
"Show only icons" = "";
"Show Open Videos toolbar button" = "";
"Channels" = "";
"Buttons labels" = "";
"Could not open Files" = "";
"Reload manifest" = "";
"Right" = "";
"Show Favorites" = "";
"Only for local files and URLs" = "";
"Enter link to open" = "";
"Left" = "";
"Are you sure you want to remove this document?" = "";
"Recent Documents" = "";
"Share files from Finder on a Mac\nor iTunes on Windows" = "";
"Address" = "";
"File" = "";
"Share" = "";
"Could not delete document" = "";
"Are you sure you want to remove %@ location?" = "";
"Size" = "";
"Always" = "";
"Video actions buttons" = "";
"Edit Favorites…" = "";
"Sample Rate" = "";
"Show Inspector" = "";
"Remove Location" = "";
"Format" = "";
"Verified" = "";
"Show icons and text when space permits" = "";
"Paste" = "Lim";
"Codec" = "Kodeks";
"Open Videos" = "Åpne Videoer";
"Files" = "Filer";
"Open Video" = "Åpne Video";
"Show only icons" = "Vis kun ikoner";
"Show Open Videos toolbar button" = "Vis Åpne Videoer verktøylinje knapp";
"Channels" = "Kanaler";
"Buttons labels" = "Knappe ettiketter";
"Could not open Files" = "Kunne ikke åpne fil";
"Reload manifest" = "Last manifest på nytt";
"Right" = "Høyre";
"Show Favorites" = "Vis Favoritter";
"Only for local files and URLs" = "Kun for lokale filer og URLer";
"Enter link to open" = "Gå inn i link for å åpne";
"Left" = "Venstre";
"Are you sure you want to remove this document?" = "Ønsker du virkelig å fjerne dette dokumentet";
"Recent Documents" = "Nylige Dokumenter";
"Share files from Finder on a Mac\nor iTunes on Windows" = "Del filer fra Finder på Mac\neller iTunes på Windows";
"Address" = "Addresse";
"File" = "Fil";
"Share" = "Del";
"Could not delete document" = "Klarte ikke å slette dokumentet";
"Are you sure you want to remove %@ location?" = "Er du sikker på at du ønsker å fjerne %@ lokalisjon?";
"Size" = "Størrelse";
"Always" = "Alltid";
"Video actions buttons" = "Knapper for video valg";
"Edit Favorites…" = "Rediger Favoritter...";
"Sample Rate" = "Stikkprøve rate";
"Show Inspector" = "Vis inspektør";
"Remove Location" = "Fjern lokasjon";
"Format" = "Format";
"Verified" = "Verifisert";
"Show icons and text when space permits" = "Vis ikoner og tekst når det er plass";
"Could not extract video ID" = "Kunne ikke pakke ut video-ID";
"Open Files" = "";
"Driver" = "";
"Show Open Videos quick actions" = "";
"Enter links to open, one per line" = "";
"No locations available at the moment" = "";
"Video Details" = "";
"Add" = "";
"Show Home" = "";
"Pages buttons" = "";
"Center" = "";
"Shorts" = "";
"Open" = "";
"Locations Manifest" = "";
"FPS" = "";
"Inspector visibility" = "";
"Show Documents" = "";
"Open Files" = "Åpne Filer";
"Driver" = "Driver";
"Show Open Videos quick actions" = "Vis hurtigvalg for åpning av Videoer";
"Enter links to open, one per line" = "Legg til lenker som skal åpnes, en per linje";
"No locations available at the moment" = "Ingen lokasjoner tilgjengelig for øyeblikket";
"Video Details" = "Video detaljer";
"Add" = "Legg til";
"Show Home" = "Vis Hjem";
"Pages buttons" = "Side knapper";
"Center" = "Senter";
"Shorts" = "Shorts";
"Open" = "Åpne";
"Locations Manifest" = "Lokasjonsmanifest";
"FPS" = "FPS";
"Inspector visibility" = "Inspektør synlighet";
"Show Documents" = "Vis Dokumenter";
"Open logs in Finder" = "Åpne loggføring i Finder";
"Documents" = "";
"Documents" = "Dokumenter";
"Could not update your token." = "Kunne ikke oppdatere symbolet ditt.";
"Remove…" = "";
"Hide" = "";
"Actions buttons" = "";
"Audio" = "";
"Remove…" = "Fjern";
"Hide" = "Gjem";
"Actions buttons" = "Handlings knapper";
"Audio" = "Lyd";
"Could not extract SID from received cookies: %@" = "Kunne ikke hente ut SID fra mottatte informasjonskapsler: %@";
"Playback Mode" = "";
"Clear Queue before opening" = "";
"Playback Mode" = "Avspilling Modus";
"Clear Queue before opening" = "Tøm kø før åpning";
"Could not create share link" = "Kunne ikke opprette delingslenke";
"Could not refresh Playlists" = "";
"Could not refresh Playlists" = "Kunne ikke gjenoppfriske spillelister";
"Could not refresh Subscriptions" = "Kunne ikke gjenoppfriske abonnementer";
"Translations" = "";
"This URL could not be opened" = "";
"For custom locations you can configure Frontend URL in Locations settings" = "";
"Could not refresh Trending" = "";
"If you want this app to be available in your language, join translation project." = "";
"Translations" = "Oversettelser";
"This URL could not be opened" = "Denne URL kunne ikke åpnes";
"For custom locations you can configure Frontend URL in Locations settings" = "For tilpassede lokasjoner kan du konfigurere Frontend URL i lokasjons instillinger";
"Could not refresh Trending" = "Kunne ikke gjenoppfriske trendende";
"If you want this app to be available in your language, join translation project." = "Hvis du ønsker denne appen tilgjengelig på ditt språk, bli med i oversettelses prosjektet";
"This video could not be opened" = "Kunne ikke åpne videoen";
"Could not open channel" = "Kunne ikke åpne kanal";
"Could not open playlist" = "Kunne ikke åpne spilleliste";
@@ -482,21 +482,21 @@
"Could not extract channel information" = "Kunne ikke hente kanalinfo";
"Could not load video" = "Kunne ikke laste inn video";
"Could not extract playlist ID" = "Kunne ikke hente ut spilleliste-ID";
"Could not refresh Popular" = "";
"Could not refresh Popular" = "Kunne ikke gjenoppfriske populært";
"Channel could not be found" = "Fant ikke kanalen";
"Live Streams" = "";
"Channel" = "";
"No documents" = "";
"\"%@\" will be irreversibly removed from this device." = "";
"Recent History" = "";
"Home" = "";
"Pages toolbar position" = "";
"URL to Open" = "";
"Video" = "";
"Could not find any links to open in your clipboard" = "";
"Show sidebar" = "";
"Default Profile" = "";
"Playback history is empty" = "";
"Copy%@link" = "";
"Share%@link" = "";
"Live Streams" = "Direkte strømmer";
"Channel" = "Kanal";
"No documents" = "Ingen dokumenter";
"\"%@\" will be irreversibly removed from this device." = "\"%@\" vil irreversibelt bli fjernet fra denne enheten";
"Recent History" = "Nylig Historie";
"Home" = "Hjem";
"Pages toolbar position" = "Verktøylinjeposisjon for sider";
"URL to Open" = "Åpne URL";
"Video" = "Video";
"Could not find any links to open in your clipboard" = "Kunne ikke finnen noen linker å åpne i utklippstavlen";
"Show sidebar" = "Vis sidebar";
"Default Profile" = "Standard profil";
"Playback history is empty" = "Avspillingshisotrikk er tom";
"Copy%@link" = "Kopier%@lenke";
"Share%@link" = "Del%@lenke";
"Share Logs..." = "Del logger …";

View File

@@ -0,0 +1,564 @@
"%@ Channel" = "%@ சேனல்";
"%@ Playlist" = "%@ பிளேலிச்ட்";
"%@ subscribers" = "%@ சந்தாதாரர்கள்";
"Accounts" = "கணக்குகள்";
"Accounts are not supported for the application of this instance" = "இந்த நிகழ்வின் பயன்பாட்டிற்கு கணக்குகள் ஆதரிக்கப்படவில்லை";
"Add Account" = "கணக்கைச் சேர்க்கவும்";
"Add Location" = "இருப்பிடத்தைச் சேர்க்கவும்";
"Add Location..." = "இருப்பிடத்தைச் சேர்க்கவும் ..";
"Add profile..." = "சுயவிவரத்தைச் சேர்க்கவும் ...";
"Add Quality Profile" = "தரமான சுயவிவரத்தைச் சேர்க்கவும்";
"Add to %@" = "%@ இல் சேர்க்கவும்";
"Add to Favorites" = "பிடித்தவைகளில் சேர்க்கவும்";
"Add to Playlist" = "பிளேலிச்ட்டில் சேர்க்கவும்";
"Add to Playlist..." = "பிளேலிச்ட்டில் சேர்க்கவும் ...";
"Advanced" = "மேம்பட்ட";
"All" = "அனைத்தும்";
"Always use AVPlayer for live videos" = "நேரடி வீடியோக்களுக்கு எப்போதும் AVPlayer ஐப் பயன்படுத்துங்கள்";
"Any" = "ஏதேனும்";
"Apply to all" = "அனைவருக்கும் பொருந்தும்";
"Create Playlist" = "பிளேலிச்ட்டை உருவாக்கவும்";
"Current: %@\n%@" = "நடப்பு: %@\n %@";
"Custom" = "தனிப்பயன்";
"Custom Locations" = "தனிப்பயன் இடங்கள்";
"Date" = "திகதி";
"Decrease rate" = "வீதத்தைக் குறைக்கவும்";
"Delete" = "அழி";
"Disabled" = "முடக்கப்பட்டது";
"Discord Server" = "முரண்பாடு சேவையகம்";
"Discussions take place in Discord and Matrix. It's a good spot for general questions." = "டிச்கார்ட் மற்றும் மேட்ரிக்சில் விவாதங்கள் நடைபெறுகின்றன. பொதுவான கேள்விகளுக்கு இது ஒரு நல்ல இடம்.";
"Don't use public locations" = "பொது இடங்களைப் பயன்படுத்த வேண்டாம்";
"Edit" = "தொகு";
"Edit Playlist" = "பிளேலிச்ட்டைத் திருத்து";
"Edit Quality Profile" = "தரமான சுயவிவரத்தைத் திருத்தவும்";
"Enable logging" = "பதிவை இயக்கவும்";
"Enable Return YouTube Dislike" = "YouTube வெறுப்பைத் திரும்பவும்";
"Error" = "பிழை";
"Error when accessing playlist" = "பிளேலிச்ட்டை அணுகும்போது பிழை";
"Save history of searches, channels and playlists" = "தேடல்கள், சேனல்கள் மற்றும் பிளேலிச்ட்களின் வரலாற்றைச் சேமிக்கவும்";
"Search" = "தேடல்";
"Search history is empty" = "தேடல் வரலாறு காலியாக உள்ளது";
"Sections" = "பிரிவுகள்";
"Seek with horizontal swipe on video" = "வீடியோவில் கிடைமட்ட ச்வைப் கொண்டு தேடுங்கள்";
"Matrix Channel" = "அணி சேனல்";
"Matrix Chat" = "அணி அரட்டை";
"Lock portrait mode" = "பூட்டு உருவப்படம் பயன்முறை";
"Long" = "நீண்ட";
"Low" = "குறைந்த";
"Low quality" = "குறைந்த தகுதி";
"Lowest" = "மிகக் குறைந்த";
"Mark as watched" = "பார்த்தபடி குறி";
"Mark video as watched after playing" = "விளையாடிய பிறகு பார்த்தபடி வீடியோவை குறிக்கவும்";
"Medium" = "சராசரி";
"Medium quality" = "நடுத்தர தகுதி";
"More info can be found in:" = "மேலும் தகவலைக் காணலாம்:";
"MPV Documentation" = "எம்.பி.வி ஆவணம்";
"Open \"Playlists\" tab to create new one" = "புதிய ஒன்றை உருவாக்க \"பிளேலிச்ட்கள்\" தாவலைத் திறக்கவும்";
"Open Settings" = "திறந்த அமைப்புகள்";
"Music" = "இசை";
"Name" = "பெயர்";
"Next" = "அடுத்தது";
"No Playlists" = "பிளேலிச்ட்கள் இல்லை";
"No results" = "முடிவுகள் இல்லை";
"Normal" = "சாதாரண";
"Not available" = "கிடைக்கவில்லை";
"Not Playing" = "விளையாடுவதில்லை";
"Nothing" = "எதுவும்";
"Offtopic in Music Videos" = "மியூசிக் வீடியோக்களில் ஓப்டோபிக்";
"Opening %@ stream…" = "திறத்தல் %@ ச்ட்ரீம்…";
"Outro" = "மற்றொன்று";
"Reset" = "மீட்டமை";
"Reset watched status when playing again" = "மீண்டும் விளையாடும்போது மீட்டெடுக்கப்பட்ட நிலையை மீட்டமை";
"Restart" = "மறுதொடக்கம்";
"Restart the app to apply the settings above." = "மேலே உள்ள அமைப்புகளைப் பயன்படுத்த பயன்பாட்டை மறுதொடக்கம் செய்யுங்கள்.";
"Restart/Play next" = "அடுத்து மறுதொடக்கம்/விளையாடுங்கள்";
"Restore default profiles..." = "இயல்புநிலை சுயவிவரங்களை மீட்டெடுங்கள் ...";
"Add Channels, Playlists and Searches to Favorites using" = "பயன்படுத்தப்பட்ட பிடித்தவைகளில் சேனல்கள், பிளேலிச்ட்கள் மற்றும் தேடல்களைச் சேர்க்கவும்";
"Playing Next" = "அடுத்து விளையாடுவது";
"You can switch between profiles in playback settings controls." = "பிளேபேக் அமைப்புகள் கட்டுப்பாடுகளில் சுயவிவரங்களுக்கு இடையில் நீங்கள் மாறலாம்.";
"Current Playlist" = "தற்போதைய பிளேலிச்ட்";
"Statistics" = "புள்ளிவிவரங்கள்";
"Playlist is empty\n\nTap and hold on a video and then \n\"Add to Playlist\"" = "பிளேலிச்ட் காலியாக உள்ளது\n\n ஒரு வீடியோவைத் தட்டவும் பிடிக்கவும்\n \"பிளேலிச்ட்டில் சேர்\"";
"It can be changed later in settings. You can use your own locations too." = "அதை பின்னர் அமைப்புகளில் மாற்றலாம். உங்கள் சொந்த இடங்களையும் பயன்படுத்தலாம்.";
"Hardware decoder" = "வன்பொருள் டிகோடர்";
"Stream FPS" = "ச்ட்ரீம் எஃப்.பி.எச்";
"Rate & Captions" = "விகிதம் மற்றும் தலைப்புகள்";
"Dropped frames" = "கைவிடப்பட்ட பிரேம்கள்";
"Any format" = "எந்த வடிவமும்";
"%@ formats" = "%@ வடிவங்கள்";
"Keep last played video in the queue after restart" = "மறுதொடக்கம் செய்த பிறகு வரிசையில் கடைசியாக விளையாடிய வீடியோவை வைத்திருங்கள்";
"Press and hold remote button to open captions and quality menus" = "தலைப்புகள் மற்றும் தர மெனுக்களைத் திறக்க தொலை பொத்தானை அழுத்திப் பிடிக்கவும்";
"Comments are disabled" = "கருத்துகள் முடக்கப்பட்டுள்ளன";
"No comments" = "கருத்துகள் இல்லை";
"Share Logs..." = "பதிவுகளைப் பகிரவும்…";
"Open logs in Finder" = "கண்டுபிடிப்பாளரில் திறந்த பதிவுகள்";
"Rotate to portrait when exiting fullscreen" = "முழுத்திரை வெளியேறும்போது உருவப்படத்திற்கு சுழல்க";
"Round corners" = "சுற்று மூலைகள்";
"Save history of played videos" = "விளையாடிய வீடியோக்களின் வரலாற்றைச் சேமிக்கவும்";
"Could not refresh Subscriptions" = "சந்தாக்களை புதுப்பிக்க முடியவில்லை";
"Could not load streams" = "ச்ட்ரீம்களை ஏற்ற முடியவில்லை";
"Could not open video" = "வீடியோவை திறக்க முடியவில்லை";
"Channel could not be found" = "சேனலைக் கண்டுபிடிக்க முடியவில்லை";
"Could not extract channel information" = "சேனல் தகவல்களைப் பிரித்தெடுக்க முடியவில்லை";
"Could not extract SID from received cookies: %@" = "பெறப்பட்ட குக்கீகளிலிருந்து SID ஐ பிரித்தெடுக்க முடியவில்லை: %@";
"Could not update your token." = "உங்கள் கிள்ளாக்கைப் புதுப்பிக்க முடியவில்லை.";
"Enter links to open, one per line" = "திறக்க இணைப்புகளை உள்ளிடவும், ஒரு வரிக்கு ஒன்று";
"Playback Mode" = "பிளேபேக் பயன்முறை";
"Hide" = "மறை";
"Always" = "எப்போதும்";
"Format" = "வடிவம்";
"Driver" = "இயக்கி";
"Only for local files and URLs" = "உள்ளக கோப்புகள் மற்றும் முகவரி களுக்கு மட்டுமே";
"Right" = "வலது";
"Channels" = "சேனல்கள்";
"Show icons and text when space permits" = "விண்வெளி அனுமதிக்கும்போது சின்னங்களையும் உரையையும் காட்டுங்கள்";
"Show only icons" = "ஐகான்களை மட்டும் காட்டு";
"Audio" = "ஆடியோ";
"File" = "கோப்பு";
"Video" = "ஒளிதோற்றம்";
"Codec" = "புரிப்பு";
"Size" = "அளவு";
"FPS" = "Fps";
"Sample Rate" = "மாதிரி வீதம்";
"Could not find any links to open in your clipboard" = "உங்கள் கிளிப்போர்டில் திறக்க எந்த இணைப்புகளையும் கண்டுபிடிக்க முடியவில்லை";
"Address" = "முகவரி";
"Remove…" = "அகற்று…";
"Actions buttons" = "செயல்கள் பொத்தான்கள்";
"Show sidebar" = "பக்கப்பட்டியைக் காட்டு";
"Locations Manifest" = "இருப்பிடங்கள் வெளிப்படுகின்றன";
"Remove Location" = "இருப்பிடத்தை அகற்று";
"Default Profile" = "இயல்புநிலை சுயவிவரம்";
"Playback history is empty" = "பின்னணி வரலாறு காலியாக உள்ளது";
"Copy%@link" = "நகலெடு%@இணைப்பு";
"Are you sure you want to remove this document?" = "இந்த ஆவணத்தை அகற்ற விரும்புகிறீர்களா?";
"\"%@\" will be irreversibly removed from this device." = "\"%@\" இந்த சாதனத்திலிருந்து மாற்றமுடியாமல் அகற்றப்படும்.";
"Are you sure you want to remove %@ location?" = "%@ இருப்பிடத்தை அகற்ற விரும்புகிறீர்களா?";
"Shorts" = "குறுக்குகள்";
"Verified" = "சரிபார்க்கப்பட்டது";
"Channel" = "வாய்க்கால்";
"Open expanded" = "திறந்த விரிவாக்கப்பட்டது";
"Mark channel feed as unwatched" = "சேனல் தீவனத்தை கவனக்குறைவாகக் குறிக்கவும்";
"Mark channel feed as watched" = "பார்த்தபடி சேனல் ஊட்டத்தைக் குறிக்கவும்";
"Short videos: visible" = "குறுகிய வீடியோக்கள்: தெரியும்";
"Short videos: hidden" = "குறுகிய வீடியோக்கள்: மறைக்கப்பட்டுள்ளன";
"Play all unwatched" = "எல்லாவற்றையும் கவனிக்காமல் விளையாடுங்கள்";
"Double tap gesture" = "இரட்டை குழாய் சைகை";
"Tap and hold channel thumbnail to open context menu with more actions" = "மேலும் செயல்களுடன் சூழல் மெனுவைத் திறக்க சேனல் சிறுபடத்தைத் தட்டி வைத்திருங்கள்";
"Single tap gesture" = "ஒற்றை குழாய் சைகை";
"Mark all as unwatched" = "அனைத்தையும் கவனக்குறைவாகக் குறிக்கவும்";
"Queue - shuffled" = "வரிசை - மாற்றப்பட்டது";
"Playback Settings" = "பின்னணி அமைப்புகள்";
"Replay" = "மீண்டும்";
"Fullscreen" = "முழு திரை";
"Description" = "விவரம்";
"Loop one" = "லூப் ஒன்";
"Autoplay next" = "ஆட்டோ பிளே அடுத்து";
"Stream" = "ச்ட்ரீம்";
"Enter account credentials to connect..." = "இணைக்க கணக்கு நற்சான்றிதழ்களை உள்ளிடவும் ...";
"Enter location address to connect..." = "இணைக்க இருப்பிட முகவரியை உள்ளிடவும் ...";
"Seek" = "தேடுங்கள்";
"Opened File" = "திறந்த கோப்பு";
"File Extension" = "கோப்பு நீட்டிப்பு";
"Opening file…" = "கோப்பைத் திறக்கும்…";
"Public account" = "பொது கணக்கு";
"Your Accounts" = "உங்கள் கணக்குகள்";
"Browse without account" = "கணக்கு இல்லாமல் உலாவுக";
"Close video and player on end" = "முடிவில் வீடியோ மற்றும் பிளேயரை மூடு";
"Use system controls with AVPlayer" = "AVPlayer உடன் கணினி கட்டுப்பாடுகளைப் பயன்படுத்தவும்";
"Rotate when entering fullscreen on landscape video" = "நிலப்பரப்பு வீடியோவில் முழுத்திரை நுழையும்போது சுழற்றுங்கள்";
"Landscape right" = "இயற்கை சரியானது";
"No rotation" = "சுழற்சி இல்லை";
"Available" = "கிடைக்கிறது";
"Startup section" = "தொடக்க பிரிவு";
"Home Settings" = "வீட்டு அமைப்புகள்";
"Watched: hidden" = "பார்த்தது: மறைக்கப்பட்டுள்ளது";
"(watched and shorts hidden)" = "(பார்த்த மற்றும் குறும்படங்கள் மறைக்கப்பட்டுள்ளன)";
"No videos to show" = "காட்ட வீடியோக்கள் இல்லை";
"(watched hidden)" = "(மறைக்கப்பட்டிருப்பதைப் பார்த்தேன்)";
"(shorts hidden)" = "(சார்ட்ச் மறைக்கப்பட்டுள்ளது)";
"Disable filters" = "வடிப்பான்களை முடக்கு";
"Limit" = "வரம்பு";
"Are you sure you want to remove %@ from Favorites?" = "பிடித்தவைகளிலிருந்து %@ ஐ அகற்ற விரும்புகிறீர்களா?";
"Smaller" = "மிகசிறிய";
"Clear all" = "அனைத்தையும் அழி";
"URL" = "இணையமுகவரி";
"Badge" = "பதக்கம்";
"Badge & Decreased opacity" = "பதக்கம் மற்றும் ஒளிபுகாநிலை குறைவு";
"Show unwatched feed badges" = "எடுக்கப்படாத தீவன பதக்ங்களைக் காட்டு";
" subscribers" = " சந்தாதாரர்கள்";
"%lld videos" = "%எல்.எல்.டி வீடியோக்கள்";
"10 seconds forwards/backwards" = "10 வினாடிகள் முன்னோக்கி/பின்தங்கிய";
"Add Account..." = "கணக்கைச் சேர்க்கவும் ...";
"Anonymous" = "அநாமதேய";
"Autoplaying Next" = "அடுத்ததாக ஆட்டோபிளேயிங்";
"Based on system color scheme" = "கணினி வண்ணத் திட்டத்தின் அடிப்படையில்";
"Battery" = "மின்கலம்";
"Button" = "பொத்தான்";
"Clear" = "தெளிவான";
"Clear Search History..." = "தேடல் வரலாற்றை அழிக்கவும் ...";
"Close" = "மூடு";
"Close player when starting PiP" = "PIP ஐத் தொடங்கும்போது வீரர்";
"Close Video" = "வீடியோவை மூடு";
"Connection failed" = "இணைப்பு தோல்வியடைந்தது";
"Contributing" = "பங்களிப்பு";
"Country" = "நாடு";
"Country Name or Code" = "நாட்டின் பெயர் அல்லது குறியீடு";
"Decreased opacity" = "ஒளிபுகாநிலை குறைந்தது";
"Donations" = "நன்கொடைகள்";
"Done" = "முடிந்தது";
"Duration" = "காலம்";
"Edit..." = "திருத்து ...";
"Enter fullscreen in landscape" = "நிலப்பரப்பில் முழுத்திரை உள்ளிடவும்";
"Favorites" = "பிடித்தவை";
"Filter" = "வடிப்பி";
"For videos which feature music as the primary content." = "இசையை முதன்மை உள்ளடக்கமாக இடம்பெறும் வீடியோக்களுக்கு.";
"Frontend URL" = "ஃபிரான்டென்ட் முகவரி";
"Fullscreen size" = "முழுத்திரை அளவு";
"Help" = "உதவி";
"I like this app!" = "இந்த பயன்பாட்டை நான் விரும்புகிறேன்!";
"Increase rate" = "வீதத்தை அதிகரிக்கவும்";
"Info" = "தகவல்";
"Interaction" = "உள்வினை";
"Issues Tracker" = "டிராக்கரை வெளியிடுகிறது";
"Just watched" = "இப்போது பார்த்தேன்";
"LIVE" = "வாழ";
"Loading streams…" = "ச்ட்ரீம்களை ஏற்றுகிறது…";
"Mark watched videos with" = "மார்க் பார்த்த வீடியோக்கள்";
"Milestones" = "மைல்கற்கள்";
"Month" = "மாதம்";
"Movies" = "திரைப்படங்கள்";
"New Playlist" = "புதிய பிளேலிச்ட்";
"No description" = "விளக்கம் இல்லை";
"Only when signed in" = "கையொப்பமிடும்போது மட்டுமே";
"Opening audio stream…" = "ஆடியோ ச்ட்ரீமைத் திறக்கிறது…";
"Orientation" = "நோக்குநிலை";
"Password" = "கடவுச்சொல்";
"Playback" = "பின்னணி";
"Preferred Formats" = "விருப்பமான வடிவங்கள்";
"Profiles" = "சுயவிவரங்கள்";
"Rate" = "விகிதம்";
"Recents" = "அண்மைக் கால";
"Regular Size" = "வழக்கமான அளவு";
"Related" = "தொடர்புடைய";
"Relevance" = "பொருத்தமானது";
"Remove from history" = "வரலாற்றிலிருந்து அகற்று";
"Reset search filters" = "தேடல் வடிப்பான்களை மீட்டமைக்கவும்";
"Resolution" = "பகுத்தல்";
"Save" = "சேமி";
"Search..." = "தேடுங்கள் ...";
"Seek gesture sensitivity" = "சைகை உணர்திறனைத் தேடுங்கள்";
"Seek gesture speed" = "சைகை வேகத்தைத் தேடுங்கள்";
"Self-promotion" = "தன்வய ஊக்குவிப்பு";
"Share %@ link" = "பகிர்வு %@ இணைப்பு";
"Share %@ link with time" = "நேரத்துடன் %@ இணைப்பைப் பகிரவும்";
"Show history" = "வரலாற்றைக் காட்டு";
"Show playback statistics" = "பிளேபேக் புள்ளிவிவரங்களைக் காட்டு";
"Shuffle" = "கலக்கு";
"Sign In Required" = "தேவையான உள்நுழைவு";
"Sort" = "வரிசைப்படுத்து";
"Subscribe" = "குழுசேர்";
"Subscriptions" = "சந்தாக்கள்";
"Switch to other public location" = "பிற பொது இருப்பிடத்திற்கு மாறவும்";
"This cannot be reverted" = "இதை மாற்ற முடியாது";
"Thumbnails" = "சிறு உருவங்கள்";
"unknown" = "தெரியவில்லை";
"Unsubscribe" = "குழுவிலகவும்";
"Used to create links from videos, channels and playlists" = "வீடியோக்கள், சேனல்கள் மற்றும் பிளேலிச்ட்களிலிருந்து இணைப்புகளை உருவாக்க பயன்படுகிறது";
"Watched %@" = "பார்த்தது %@";
"Week" = "வாரம்";
"Yattee" = "யாட்டீ";
"Yattee %@ (build %@)" = "Yattee %@ (உருவாக்க %@)";
"You have no Playlists" = "உங்களிடம் பிளேலிச்ட்கள் இல்லை";
"Playback queue is empty" = "பிளேபேக் வரிசை காலியாக உள்ளது";
"Make default" = "இயல்புநிலை செய்யுங்கள்";
"Visibility" = "விழிமை";
"Stream & Player" = "ச்ட்ரீம் & பிளேயர்";
"Cached time" = "தற்காலிக சேமிப்பு நேரம்";
"No chapters information available" = "அத்தியாயங்கள் செய்தி எதுவும் கிடைக்கவில்லை";
"Could not refresh Trending" = "போக்கைப் புதுப்பிக்க முடியவில்லை";
"This URL could not be opened" = "இந்த முகவரி ஐ திறக்க முடியவில்லை";
"Could not open channel" = "சேனலைத் திறக்க முடியவில்லை";
"Could not extract playlist ID" = "பிளேலிச்ட் ஐடியை பிரித்தெடுக்க முடியவில்லை";
"Could not load video" = "வீடியோவை ஏற்ற முடியவில்லை";
"Could not refresh Playlists" = "பிளேலிச்ட்களைப் புதுப்பிக்க முடியவில்லை";
"Home" = "வீடு";
"Show Home" = "வீட்டைக் காட்டு";
"Recent History" = "அண்மைக் கால வரலாறு";
"Reload manifest" = "மீண்டும் ஏற்றவும்";
"Enter link to open" = "திறக்க இணைப்பை உள்ளிடவும்";
"Add" = "கூட்டு";
"Open Files" = "கோப்புகளைத் திறக்கவும்";
"Share" = "பங்கு";
"Left" = "இடது";
"Center" = "நடுவண்";
"Documents" = "ஆவணங்கள்";
"Open Video" = "வீடியோ திறந்த வீடியோ";
"Share%@link" = "பகிர்வு%@இணைப்பு";
"Could not delete document" = "ஆவணத்தை நீக்க முடியவில்லை";
"Live Streams" = "நேரடி நீரோடைகள்";
"Player Bar" = "பிளேயர் பார்";
"Always show controls buttons" = "எப்போதும் கட்டுப்பாட்டு பொத்தான்களைக் காட்டு";
"Maximum width expanded" = "அதிகபட்ச அகலம் விரிவடைந்தது";
"Seeking" = "தேடுவது";
"Controls Buttons" = "பொத்தான்களைக் கட்டுப்படுத்துகிறது";
"Controls button: backwards" = "கட்டுப்பாடுகள் பொத்தான்: பின்னோக்கி";
"Controls button: forwards" = "கட்டுப்பாடுகள் பொத்தான்: முன்னோக்கி";
"Hide player" = "பிளேயரை மறைக்க";
"Actions Buttons" = "செயல்கள் பொத்தான்கள்";
"Music Mode" = "இசை முறை";
"Subscribe/Unsubscribe" = "குழுசேரவும்/குழுவிலகவும்";
"Toggle player" = "பிளேயரை மாற்றவும்";
"Feed" = "தீவனம்";
"Inspector" = "இன்ச்பெக்டர்";
"Mark all as watched" = "பார்த்தபடி அனைவரையும் குறிக்கவும்";
"Lock" = "பூட்டு";
"Show scroll to top button in comments" = "கருத்துகளில் மேல் பொத்தானைக் காட்டுங்கள்";
"Landscape left" = "இயற்கை இடது";
"Watched: visible" = "பார்த்தது: தெரியும்";
"Play Now in AVPlayer" = "AVPlayer இல் இப்போது விளையாடுங்கள்";
"Show channel avatars in videos lists" = "வீடியோ பட்டியலில் சேனல் அவதாரங்களைக் காட்டு";
"Description preview" = "விளக்கம் முன்னோட்டம்";
"No preview" = "முன்னோட்டம் இல்லை";
"Other" = "மற்ற";
"Are you sure you want to export unencrypted passwords?" = "மறைகுறியாக்கப்பட்ட கடவுச்சொற்களை ஏற்றுமதி செய்ய விரும்புகிறீர்களா?";
"Icon only" = "படவுரு மட்டும்";
"Platform" = "இயங்குதளம்";
"Action button labels" = "செயல் பொத்தான் லேபிள்கள்";
"Export in progress..." = "முன்னேற்றத்தில் ஏற்றுமதி ...";
"In progress..." = "செயலில் உள்ளது…";
"Contact" = "தொடர்பு";
"Continue" = "தொடரவும்";
"Continue from %@" = "%@ இலிருந்து தொடரவும்";
"Controls" = "கட்டுப்பாடுகள்";
"Copy %@ link" = "நகலெடு %@ இணைப்பு";
"Copy %@ link with time" = "நேரத்துடன் %@ இணைப்பை நகலெடுக்கவும்";
"Could not load locations manifest" = "இருப்பிடங்களை வெளிப்படையாக ஏற்ற முடியவில்லை";
"Are you sure you want to clear history of watched videos?" = "பார்த்த வீடியோக்களின் வரலாற்றை அழிக்க விரும்புகிறீர்களா?";
"Are you sure you want to clear search history?" = "தேடல் வரலாற்றை அழிக்க விரும்புகிறீர்களா?";
"Are you sure you want to delete playlist?" = "பிளேலிச்ட்டை நீக்க விரும்புகிறீர்களா?";
"Are you sure you want to restore default quality profiles?" = "இயல்புநிலை தர சுயவிவரங்களை மீட்டெடுக்க விரும்புகிறீர்களா?";
"Are you sure you want to unsubscribe from %@?" = "%@இலிருந்து குழுவிலக விரும்புகிறீர்களா?";
"Automatic" = "தானியங்கி";
"Backend" = "பின்தளத்தில்";
"Blue" = "நீலம்";
"Browsing" = "உலாவுதல்";
"Buffering stream..." = "இடையக ச்ட்ரீம் ...";
"Bugs and great feature ideas can be sent to the GitHub issues tracker. " = "பிழைகள் மற்றும் சிறந்த அம்ச யோசனைகளை அறிவிலிமையம் சிக்கல்கள் டிராக்கருக்கு அனுப்பலாம். ";
"Cancel" = "ரத்துசெய்";
"Captions" = "தலைப்புகள்";
"Categories to Skip" = "தவிர்க்க வகைகள்";
"Category" = "வகை";
"Cellular" = "செல்லுலார்";
"Chapters" = "பாடங்கள்";
"Charging" = "சார்சிங்";
"Clear All" = "அனைத்தையும் அழிக்கவும்";
"Clear All Recents" = "எல்லா நெறிமுறைகளையும் அழிக்கவும்";
"Clear History" = "வரலாற்றை அழிக்கவும்";
"Clear Search History" = "தேடல் வரலாற்றை அழிக்கவும்";
"Clear the queue" = "வரிசையை அழிக்கவும்";
"Close PiP and open player when application enters foreground" = "பயன்பாடு முன்புறத்தில் நுழையும்போது மூடிய குழாய் மற்றும் திறந்த பிளேயர்";
"Close PiP when player is opened" = "பிளேயர் திறக்கப்படும்போது பிப் மூடு";
"Close PiP when starting playing other video" = "மற்ற வீடியோவை இயக்கத் தொடங்கும் போது PIP ஐ மூடு";
"Close player when closing video" = "வீடியோவை மூடும்போது பிளேயரை மூடு";
"Close video after playing last in the queue" = "வரிசையில் கடைசியாக விளையாடிய பிறகு வீடியோவை மூடு";
"Comments" = "கருத்துகள்";
"Connected successfully (%@)" = "வெற்றிகரமாக இணைக்கப்பட்டுள்ளது (%@)";
"Badge color" = "பதக்க நிறம்";
"Explicit reminders to like, subscribe or interact with them on any paid or free platform(s) (e.g. click on a video)." = "எந்தவொரு கட்டண அல்லது இலவச தளத்திலும் (கள்) (எ.கா. ஒரு வீடியோவில் சொடுக்கு செய்க) அவர்களுடன் விரும்புவது, குழுசேர அல்லது தொடர்பு கொள்ள வெளிப்படையான நினைவூட்டல்கள்.";
"Filter: active" = "வடிகட்டி: செயலில்";
"Find Other" = "மற்றவர்களைக் கண்டுபிடி";
"Finding something to play..." = "விளையாட ஏதாவது கண்டுபிடிப்பது ...";
"Formats will be selected in order as listed.\nHLS is an adaptive format (resolution setting does not apply)." = "பட்டியலிடப்பட்டபடி வடிவங்கள் வரிசையில் தேர்ந்தெடுக்கப்படும்.\n எச்.எல்.எச் என்பது ஒரு தகவமைப்பு வடிவமாகும் (தீர்மான அமைப்பு பொருந்தாது).";
"Gaming" = "கேமிங்";
"Hide sidebar" = "பக்கப்பட்டியை மறைக்கவும்";
"High" = "உயர்ந்த";
"Highest" = "அதிகபட்சம்";
"Highest quality" = "மிக உயர்ந்த தகுதி";
"History" = "வரலாறு";
"Honor orientation lock" = "மரியாதை நோக்குநிலை பூட்டு";
"Hour" = "மணி";
"I am lost" = "நான் தொலைந்துவிட்டேன்";
"I found a bug /" = "நான் ஒரு பிழையைக் கண்டேன் /";
"I have a feature request" = "எனக்கு ஒரு அம்ச கோரிக்கை உள்ளது";
"I want to ask a question" = "நான் ஒரு கேள்வி கேட்க விரும்புகிறேன்";
"If you are interested what's coming in future updates, you can track project Milestones." = "எதிர்கால புதுப்பிப்புகளில் என்ன வரப்போகிறது என்பதை நீங்கள் ஆர்வமாக இருந்தால், திட்ட மைல்கற்களைக் கண்காணிக்கலாம்.";
"If you are reporting a bug, include all relevant details (especially: app version, used device and system version, steps to reproduce)." = "நீங்கள் ஒரு பிழையைப் புகாரளிக்கிறீர்கள் என்றால், தொடர்புடைய அனைத்து விவரங்களையும் சேர்க்கவும் (குறிப்பாக: பயன்பாட்டு பதிப்பு, பயன்படுத்தப்பட்ட சாதனம் மற்றும் கணினி பதிப்பு, இனப்பெருக்கம் செய்வதற்கான படிகள்).";
"Instance of current account" = "நடப்பு கணக்கின் நிகழ்வு";
"Interface" = "இடைமுகம்";
"Intro" = "அறிமுகம்";
"Large" = "பெரிய";
"Large layout is not suitable for all devices and using it may cause controls not to fit on the screen." = "பெரிய தளவமைப்பு எல்லா சாதனங்களுக்கும் பொருத்தமானதல்ல, அதைப் பயன்படுத்துவது கட்டுப்பாடுகள் திரையில் பொருந்தாது.";
"Loading..." = "ஏற்றுகிறது ...";
"Locations" = "இருப்பிடங்கள்";
"Replies" = "பதில்கள்";
"Part of a video promoting a product or service not directly related to the creator. The creator will receive payment or compensation in the form of money or free products." = "படைப்பாளருடன் நேரடியாக தொடர்புடைய ஒரு தயாரிப்பு அல்லது சேவையை ஊக்குவிக்கும் வீடியோவின் ஒரு பகுதி. படைப்பாளி பணம் அல்லது இலவச தயாரிப்புகளின் வடிவத்தில் கட்டணம் அல்லது இழப்பீட்டைப் பெறுவார்.";
"Pause" = "இடைநிறுத்தம்";
"Pause when entering background" = "பின்னணியில் நுழையும்போது இடைநிறுத்தம்";
"Pause when player is closed" = "வீரர் மூடப்படும் போது இடைநிறுத்தம்";
"Picture in Picture" = "படத்தில் படம்";
"Play" = "விளையாடுங்கள்";
"Play All" = "அனைத்தையும் விளையாடுங்கள்";
"Play in PiP" = "பைப்பில் விளையாடுங்கள்";
"Play Last" = "கடைசியாக விளையாடுங்கள்";
"Play Music" = "இசை வாசிக்கவும்";
"Play Next" = "அடுத்து விளையாடுங்கள்";
"Play Now" = "இப்போது விளையாடுங்கள்";
"Player" = "வீரர்";
"Playlist" = "பிளேலிச்ட்";
"Playlist \"%@\" will be deleted.\nIt cannot be reverted." = "பிளேலிச்ட் \"%@\" நீக்கப்படும்.\n அதை மாற்ற முடியாது.";
"Playlists" = "பிளேலிச்ட்கள்";
"Popular" = "மக்கள்";
"Promoting a product or service that is directly related to the creator themselves. This usually includes merchandise or promotion of monetized platforms." = "படைப்பாளருடன் நேரடியாக தொடர்புடைய ஒரு தயாரிப்பு அல்லது சேவையை ஊக்குவித்தல். இது வழக்கமாக பணமாக்கப்பட்ட தளங்களின் வணிக அல்லது விளம்பரத்தை உள்ளடக்கியது.";
"Proxy videos" = "பதிலாள் வீடியோக்கள்";
"Public Locations" = "பொது இடங்கள்";
"Public Manifest" = "பொது மேனிஃபெச்ட்";
"Quality" = "தகுதி";
"Quality Profile" = "தரமான சுயவிவரம்";
"Queue" = "வரிசை";
"Queue is empty" = "வரிசை காலியாக உள்ளது";
"Rating" = "செயல்வரம்பு";
"Red" = "சிவப்பு";
"Refresh" = "புதுப்பிப்பு";
"Regular size" = "வழக்கமான அளவு";
"Remove" = "அகற்று";
"Remove from Favorites" = "பிடித்தவைகளிலிருந்து அகற்று";
"Remove from Playlist" = "பிளேலிச்ட்டிலிருந்து அகற்று";
"Remove from the queue" = "வரிசையிலிருந்து அகற்று";
"Segments typically found at the start of a video that include an animation, still frame or clip which are also seen in other videos by the same creator." = "அனிமேசன், இன்னும் சட்டகம் அல்லது கிளிப் ஆகியவற்றை உள்ளடக்கிய வீடியோவின் தொடக்கத்தில் பொதுவாகக் காணப்படும் பிரிவுகள், அதே படைப்பாளரால் மற்ற வீடியோக்களிலும் காணப்படுகின்றன.";
"Select location closest to you:" = "உங்களுக்கு மிக நெருக்கமான இருப்பிடத்தைத் தேர்ந்தெடுக்கவும்:";
"Settings" = "அமைப்புகள்";
"Share..." = "பங்கு ...";
"Short" = "குறுக்கு";
"Show account username" = "கணக்கு பயனர்பெயரைக் காட்டு";
"Show anonymous accounts" = "அநாமதேய கணக்குகளைக் காட்டு";
"Show channel name" = "சேனல் பெயரைக் காட்டு";
"Show keywords" = "முக்கிய வார்த்தைகளைக் காட்டு";
"Show progress of watching on thumbnails" = "சிறுபடங்களில் பார்க்கும் முன்னேற்றத்தைக் காட்டுங்கள்";
"Show sidebar when space permits" = "விண்வெளி அனுமதிக்கும் போது பக்கப்பட்டியைக் காட்டு";
"Show video length" = "வீடியோ நீளத்தைக் காட்டு";
"Shuffle All" = "அனைத்தையும் மாற்றவும்";
"Sidebar" = "பக்கப்பட்டி";
"Small" = "சிறிய";
"Sort: %@" = "வரிசைப்படுத்துதல்: %@";
"Source" = "மூலம்";
"Sponsor" = "ஒப்புரவாளர்";
"SponsorBlock" = "ஒப்புரவாளர் தொகுதி";
"SponsorBlock API Instance" = "ஒப்புரவாளர் பிளாக் பநிஇ நிகழ்வு";
"Switch to public locations" = "பொது இடங்களுக்கு மாறவும்";
"System controls buttons" = "கணினி பொத்தான்களைக் கட்டுப்படுத்துகிறது";
"System controls show buttons for %@" = "கணினி கட்டுப்பாடுகள் %@ க்கான பொத்தான்களைக் காட்டுகின்றன";
"That's nice to hear. It is fun to deliver apps other people want to use. You can consider donating to the project or help by contributing to new features development." = "அதைக் கேட்பது நல்லது. மற்றவர்கள் பயன்படுத்த விரும்பும் பயன்பாடுகளை வழங்குவது வேடிக்கையாக உள்ளது. புதிய நற்பொருத்தங்கள் மேம்பாட்டுக்கு பங்களிப்பதன் மூலம் திட்டத்திற்கு நன்கொடை அளிப்பதை நீங்கள் பரிசீலிக்கலாம்.";
"This cannot be reverted. You might need to switch between views or restart the app to see changes." = "இதை மாற்ற முடியாது. மாற்றங்களைக் காண நீங்கள் காட்சிகளுக்கு இடையில் மாற வேண்டும் அல்லது பயன்பாட்டை மறுதொடக்கம் செய்ய வேண்டும்.";
"Private" = "தனிப்பட்ட";
"This information will be processed only on your device and used to connect you to the server in the specified country." = "இந்த செய்தி உங்கள் சாதனத்தில் மட்டுமே செயலாக்கப்படும் மற்றும் குறிப்பிட்ட நாட்டில் உள்ள சேவையகத்துடன் உங்களை இணைக்கப் பயன்படுகிறது.";
"This will remove all your custom profiles and return their default values. This cannot be reverted." = "இது உங்கள் தனிப்பயன் சுயவிவரங்கள் அனைத்தையும் அகற்றி அவற்றின் இயல்புநிலை மதிப்புகளைத் தரும். இதை மாற்ற முடியாது.";
"Today" = "இன்று";
"Trending" = "டிரெண்டிங்";
"TV" = "டிவி";
"Typically near or at the end of the video when the credits pop up and/or endcards are shown." = "பொதுவாக வீடியோவின் அருகில் அல்லது வரவுகளை பாப் அப் மற்றும்/அல்லது எண்ட்கார்டுகள் காண்பிக்கும் போது.";
"Upload date" = "பதிவேற்ற தேதி";
"Username" = "பயனர்பெயர்";
"Very Large" = "மிகப் பெரியது";
"Videos" = "வீடியோக்கள்";
"Views" = "காட்சிகள்";
"Watched" = "பார்த்தேன்";
"Watching now" = "இப்போது பார்க்கிறது";
"Welcome" = "வரவேற்கிறோம்";
"When partially watched video is played" = "ஓரளவு பார்த்த வீடியோ இசைக்கப்படும் போது";
"Wi-Fi" = "இல்";
"Wiki" = "விக்கி";
"Year" = "ஆண்டு";
"You can find information about using Yattee in the Wiki pages." = "விக்கி பக்கங்களில் யாட்டியைப் பயன்படுத்துவது பற்றிய தகவல்களை நீங்கள் காணலாம்.";
"You can use automatic profile selection based on current device status or switch it in video playback settings controls." = "தற்போதைய சாதன நிலையின் அடிப்படையில் தானியங்கி சுயவிவரத் தேர்வைப் பயன்படுத்தலாம் அல்லது வீடியோ பிளேபேக் அமைப்புகள் கட்டுப்பாடுகளில் அதை மாற்றலாம்.";
"You have no playlists\n\nTap on \"New Playlist\" to create one" = "உங்களிடம் பிளேலிச்ட்கள் இல்லை\n\n ஒன்றை உருவாக்க \"புதிய பிளேலிச்ட்டை\" தட்டவும்";
"You need to create an instance and accounts\nto access %@ section" = "நீங்கள் ஒரு நிகழ்வு மற்றும் கணக்குகளை உருவாக்க வேண்டும்\n %@ பிரிவை அணுக";
"You need to select an account\nto access %@ section" = "நீங்கள் ஒரு கணக்கைத் தேர்ந்தெடுக்க வேண்டும்\n %@ பிரிவை அணுக";
"Public" = "பொது";
"Unlisted" = "பட்டியலிடப்படாதது";
"Now Playing" = "இப்போது விளையாடுகிறது";
"Current Location" = "தற்போதைய இடம்";
"For custom locations you can configure Frontend URL in Locations settings" = "தனிப்பயன் இடங்களுக்கு நீங்கள் இருப்பிட அமைப்புகளில் முன்பக்க முகவரி ஐ உள்ளமைக்கலாம்";
"Could not refresh Popular" = "பிரபலமாக புதுப்பிக்க முடியவில்லை";
"Could not create share link" = "பங்கு இணைப்பை உருவாக்க முடியவில்லை";
"Could not open playlist" = "பிளேலிச்ட்டைத் திறக்க முடியவில்லை";
"Could not extract video ID" = "வீடியோ ஐடியை பிரித்தெடுக்க முடியவில்லை";
"This video could not be opened" = "இந்த வீடியோவை திறக்க முடியவில்லை";
"No locations available at the moment" = "இந்த நேரத்தில் இடங்கள் எதுவும் கிடைக்கவில்லை";
"If you want this app to be available in your language, join translation project." = "இந்த பயன்பாடு உங்கள் மொழியில் கிடைக்க விரும்பினால், மொழிபெயர்ப்பு திட்டத்தில் சேரவும்.";
"Translations" = "மொழிபெயர்ப்புகள்";
"No documents" = "ஆவணங்கள் இல்லை";
"Recent Documents" = "சமீபத்திய ஆவணங்கள்";
"Share files from Finder on a Mac\nor iTunes on Windows" = "மேக்கில் கண்டுபிடிப்பாளரிடமிருந்து கோப்புகளைப் பகிரவும்\n அல்லது சன்னல்களில் ஐடியூன்ச்";
"Show Open Videos quick actions" = "திறந்த வீடியோக்களை விரைவான செயல்களைக் காட்டு";
"Show Favorites" = "பிடித்தவைகளைக் காட்டு";
"Inspector visibility" = "இன்ச்பெக்டர் தெரிவுநிலை";
"Edit Favorites…" = "பிடித்தவைகளைத் திருத்து…";
"Show Open Videos toolbar button" = "திறந்த வீடியோக்கள் கருவிப்பட்டி பொத்தானைக் காட்டு";
"Buttons labels" = "பொத்தான்கள் லேபிள்கள்";
"Files" = "கோப்புகள்";
"Show Documents" = "ஆவணங்களைக் காட்டு";
"Pages toolbar position" = "பக்கங்கள் கருவிப்பட்டி நிலை";
"Video Details" = "வீடியோ விவரங்கள்";
"Show Inspector" = "காட்டு இன்ச்பெக்டர்";
"Clear Queue before opening" = "திறப்பதற்கு முன் வரிசையை அழிக்கவும்";
"Open" = "திற";
"Video actions buttons" = "வீடியோ செயல்கள் பொத்தான்கள்";
"Pages buttons" = "பக்கங்கள் பொத்தான்கள்";
"URL to Open" = "திறக்க முகவரி";
"Could not open Files" = "கோப்புகளைத் திறக்க முடியவில்லை";
"Paste" = "ஒட்டு";
"Open Videos" = "வீடியோக்களைத் திறக்கவும்";
"Right click channel thumbnail to open context menu with more actions" = "மேலும் செயல்களுடன் சூழல் மெனுவைத் திறக்க சேனல் சிறு உருவத்தை வலது சொடுக்கு செய்யவும்";
"Gesture: fowards" = "சைகை: நோக்கி";
"System controls" = "கணினி கட்டுப்பாடுகள்";
"Gesture: backwards" = "சைகை: பின்னோக்கி";
"Gesture settings control skipping interval for double tap gesture on left/right side of the player. Changing system controls settings requires restart." = "சைகை அமைப்புகள் பிளேயரின் இடது/வலது பக்கத்தில் இரட்டை குழாய் சைகைக்கான இடைவெளியைத் தவிர்க்கும் இடைவெளியைக் கட்டுப்படுத்துகின்றன. கணினி கட்டுப்பாடுகள் அமைப்புகளை மாற்ற மறுதொடக்கம் தேவை.";
"Gesture settings control skipping interval for double click on left/right side of the player. Changing system controls settings requires restart." = "சைகை அமைப்புகள் கட்டுப்பாட்டு வீரரின் இடது/வலது பக்கத்தில் இரட்டை சொடுக்கு செய்வதற்கான இடைவெளியைத் தவிர்க்கவும். கணினி கட்டுப்பாடுகள் அமைப்புகளை மாற்ற மறுதொடக்கம் தேவை.";
"Gesture settings control skipping interval for remote arrow buttons (for 2nd generation Siri Remote or newer). Changing system controls settings requires restart." = "சைகை அமைப்புகள் தொலை அம்பு பொத்தான்களுக்கான இடைவெளியைத் தவிர்க்கின்றன (2 வது தலைமுறை சிரி ரிமோட் அல்லது புதியது). கணினி கட்டுப்பாடுகள் அமைப்புகளை மாற்ற மறுதொடக்கம் தேவை.";
"Play next item" = "அடுத்த உருப்படியை விளையாடுங்கள்";
"Lock orientation" = "பூட்டு நோக்குநிலை";
"Close video" = "வீடியோவை மூடு";
"Total size: %@" = "மொத்த அளவு: %@";
"Open channels with description expanded" = "விளக்கத்துடன் திறந்த சேனல்கள் விரிவாக்கப்பட்டன";
"Cache" = "கேச்";
"Show cache status" = "கேச் நிலையைக் காட்டு";
"Maximum feed items" = "அதிகபட்ச தீவன உருப்படிகள்";
"Are you sure you want to clear cache?" = "நீங்கள் நிச்சயமாக கேச் அழிக்க விரும்புகிறீர்களா?";
"Show Next in Queue" = "அடுத்த வரிசையில் காண்பி";
"Show toggle watch status button" = "வாட்ச் நிலை பொத்தானை மாற்றிக் கொள்ளுங்கள்";
"Next in Queue" = "அடுத்த வரிசையில்";
"List" = "பட்டியல்";
"Cells" = "செல்கள்";
"Toggle size" = "அளவை மாற்றவும்";
"Do nothing" = "எதுவும் செய்ய வேண்டாம்";
"Open channel" = "திறந்த சேனல்";
"Open video description expanded" = "திறந்த வீடியோ விளக்கம் விரிவாக்கப்பட்டது";
"Keep channels with unwatched videos on top of subscriptions list" = "சந்தாக்கள் பட்டியலில் மேலே உள்ள வீடியோக்களுடன் சேனல்களை வைத்திருங்கள்";
"Show video context menu options to force selected backend" = "தேர்ந்தெடுக்கப்பட்ட பின்தளத்தில் கட்டாயப்படுத்த வீடியோ சூழல் பட்டியல் விருப்பங்களைக் காட்டுங்கள்";
"Play Now in MPV" = "MPV இல் இப்போது விளையாடுங்கள்";
"Show channel avatars in channels lists" = "சேனல்கள் பட்டியல்களில் சேனல் அவதாரங்களைக் காட்டு";
"Podcasts" = "பாட்காச்ட்கள்";
"Releases" = "வெளியீடுகள்";
"Add %@" = "%@ சேர்க்கவும்";
"Open vertical chapters expanded" = "திறந்த செங்குத்து அத்தியாயங்கள் விரிவடைந்தன";
"Chapters (if available)" = "அத்தியாயங்கள் (கிடைத்தால்)";
"Import Settings..." = "இறக்குமதி அமைப்புகள் ...";
"Export Settings" = "ஏற்றுமதி அமைப்புகள்";
"Accounts passwords (unencrypted)" = "கணக்குகள் கடவுச்சொற்கள் (மறைகுறியாக்கப்படாதவை)";
"Other data" = "பிற தரவு";
"Export..." = "ஏற்றுமதி…";
"Other data include last used playback preferences and listing options" = "மற்ற தரவுகளில் கடைசியாக பயன்படுத்தப்பட்ட பின்னணி விருப்பத்தேர்வுகள் மற்றும் பட்டியல் விருப்பங்கள் அடங்கும்";
"Do not share this file with anyone or you can lose access to your accounts. If you don't select to export passwords you will be asked to provide them during import" = "இந்த கோப்பை யாருடனும் பகிர வேண்டாம் அல்லது உங்கள் கணக்குகளுக்கான அணுகலை இழக்கலாம். கடவுச்சொற்களை ஏற்றுமதி செய்ய நீங்கள் தேர்ந்தெடுக்கவில்லை என்றால், இறக்குமதியின் போது அவற்றை வழங்குமாறு கேட்கப்படுவீர்கள்";
"Export" = "ஏற்றுமதி";
"File information" = "கோப்பு செய்தி";
"Build" = "உருவாக்கு";
"Import" = "இறக்குமதி";
"Icon and text" = "படவுரு மற்றும் உரை";
"Password required to import" = "இறக்குமதி செய்ய கடவுச்சொல் தேவை";
"Custom Location already exists" = "தனிப்பயன் இடம் ஏற்கனவே உள்ளது";
"Custom Location selected for import" = "இறக்குமதிக்கு தேர்ந்தெடுக்கப்பட்ட தனிப்பயன் இடம்";
"Custom Location not selected for import" = "இறக்குமதிக்கு தனிப்பயன் இடம் தேர்ந்தெடுக்கப்படவில்லை";
"Account already exists" = "கணக்கு ஏற்கனவே உள்ளது";
"Password saved in import file" = "இறக்குமதி கோப்பில் கடவுச்சொல் சேமிக்கப்பட்டது";

View File

@@ -1500,6 +1500,7 @@
37DD9DA22785BBC900539416 /* NoCommentsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NoCommentsView.swift; sourceTree = "<group>"; };
37E04C0E275940FB00172673 /* VerticalScrollingFix.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VerticalScrollingFix.swift; sourceTree = "<group>"; };
37E084AB2753D95F00039B7D /* AccountsNavigationLink.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountsNavigationLink.swift; sourceTree = "<group>"; };
37E21DC52CDE528A008DF47C /* ta */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ta; path = ta.lproj/Localizable.strings; sourceTree = "<group>"; };
37E64DD026D597EB00C71877 /* SubscribedChannelsModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SubscribedChannelsModel.swift; sourceTree = "<group>"; };
37E6D79B2944AE1A00550C3D /* FeedModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeedModel.swift; sourceTree = "<group>"; };
37E6D79F2944CD3800550C3D /* CacheStatusHeader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CacheStatusHeader.swift; sourceTree = "<group>"; };
@@ -2802,6 +2803,7 @@
tr,
ru,
"zh-Hant",
ta,
);
mainGroup = 37D4B0BC2671614700C925CA;
packageReferences = (
@@ -4089,6 +4091,7 @@
3767F3332B25058300F257BC /* tr */,
3767F3342B2505EF00F257BC /* ru */,
37367E582B8F63C200436163 /* zh-Hant */,
37E21DC52CDE528A008DF47C /* ta */,
);
name = Localizable.strings;
sourceTree = "<group>";
@@ -4103,7 +4106,7 @@
CODE_SIGN_ENTITLEMENTS = "Open in Yattee/Open in Yattee.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 195;
CURRENT_PROJECT_VERSION = 197;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "Open in Yattee/Info.plist";
INFOPLIST_KEY_CFBundleDisplayName = "Open in Yattee";
@@ -4134,7 +4137,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 195;
CURRENT_PROJECT_VERSION = 197;
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 78Z5H3M6RJ;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "Open in Yattee/Info.plist";
@@ -4165,7 +4168,7 @@
buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 195;
CURRENT_PROJECT_VERSION = 197;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
MACOSX_DEPLOYMENT_TARGET = 11.0;
@@ -4185,7 +4188,7 @@
buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 195;
CURRENT_PROJECT_VERSION = 197;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
MACOSX_DEPLOYMENT_TARGET = 11.0;
@@ -4349,7 +4352,7 @@
CODE_SIGN_ENTITLEMENTS = "iOS/Yattee (iOS).entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 195;
CURRENT_PROJECT_VERSION = 197;
ENABLE_PREVIEWS = YES;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
@@ -4367,8 +4370,7 @@
INFOPLIST_KEY_UIRequiresFullScreen = YES;
INFOPLIST_KEY_UIStatusBarHidden = NO;
INFOPLIST_KEY_UIStatusBarStyle = "";
INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
@@ -4403,7 +4405,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 195;
CURRENT_PROJECT_VERSION = 197;
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 78Z5H3M6RJ;
ENABLE_PREVIEWS = YES;
GCC_PREPROCESSOR_DEFINITIONS = "GLES_SILENCE_DEPRECATION=1";
@@ -4418,8 +4420,7 @@
INFOPLIST_KEY_UIRequiresFullScreen = YES;
INFOPLIST_KEY_UIStatusBarHidden = NO;
INFOPLIST_KEY_UIStatusBarStyle = "";
INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
@@ -4457,7 +4458,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 195;
CURRENT_PROJECT_VERSION = 197;
DEAD_CODE_STRIPPING = YES;
ENABLE_APP_SANDBOX = YES;
ENABLE_HARDENED_RUNTIME = YES;
@@ -4496,7 +4497,7 @@
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "3rd Party Mac Developer Application";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 195;
CURRENT_PROJECT_VERSION = 197;
DEAD_CODE_STRIPPING = YES;
"DEVELOPMENT_TEAM[sdk=macosx*]" = 78Z5H3M6RJ;
ENABLE_APP_SANDBOX = YES;
@@ -4531,7 +4532,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 195;
CURRENT_PROJECT_VERSION = 197;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
@@ -4554,7 +4555,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 195;
CURRENT_PROJECT_VERSION = 197;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
@@ -4579,7 +4580,7 @@
buildSettings = {
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 195;
CURRENT_PROJECT_VERSION = 197;
DEAD_CODE_STRIPPING = YES;
GENERATE_INFOPLIST_FILE = YES;
LD_RUNPATH_SEARCH_PATHS = (
@@ -4603,7 +4604,7 @@
buildSettings = {
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 195;
CURRENT_PROJECT_VERSION = 197;
DEAD_CODE_STRIPPING = YES;
GENERATE_INFOPLIST_FILE = YES;
LD_RUNPATH_SEARCH_PATHS = (
@@ -4629,7 +4630,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 195;
CURRENT_PROJECT_VERSION = 197;
DEVELOPMENT_ASSET_PATHS = "";
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
@@ -4669,7 +4670,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 195;
CURRENT_PROJECT_VERSION = 197;
DEVELOPMENT_ASSET_PATHS = "";
"DEVELOPMENT_TEAM[sdk=appletvos*]" = 78Z5H3M6RJ;
ENABLE_PREVIEWS = YES;
@@ -4709,7 +4710,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 195;
CURRENT_PROJECT_VERSION = 197;
GENERATE_INFOPLIST_FILE = YES;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
@@ -4732,7 +4733,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 195;
CURRENT_PROJECT_VERSION = 197;
GENERATE_INFOPLIST_FILE = YES;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
@@ -4915,7 +4916,7 @@
repositoryURL = "https://github.com/sindresorhus/Defaults";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 7.0.0;
minimumVersion = 7.3.1;
};
};
372AA40E286D067B0000B1DC /* XCRemoteSwiftPackageReference "Repeat" */ = {
@@ -4930,8 +4931,8 @@
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/hyperoslo/Cache.git";
requirement = {
branch = master;
kind = branch;
kind = upToNextMajorVersion;
minimumVersion = 7.4.0;
};
};
375B8AAF28B57F4200397B31 /* XCRemoteSwiftPackageReference "KeychainAccess" */ = {
@@ -4946,16 +4947,16 @@
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/pinterest/PINCache";
requirement = {
branch = master;
kind = branch;
kind = upToNextMajorVersion;
minimumVersion = 3.0.4;
};
};
379325D329A265A300181CF1 /* XCRemoteSwiftPackageReference "swift-log" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/yattee/swift-log.git";
repositoryURL = "https://github.com/apple/swift-log.git";
requirement = {
branch = main;
kind = branch;
kind = upToNextMajorVersion;
minimumVersion = 1.6.1;
};
};
3797104728D3D10600D5F53C /* XCRemoteSwiftPackageReference "SDWebImageSwiftUI" */ = {
@@ -4963,7 +4964,7 @@
repositoryURL = "https://github.com/SDWebImage/SDWebImageSwiftUI.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 2.1.0;
minimumVersion = 2.2.7;
};
};
3797757B268922D100DD52A8 /* XCRemoteSwiftPackageReference "siesta" */ = {
@@ -4971,7 +4972,7 @@
repositoryURL = "https://github.com/bustoutsolutions/siesta";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 1.5.0;
minimumVersion = 1.5.2;
};
};
3799AC0728B03CEC001376F9 /* XCRemoteSwiftPackageReference "ActiveLabel.swift" */ = {
@@ -4987,7 +4988,7 @@
repositoryURL = "https://github.com/Alamofire/Alamofire.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 5.0.0;
minimumVersion = 5.9.1;
};
};
37BD07C52698B27B003EBB87 /* XCRemoteSwiftPackageReference "SwiftUI-Introspect" */ = {
@@ -4995,7 +4996,7 @@
repositoryURL = "https://github.com/siteline/SwiftUI-Introspect.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 0.1.3;
minimumVersion = 1.3.0;
};
};
37CF8B8228535E4F00B71E37 /* XCRemoteSwiftPackageReference "SDWebImage" */ = {
@@ -5003,7 +5004,7 @@
repositoryURL = "https://github.com/SDWebImage/SDWebImage";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 5.19.1;
minimumVersion = 5.19.7;
};
};
37D4B19B2671817900C925CA /* XCRemoteSwiftPackageReference "SwiftyJSON" */ = {
@@ -5011,7 +5012,7 @@
repositoryURL = "https://github.com/SwiftyJSON/SwiftyJSON.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 5.0.0;
minimumVersion = 5.0.2;
};
};
37EE6DC328A305AD00BFD632 /* XCRemoteSwiftPackageReference "Reachability" */ = {
@@ -5019,7 +5020,7 @@
repositoryURL = "https://github.com/ashleymills/Reachability.swift";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 5.1.0;
minimumVersion = 5.2.3;
};
};
37FB2847272207F000A57617 /* XCRemoteSwiftPackageReference "SDWebImageWebPCoder" */ = {
@@ -5027,7 +5028,7 @@
repositoryURL = "https://github.com/SDWebImage/SDWebImageWebPCoder.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 0.8.4;
minimumVersion = 0.14.6;
};
};
37FB285227220D8400A57617 /* XCRemoteSwiftPackageReference "SDWebImagePINPlugin" */ = {
@@ -5042,8 +5043,8 @@
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/mpvkit/MPVKit.git";
requirement = {
kind = exactVersion;
version = "0.38.0-fix";
kind = upToNextMajorVersion;
minimumVersion = 0.39.0;
};
};
/* End XCRemoteSwiftPackageReference section */

View File

@@ -1,5 +1,5 @@
{
"originHash" : "515d8e68c4a31658288fb3f94789ee539399b042082c08c39f4c03c27fd8860c",
"originHash" : "173de1b718eb898698eaba0221b46be9781899a652725709c8400d3ddfb01980",
"pins" : [
{
"identity" : "activelabel.swift",
@@ -15,8 +15,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/Alamofire/Alamofire.git",
"state" : {
"revision" : "f455c2975872ccd2d9c81594c658af65716e9b9a",
"version" : "5.9.1"
"revision" : "e16d3481f5ed35f0472cb93350085853d754913f",
"version" : "5.10.1"
}
},
{
@@ -24,8 +24,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/hyperoslo/Cache.git",
"state" : {
"branch" : "master",
"revision" : "81a0277cbc6b63f4e0cd6f42c4abefa1011bbfa9"
"revision" : "24e47109e31b2031cb26e25cc1b81b607496066c",
"version" : "7.4.0"
}
},
{
@@ -60,8 +60,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/mpvkit/MPVKit.git",
"state" : {
"revision" : "ee72059235566df8b455bff15e3f83a1c9053e78",
"version" : "0.38.0-fix"
"revision" : "839dfa34b96029daef10b32d401c98edf17f04ae",
"version" : "0.39.0"
}
},
{
@@ -69,8 +69,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/pinterest/PINCache",
"state" : {
"branch" : "master",
"revision" : "2fb85948463292c2e824148cf17dc62a4c217a94"
"revision" : "2fb85948463292c2e824148cf17dc62a4c217a94",
"version" : "3.0.4"
}
},
{
@@ -87,8 +87,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/ashleymills/Reachability.swift",
"state" : {
"revision" : "7cbd73f46a7dfaeca079e18df7324c6de6d1834a",
"version" : "5.2.3"
"revision" : "21d1dc412cfecbe6e34f1f4c4eb88d3f912654a6",
"version" : "5.2.4"
}
},
{
@@ -105,8 +105,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/SDWebImage/SDWebImage",
"state" : {
"revision" : "8a1be70a625683bc04d6903e2935bf23f3c6d609",
"version" : "5.19.7"
"revision" : "10d06f6a33bafae8c164fbfd1f03391f6d4692b3",
"version" : "5.20.0"
}
},
{
@@ -148,10 +148,10 @@
{
"identity" : "swift-log",
"kind" : "remoteSourceControl",
"location" : "https://github.com/yattee/swift-log.git",
"location" : "https://github.com/apple/swift-log.git",
"state" : {
"branch" : "main",
"revision" : "3f3dc1390a2f116894887c352792dc8d5fa9e875"
"revision" : "9cb486020ebf03bfa5b5df985387a14a98744537",
"version" : "1.6.1"
}
},
{
@@ -168,8 +168,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/siteline/SwiftUI-Introspect.git",
"state" : {
"revision" : "121c146fe591b1320238d054ae35c81ffa45f45a",
"version" : "0.12.0"
"revision" : "807f73ce09a9b9723f12385e592b4e0aaebd3336",
"version" : "1.3.0"
}
},
{

View File

@@ -5,7 +5,7 @@ import Logging
import UIKit
final class AppDelegate: UIResponder, UIApplicationDelegate {
var orientationLock = UIInterfaceOrientationMask.allButUpsideDown
var orientationLock = UIInterfaceOrientationMask.all
private var logger = Logger(label: "stream.yattee.app.delegate")
private(set) static var instance: AppDelegate!

View File

@@ -1,5 +1,4 @@
import CoreMotion
import Defaults
import Logging
import UIKit
@@ -35,7 +34,7 @@ enum Orientation {
let rotateOrientationMask = rotateOrientation == .portrait ? UIInterfaceOrientationMask.portrait :
rotateOrientation == .landscapeLeft ? .landscapeLeft :
rotateOrientation == .landscapeRight ? .landscapeRight :
.allButUpsideDown
.all
windowScene.requestGeometryUpdate(.iOS(interfaceOrientations: rotateOrientationMask)) { error in
print("denied rotation \(error)")

View File

@@ -13,6 +13,9 @@ final class OrientationModel {
var orientationDebouncer = Debouncer(.milliseconds(300))
var orientationObserver: Any?
@Default(.lockPortraitWhenBrowsing) private var lockPortraitWhenBrowsing
@Default(.enterFullscreenInLandscape) private var enterFullscreenInLandscape
private var player = PlayerModel.shared
func startOrientationUpdates() {
@@ -25,7 +28,7 @@ final class OrientationModel {
self.logger.info("Notification received: Device orientation changed.")
// We only allow .portrait and are not showing the player
guard (!self.player.presentingPlayer && !Defaults[.lockPortraitWhenBrowsing]) || self.player.presentingPlayer
guard (!self.player.presentingPlayer && !self.lockPortraitWhenBrowsing) || self.player.presentingPlayer
else {
return
}
@@ -42,7 +45,7 @@ final class OrientationModel {
}
// Only take action if the player is active and presenting
guard (!self.player.isOrientationLocked && !self.player.playingInPictureInPicture) || (!Defaults[.lockPortraitWhenBrowsing] && !self.player.presentingPlayer) || (!Defaults[.lockPortraitWhenBrowsing] && self.player.presentingPlayer && !self.player.isOrientationLocked)
guard (!self.player.isOrientationLocked && !self.player.playingInPictureInPicture) || (!self.lockPortraitWhenBrowsing && !self.player.presentingPlayer) || (!self.lockPortraitWhenBrowsing && self.player.presentingPlayer && !self.player.isOrientationLocked)
else {
self.logger.info("Only updating orientation without actions.")
return
@@ -52,7 +55,7 @@ final class OrientationModel {
self.orientationDebouncer.callback = {
DispatchQueue.main.async {
if orientation.isLandscape {
if Defaults[.enterFullscreenInLandscape], self.player.presentingPlayer {
if self.enterFullscreenInLandscape, self.player.presentingPlayer {
self.logger.info("Entering fullscreen because orientation is landscape.")
self.player.controls.presentingControls = false
self.player.enterFullScreen(showControls: false)
@@ -63,7 +66,7 @@ final class OrientationModel {
if self.player.playingFullScreen {
self.player.exitFullScreen(showControls: false)
}
if Defaults[.lockPortraitWhenBrowsing] {
if self.lockPortraitWhenBrowsing {
Orientation.lockOrientation(.portrait, andRotateTo: .portrait)
} else {
Orientation.lockOrientation(OrientationTracker.shared.currentInterfaceOrientationMask, andRotateTo: orientation)