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
45557f60
Commit
45557f60
authored
Oct 19, 2015
by
Felix Paul Kühne
Browse files
atv/open network stream: implement playback
parent
8cc7ea0d
Changes
1
Hide whitespace changes
Inline
Side-by-side
VLC for Apple TV/VLCOpenNetworkStreamTVViewController.m
View file @
45557f60
...
...
@@ -10,6 +10,7 @@
*****************************************************************************/
#import "VLCOpenNetworkStreamTVViewController.h"
#import "VLCPlaybackController.h"
@interface
VLCOpenNetworkStreamTVViewController
()
{
...
...
@@ -39,6 +40,9 @@
/* fetch data from cloud */
_recentURLs
=
[
NSMutableArray
arrayWithArray
:[[
NSUbiquitousKeyValueStore
defaultStore
]
arrayForKey
:
kVLCRecentURLs
]];
if
(
_recentURLs
.
count
==
0
)
{
[
_recentURLs
addObject
:
@"http://streams.videolan.org/streams/mp4/Mr_MrsSmith-h264_aac.mp4"
];
}
[
self
.
previouslyPlayedStreamsTableView
reloadData
];
self
.
noURLsToShowLabel
.
hidden
=
_recentURLs
.
count
!=
0
;
}
...
...
@@ -75,7 +79,8 @@
-
(
void
)
tableView
:(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:(
NSIndexPath
*
)
indexPath
{
NSLog
(
@"user tried to play something"
);
[
self
.
previouslyPlayedStreamsTableView
deselectRowAtIndexPath
:
indexPath
animated
:
NO
];
[
self
_openURLStringAndDismiss
:
_recentURLs
[
indexPath
.
row
]];
}
-
(
NSInteger
)
tableView
:(
UITableView
*
)
tableView
numberOfRowsInSection
:(
NSInteger
)
section
...
...
@@ -90,7 +95,13 @@
-
(
void
)
URLEnteredInField
:(
id
)
sender
{
NSLog
(
@"user entered URL '%@'"
,
self
.
playURLField
.
text
);
[
self
_openURLStringAndDismiss
:
self
.
playURLField
.
text
];
}
-
(
void
)
_openURLStringAndDismiss
:(
NSString
*
)
url
{
VLCPlaybackController
*
vpc
=
[
VLCPlaybackController
sharedInstance
];
[
vpc
playURL
:[
NSURL
URLWithString
:
url
]
subtitlesFilePath
:
nil
];
}
@end
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