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
b7eab733
Commit
b7eab733
authored
Nov 13, 2015
by
Felix Paul Kühne
Browse files
Media File Discoverer: added tvOS support
parent
6e033ece
Changes
4
Hide whitespace changes
Inline
Side-by-side
Sources/VLCAppDelegate.m
View file @
b7eab733
...
...
@@ -407,6 +407,12 @@ didFailToContinueUserActivityWithType:(NSString *)userActivityType
[
_libraryViewController
updateViewContents
];
}
-
(
void
)
mediaFilesFoundRequiringAdditionToStorageBackend
:(
NSArray
<
NSString
*>
)
foundFiles
{
[[
MLMediaLibrary
sharedMediaLibrary
]
addFilePaths
:
foundFiles
];
[[(
VLCAppDelegate
*
)[
UIApplication
sharedApplication
].
delegate
libraryViewController
]
updateViewContents
];
}
#pragma mark - pass code validation
-
(
void
)
passcodeWasValidated
:(
NSNotification
*
)
aNotifcation
...
...
Sources/VLCMediaFileDiscoverer.h
View file @
b7eab733
...
...
@@ -14,6 +14,9 @@
@protocol
VLCMediaFileDiscovererDelegate
<
NSObject
>
@required
-
(
void
)
mediaFilesFoundRequiringAdditionToStorageBackend
:(
NSArray
<
NSString
*>
*
)
foundFiles
;
@optional
// loading is equal to YES first time when file is discovered
-
(
void
)
mediaFileAdded
:(
NSString
*
)
filePath
loading
:(
BOOL
)
isLoading
;
...
...
Sources/VLCMediaFileDiscoverer.m
View file @
b7eab733
...
...
@@ -2,18 +2,17 @@
* VLCMediaFileDiscoverer.m
* VLC for iOS
*****************************************************************************
* Copyright (c) 2013 VideoLAN. All rights reserved.
* Copyright (c) 2013
-2015
VideoLAN. All rights reserved.
* $Id$
*
* Authors: Gleb Pinigin <gpinigin # gmail.com>
* Felix Paul Kühne <fkuehne # videolan.org>
*
* Refer to the COPYING file of the official project for license.
*****************************************************************************/
#import "VLCMediaFileDiscoverer.h"
#import "NSString+SupportedMedia.h"
#import "VLCAppDelegate.h"
#import "VLCLibraryViewController.h"
const
float
MediaTimerInterval
=
2
.
f
;
...
...
@@ -296,8 +295,11 @@ const float MediaTimerInterval = 2.f;
}
}
}
[[
MLMediaLibrary
sharedMediaLibrary
]
addFilePaths
:
filePaths
];
[[(
VLCAppDelegate
*
)[
UIApplication
sharedApplication
].
delegate
libraryViewController
]
updateViewContents
];
for
(
id
<
VLCMediaFileDiscovererDelegate
>
delegate
in
_observers
)
{
if
([
delegate
respondsToSelector
:
@selector
(
mediaFilesFoundRequiringAdditionToStorageBackend
:)])
{
[
delegate
mediaFilesFoundRequiringAdditionToStorageBackend
:[
filePaths
copy
]];
}
}
}
@end
VLC for iOS.xcodeproj/project.pbxproj
View file @
b7eab733
...
...
@@ -183,6 +183,7 @@
7DC19B0C1868D21800810BF7
/* VLCFirstStepsSixthPageViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
7DC19B0A1868D21800810BF7
/* VLCFirstStepsSixthPageViewController.m */
;
};
7DC5A3E71BF6370800CFEBA8
/* VLCRemotePlaybackViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
7DC5A3E51BF6370800CFEBA8
/* VLCRemotePlaybackViewController.m */
;
};
7DC5A3E81BF6370800CFEBA8
/* VLCRemotePlaybackViewController.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
7DC5A3E61BF6370800CFEBA8
/* VLCRemotePlaybackViewController.xib */
;
};
7DC5A3EC1BF63F4B00CFEBA8
/* VLCMediaFileDiscoverer.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
7D30F3CF183AB2AC00FFC021
/* VLCMediaFileDiscoverer.m */
;
};
7DC71D0E1BC81F70001FACAA
/* AVFoundation.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
7DC71D0D1BC81F70001FACAA
/* AVFoundation.framework */
;
};
7DC71D291BC83590001FACAA
/* UIColor+Presets.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
7DF9352E1958AB0600E60FD4
/* UIColor+Presets.m */
;
};
7DC72D6317B7ED24008A26D0
/* WhiteRaccoon.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
7DC72D6217B7ED24008A26D0
/* WhiteRaccoon.m */
;
};
...
...
@@ -2727,6 +2728,7 @@
DD3EFF421BDEBCE500B68579
/* VLCNetworkServerBrowserSharedLibrary.m in Sources */
,
7D5278E41BD7E37300D0CA0E
/* VLCCloudStorageController.m in Sources */
,
DD490B171BE6BA580010F335
/* VLCIRTVTapGestureRecognizer.m in Sources */
,
7DC5A3EC1BF63F4B00CFEBA8
/* VLCMediaFileDiscoverer.m in Sources */
,
7D3E528B1BD7B5E100309D15
/* VLCCloudServicesTVViewController.m in Sources */
,
7D405ED41BEA150C006ED886
/* VLCActivityManager.m in Sources */
,
);
...
...
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