Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC-iOS
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KDOT2EAZY
VLC-iOS
Commits
9cf22aa7
Commit
9cf22aa7
authored
2 years ago
by
Felix Paul Kühne
Browse files
Options
Downloads
Patches
Plain Diff
AppleTV: fix compilation as VLCRenderer* is iOS only
parent
8f2a2b54
No related branches found
Branches containing commit
Tags
3.3.1
tv3.3.1
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Sources/VLCPlaybackService.h
+2
-0
2 additions, 0 deletions
Sources/VLCPlaybackService.h
Sources/VLCPlaybackService.m
+17
-0
17 additions, 0 deletions
Sources/VLCPlaybackService.m
with
19 additions
and
0 deletions
Sources/VLCPlaybackService.h
+
2
−
0
View file @
9cf22aa7
...
...
@@ -105,7 +105,9 @@ NS_SWIFT_NAME(PlaybackService)
@property
(
nonatomic
,
readonly
)
NSDictionary
*
mediaOptionsDictionary
;
@property
(
nonatomic
,
readonly
)
NSTimer
*
sleepTimer
;
#if !TARGET_OS_TV
@property
(
nonatomic
,
nullable
)
VLCRendererItem
*
renderer
;
#endif
@property
(
nonatomic
,
readonly
)
VLCAspectRatio
currentAspectRatio
;
...
...
This diff is collapsed.
Click to expand it.
Sources/VLCPlaybackService.m
+
17
−
0
View file @
9cf22aa7
...
...
@@ -310,7 +310,9 @@ NSString *const VLCPlaybackServicePlaybackPositionUpdated = @"VLCPlaybackService
[
_mediaPlayer
addObserver
:
self
forKeyPath
:
@"time"
options
:
0
context
:
nil
];
[
_mediaPlayer
addObserver
:
self
forKeyPath
:
@"remainingTime"
options
:
0
context
:
nil
];
#if !TARGET_OS_TV
[
_mediaPlayer
setRendererItem
:
_renderer
];
#endif
[
_listPlayer
playItemAtNumber
:
@
(
_itemInMediaListToBePlayedFirst
)];
...
...
@@ -1282,7 +1284,11 @@ NSString *const VLCPlaybackServicePlaybackPositionUpdated = @"VLCPlaybackService
-
(
BOOL
)
isPlayingOnExternalScreen
{
#if !TARGET_OS_TV
return
(
_renderer
||
[[
UIDevice
currentDevice
]
VLCHasExternalDisplay
]);
#else
return
[[
UIDevice
currentDevice
]
VLCHasExternalDisplay
];
#endif
}
#pragma mark - background interaction
...
...
@@ -1305,12 +1311,17 @@ NSString *const VLCPlaybackServicePlaybackPositionUpdated = @"VLCPlaybackService
{
_preBackgroundWrapperView
=
_videoOutputViewWrapper
;
#if !TARGET_OS_TV
if
(
!
_renderer
&&
_mediaPlayer
.
audioTrackIndexes
.
count
>
0
&&
[
_mediaPlayer
isPlaying
])
[
self
setVideoTrackEnabled
:
false
];
if
(
_renderer
)
{
[
_backgroundDummyPlayer
play
];
}
#else
if
(
_mediaPlayer
.
audioTrackIndexes
.
count
>
0
&&
[
_mediaPlayer
isPlaying
])
[
self
setVideoTrackEnabled
:
false
];
#endif
}
-
(
void
)
applicationWillEnterForeground
:(
NSNotification
*
)
notification
...
...
@@ -1320,9 +1331,11 @@ NSString *const VLCPlaybackServicePlaybackPositionUpdated = @"VLCPlaybackService
_preBackgroundWrapperView
=
nil
;
}
#if !TARGET_OS_TV
if
(
_renderer
)
{
[
_backgroundDummyPlayer
stop
];
}
#endif
if
(
_mediaPlayer
.
currentVideoTrackIndex
==
-
1
)
{
[
self
setVideoTrackEnabled
:
true
];
...
...
@@ -1409,12 +1422,16 @@ NSString *const VLCPlaybackServicePlaybackPositionUpdated = @"VLCPlaybackService
#pragma mark - Renderer
#if !TARGET_OS_TV
-
(
void
)
setRenderer
:(
VLCRendererItem
*
__nullable
)
renderer
{
_renderer
=
renderer
;
[
_mediaPlayer
setRendererItem
:
_renderer
];
}
#endif
#pragma mark - PlayerDisplayController
-
(
void
)
setPlayerDisplayController
:(
VLCPlayerDisplayController
*
)
playerDisplayController
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment