Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
VideoLAN
VLC-iOS
Commits
1ebdff9a
Commit
1ebdff9a
authored
Jan 16, 2018
by
Carola
Browse files
VLCPlaybackController: fix compilation for tvOS by making the trackrestoration iOS only
parent
8a18c576
Changes
1
Hide whitespace changes
Inline
Side-by-side
Sources/VLCPlaybackController.m
View file @
1ebdff9a
...
...
@@ -311,6 +311,17 @@ typedef NS_ENUM(NSUInteger, VLCAspectRatio) {
}
#if TARGET_OS_IOS
-
(
void
)
restoreAudioAndSubtitleTrack
{
MLFile
*
item
=
[
MLFile
fileForURL
:
_mediaPlayer
.
media
.
url
].
firstObject
;
if
(
item
)
{
_mediaPlayer
.
currentAudioTrackIndex
=
item
.
lastAudioTrack
.
intValue
;
_mediaPlayer
.
currentVideoSubTitleIndex
=
item
.
lastSubtitleTrack
.
intValue
;
}
}
-
(
void
)
_savePlaybackState
{
@try
{
...
...
@@ -743,12 +754,9 @@ typedef NS_ENUM(NSUInteger, VLCAspectRatio) {
[
_listPlayer
.
mediaList
unlock
];
}
break
;
case
VLCMediaPlayerStateESAdded
:
{
MLFile
*
item
=
[
MLFile
fileForURL
:
_mediaPlayer
.
media
.
url
].
firstObject
;
if
(
item
)
{
_mediaPlayer
.
currentAudioTrackIndex
=
item
.
lastAudioTrack
.
intValue
;
_mediaPlayer
.
currentVideoSubTitleIndex
=
item
.
lastSubtitleTrack
.
intValue
;
}
#if TARGET_OS_IOS
[
self
restoreAudioAndSubtitleTrack
];
#endif
}
break
;
default:
break
;
...
...
Carola
@caro
mentioned in commit
a7ea9909
·
Jan 18, 2018
mentioned in commit
a7ea9909
mentioned in commit a7ea99093aecdd4900477bb8db7cd789618570eb
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment