Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Carola
vlc-ios
Commits
1df3bc25
Commit
1df3bc25
authored
Jan 17, 2018
by
Carola Nitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
VLCTabBarCoordinator: make the VLCTabBarcoordinator the delegate of the VideoViewController
parent
89d688d2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
13 deletions
+13
-13
Sources/VLCPlaybackController.h
Sources/VLCPlaybackController.h
+1
-0
Sources/VLCPlayerDisplayController.h
Sources/VLCPlayerDisplayController.h
+1
-2
Sources/VLCPlayerDisplayController.m
Sources/VLCPlayerDisplayController.m
+0
-8
VLC-iOS-Bridging-Header.h
VLC-iOS-Bridging-Header.h
+1
-0
VLCTabBarCoordinator.swift
VLCTabBarCoordinator.swift
+10
-3
No files found.
Sources/VLCPlaybackController.h
View file @
1df3bc25
...
...
@@ -12,6 +12,7 @@
*****************************************************************************/
#import "VLCEqualizerView.h"
#import <MobileVLCKit/MobileVLCKit.h>
extern
NSString
*
const
VLCPlaybackControllerPlaybackDidStart
;
extern
NSString
*
const
VLCPlaybackControllerPlaybackDidPause
;
...
...
Sources/VLCPlayerDisplayController.h
View file @
1df3bc25
...
...
@@ -11,7 +11,6 @@
*****************************************************************************/
@class
VLCPlaybackController
;
@protocol
VLCVideoControllerDelegate
;
typedef
NS_ENUM
(
NSUInteger
,
VLCPlayerDisplayControllerDisplayMode
)
{
VLCPlayerDisplayControllerDisplayModeFullscreen
,
...
...
@@ -29,7 +28,7 @@ typedef NS_ENUM(NSUInteger, VLCPlayerDisplayControllerDisplayMode) {
@end
@interface
VLCPlayerDisplayController
:
UIViewController
<
VLCVideoControllerDelegate
>
@interface
VLCPlayerDisplayController
:
UIViewController
+
(
VLCPlayerDisplayController
*
)
sharedInstance
;
...
...
Sources/VLCPlayerDisplayController.m
View file @
1df3bc25
...
...
@@ -15,7 +15,6 @@
#import "VLCMiniPlaybackView.h"
#import "VLCPlaybackNavigationController.h"
#import "VLCPlaybackController+MediaLibrary.h"
#import "VLC_iOS-Swift.h"
#if TARGET_OS_IOS
#import "VLCMovieViewController.h"
...
...
@@ -359,11 +358,4 @@ static NSString *const VLCPlayerDisplayControllerDisplayModeKey = @"VLCPlayerDis
#endif
}
-
(
void
)
videoViewControllerDidSelectMediaObjectWithVLCVideoViewController
:(
VLCVideoViewController
*
)
VLCVideoViewController
mediaObject
:(
NSManagedObject
*
)
mediaObject
{
VLCPlaybackController
*
vpc
=
[
VLCPlaybackController
sharedInstance
];
[
vpc
playMediaLibraryObject
:
mediaObject
];
// [self createSpotlightItem:mediaObject];
}
@end
VLC-iOS-Bridging-Header.h
View file @
1df3bc25
...
...
@@ -10,6 +10,7 @@
#import <XKKeychain/XKKeychain.h>
#import "VLCConstants.h"
#import "VLCPlayerDisplayController.h"
#import "VLCPlaybackController+MediaLibrary.h"
#import "VLCLibrarySearchDisplayDataSource.h"
#import "VLCServerListViewController.h"
#import "VLCSettingsController.h"
...
...
VLCTabBarCoordinator.swift
View file @
1df3bc25
...
...
@@ -16,7 +16,7 @@ protocol VLCTabbarCooordinatorDelegate {
}
class
VLCTabbarCooordinator
:
NSObject
{
class
VLCTabbarCooordinator
:
NSObject
,
VLCVideoControllerDelegate
{
private
var
childCoordinators
:
[
NSObject
]
=
[]
private
var
tabBarController
:
UITabBarController
...
...
@@ -33,7 +33,7 @@ class VLCTabbarCooordinator: NSObject {
public
func
setupViewControllers
()
{
let
videoVC
=
VLCVideoViewController
(
collectionViewLayout
:
UICollectionViewFlowLayout
())
//this should probably not be the delegate
videoVC
.
delegate
=
VLCPlayerDisplayController
.
sharedInstance
()
videoVC
.
delegate
=
self
videoVC
.
title
=
NSLocalizedString
(
"Video"
,
comment
:
""
)
videoVC
.
tabBarItem
=
UITabBarItem
(
title
:
NSLocalizedString
(
"Video"
,
comment
:
""
),
...
...
@@ -43,7 +43,7 @@ class VLCTabbarCooordinator: NSObject {
// Audio
let
audioVC
=
VLCVideoViewController
(
collectionViewLayout
:
UICollectionViewFlowLayout
())
//this should probably not be the delegate
audioVC
.
delegate
=
VLCPlayerDisplayController
.
sharedInstance
()
audioVC
.
delegate
=
self
audioVC
.
title
=
NSLocalizedString
(
"Audio"
,
comment
:
""
)
audioVC
.
tabBarItem
=
UITabBarItem
(
title
:
NSLocalizedString
(
"Audio"
,
comment
:
""
),
...
...
@@ -110,4 +110,11 @@ class VLCTabbarCooordinator: NSObject {
}
return
nil
}
func
videoViewControllerDidSelectMediaObject
(
VLCVideoViewController
:
VLCVideoViewController
,
mediaObject
:
NSManagedObject
)
{
let
vpc
=
VLCPlaybackController
.
sharedInstance
()
vpc
?
.
playMediaLibraryObject
(
mediaObject
)
// [self createSpotlightItem:mediaObject];
}
}
Write
Preview
Markdown
is supported
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