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
VideoLAN
VLC-iOS
Commits
a85b41b8
Commit
a85b41b8
authored
Nov 02, 2013
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DropboxController: add streaming support (refs #9784)
UI yet todo
parent
f074e3a8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
AspenProject/VLCDropboxController.h
AspenProject/VLCDropboxController.h
+1
-0
AspenProject/VLCDropboxController.m
AspenProject/VLCDropboxController.m
+18
-0
No files found.
AspenProject/VLCDropboxController.h
View file @
a85b41b8
...
...
@@ -34,5 +34,6 @@
-
(
void
)
requestDirectoryListingAtPath
:(
NSString
*
)
path
;
-
(
void
)
downloadFileToDocumentFolder
:(
DBMetadata
*
)
file
;
-
(
void
)
streamFile
:(
DBMetadata
*
)
file
;
@end
AspenProject/VLCDropboxController.m
View file @
a85b41b8
...
...
@@ -72,6 +72,12 @@
}
}
-
(
void
)
streamFile
:(
DBMetadata
*
)
file
{
if
(
!
file
.
isDirectory
)
[[
self
restClient
]
loadStreamableURLForFile
:
file
.
path
];
}
-
(
void
)
_triggerNextDownload
{
if
(
_listOfDropboxFilesToDownload
.
count
>
0
&&
!
_downloadInProgress
)
{
...
...
@@ -159,6 +165,18 @@
[
self
.
delegate
currentProgressInformation
:
progress
];
}
-
(
void
)
restClient
:(
DBRestClient
*
)
restClient
loadedStreamableURL
:(
NSURL
*
)
url
forFile
:(
NSString
*
)
path
{
VLCAppDelegate
*
appDelegate
=
(
VLCAppDelegate
*
)[
UIApplication
sharedApplication
].
delegate
;
/* DBX returns a https URL which we don't support yet. in turn, we fall back on http */
[
appDelegate
openMovieFromURL
:[
NSURL
URLWithString
:[
NSString
stringWithFormat
:
@"http://%@%@"
,
url
.
host
,
url
.
path
]]];
}
-
(
void
)
restClient
:(
DBRestClient
*
)
restClient
loadStreamableURLFailedWithError
:(
NSError
*
)
error
{
APLog
(
@"loadStreamableURL failed with error %i"
,
error
.
code
);
}
#pragma mark - DBSession delegate
-
(
void
)
sessionDidReceiveAuthorizationFailure
:(
DBSession
*
)
session
userId
:(
NSString
*
)
userId
...
...
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