Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
VideoLAN
VLC-iOS
Commits
ee60ec4d
Commit
ee60ec4d
authored
Oct 09, 2017
by
Carola
Browse files
VLCPlaybackInfoControllers+ VLCPlaybackController: remove knowledge of Mediaplayer
parent
ffc13911
Changes
4
Hide whitespace changes
Inline
Side-by-side
Apple-TV/Playback/Playback Info/VLCPlaybackInfoPlaybackTVViewController.m
View file @
ee60ec4d
...
...
@@ -33,7 +33,7 @@
+
(
BOOL
)
shouldBeVisibleForPlaybackController
:(
VLCPlaybackController
*
)
vpc
{
return
vpc
.
mediaPlayer
.
isSeekable
;
return
[
vpc
isSeekable
]
;
}
...
...
@@ -94,7 +94,7 @@
}];
UISegmentedControl
*
rateControl
=
self
.
rateControl
;
rateControl
.
selectedSegmentIndex
=
currentIndex
;
rateControl
.
enabled
=
vpc
.
mediaPlayer
.
isSeekable
;
rateControl
.
enabled
=
[
vpc
isSeekable
]
;
}
-
(
IBAction
)
rateControlChanged
:(
UISegmentedControl
*
)
sender
...
...
Apple-TV/Playback/Playback Info/VLCPlaybackInfoSubtitlesFetcherViewController.m
View file @
ee60ec4d
...
...
@@ -117,7 +117,7 @@
{
[
self
stopActivity
];
VLCPlaybackController
*
vpc
=
[
VLCPlaybackController
sharedInstance
];
[
vpc
.
mediaPlayer
openVideoSubTitlesFromFile
:
pathToFile
];
[
vpc
openVideoSubTitlesFromFile
:
pathToFile
];
[
self
dismissViewControllerAnimated
:
YES
completion
:
nil
];
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
VLCPlaybackControllerPlaybackMetadataDidChange
object
:
nil
];
}
...
...
Sources/VLCPlaybackController.h
View file @
ee60ec4d
...
...
@@ -77,6 +77,7 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
@property
(
readonly
)
NSInteger
numberOfChaptersForCurrentTitle
;
@property
(
nonatomic
,
readonly
)
BOOL
currentMediaHasTrackToChooseFrom
;
@property
(
nonatomic
,
readwrite
)
BOOL
fullscreenSessionRequested
;
@property
(
nonatomic
,
readonly
)
BOOL
isSeekable
;
@property
(
readonly
)
NSNumber
*
playbackTime
;
@property
(
nonatomic
,
readonly
)
NSDictionary
*
mediaOptionsDictionary
;
@property
(
nonatomic
,
readonly
)
NSTimer
*
sleepTimer
;
...
...
@@ -109,5 +110,6 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
-
(
void
)
scheduleSleepTimerWithInterval
:(
NSTimeInterval
)
timeInterval
;
-
(
void
)
playMediaList
:(
VLCMediaList
*
)
mediaList
firstIndex
:(
NSInteger
)
index
subtitlesFilePath
:(
NSString
*
)
subsFilePath
;
-
(
void
)
openVideoSubTitlesFromFile
:(
NSString
*
)
pathToFile
;
@end
Sources/VLCPlaybackController.m
View file @
ee60ec4d
...
...
@@ -137,6 +137,11 @@ VLCMediaDelegate, VLCRemoteControlServiceDelegate>
}
#pragma mark - playback management
-
(
void
)
openVideoSubTitlesFromFile
:(
NSString
*
)
pathToFile
{
[
_mediaPlayer
openVideoSubTitlesFromFile
:
pathToFile
];
}
-
(
void
)
playMediaList
:(
VLCMediaList
*
)
mediaList
firstIndex
:(
NSInteger
)
index
subtitlesFilePath
:(
NSString
*
)
subsFilePath
{
self
.
mediaList
=
mediaList
;
...
...
@@ -449,6 +454,11 @@ VLCMediaDelegate, VLCRemoteControlServiceDelegate>
return
[[
_mediaPlayer
audioTrackIndexes
]
count
]
>
2
||
[[
_mediaPlayer
videoSubTitlesIndexes
]
count
]
>
1
;
}
-
(
BOOL
)
isSeekable
{
return
_mediaPlayer
.
isSeekable
;
}
-
(
NSNumber
*
)
playbackTime
{
return
_mediaPlayer
.
time
.
value
;
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment