Commit fac63600 authored by Felix Paul Kühne's avatar Felix Paul Kühne

Add basic Web UI for Remote Playback

parent 79313913
B"CHOOSE_AUDIO_TRACK"="Choose Audio Track";
......
......@@ -45,7 +45,7 @@
{
// Add support for POST
if ([method isEqualToString:@"POST"] && [path isEqualToString:@"/upload.json"])
return YES;
return YES;
return [super supportsMethod:method atPath:path];
}
......@@ -369,30 +369,31 @@
fileResponse.contentType = @"text/html";
}
#else
#warning FIXME
UIDevice *currentDevice = [UIDevice currentDevice];
NSString *deviceModel = [currentDevice model];
NSString *filePath = [self filePathForURI:path];
NSString *documentRoot = [config documentRoot];
NSString *relativePath = [filePath substringFromIndex:[documentRoot length]];
NSDictionary *replacementDict = @{@"WEBINTF_TITLE" : NSLocalizedString(@"WEBINTF_TITLE", nil),
NSDictionary *replacementDict = @{@"WEBINTF_TITLE" : NSLocalizedString(@"WEBINTF_TITLE_ATV", nil),
@"WEBINTF_DROPFILES" : NSLocalizedString(@"WEBINTF_DROPFILES", nil),
@"WEBINTF_DROPFILES_LONG" : [NSString stringWithFormat:NSLocalizedString(@"WEBINTF_DROPFILES_LONG", nil), deviceModel],
@"WEBINTF_DOWNLOADFILES" : NSLocalizedString(@"WEBINTF_DOWNLOADFILES", nil),
@"WEBINTF_DOWNLOADFILES_LONG" : [NSString stringWithFormat: NSLocalizedString(@"WEBINTF_DOWNLOADFILES_LONG", nil), deviceModel]};
@"WEBINTF_DROPFILES_LONG" : [NSString stringWithFormat:NSLocalizedString(@"WEBINTF_DROPFILES_LONG_ATV", nil), deviceModel]};
HTTPDynamicFileResponse *fileResponse;
if ([relativePath isEqualToString:@"/index.html"]) {
fileResponse = [[HTTPDynamicFileResponse alloc] initWithFilePath:[self filePathForURI:path]
forConnection:self
separator:@"%%"
replacementDictionary:replacementDict];
fileResponse.contentType = @"text/html";
if ([relativePath isEqualToString:@"/index.html"]) {
fileResponse = [[HTTPDynamicFileResponse alloc] initWithFilePath:[self filePathForURI:path]
forConnection:self
separator:@"%%"
replacementDictionary:replacementDict];
fileResponse.contentType = @"text/html";
#endif
return fileResponse;
} else if ([relativePath isEqualToString:@"/style.css"]) {
#if TARGET_OS_IOS
NSDictionary *replacementDict = @{@"WEBINTF_TITLE" : NSLocalizedString(@"WEBINTF_TITLE", nil)};
#else
NSDictionary *replacementDict = @{@"WEBINTF_TITLE" : NSLocalizedString(@"WEBINTF_TITLE_ATV", nil)};
#endif
HTTPDynamicFileResponse *fileResponse = [[HTTPDynamicFileResponse alloc] initWithFilePath:[self filePathForURI:path]
forConnection:self
separator:@"%%"
......
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>%%WEBINTF_TITLE%%</title>
<link rel="stylesheet" href="style.css">
<script type="text/javascript" src="jquery-1.10.1.min.js"></script>
<script type="text/javascript" src="jquery.ui.widget.js"></script>
<script type="text/javascript" src="jquery.iframe-transport.js"></script>
<script type="text/javascript" src="jquery.fileupload.js"></script>
<script type="text/javascript" src="main.js"></script>
</head>
<body>
<div id="header">
<div class="nav">
<a class="btn linkBtn" href="http://www.videolan.org" target="_blank"><div class="icon"></div></a>
<div class="btn uploadBtn">
<input id="fileupload" type="file" name="files[]" data-url="upload.json" multiple>
+
</div>
</div>
</div>
<div class="main">
<div class="uploads">
<ul></ul>
</div>
<div class="messageUpload">
<h1>%%WEBINTF_DROPFILES%%</h1>
<p>%%WEBINTF_DROPFILES_LONG%%</p>
</div>
<div id="footer">
<p>VLC for tvOS is free, open-source software published by <a href="http://www.videolan.org" target="_blank">VideoLAN</a>. <br />Modification and redistribution is subject to both the <a href="http://opensource.org/licenses/GPL-2.0" target="_blank">GPLv2 (or later)</a> and the <a href="http://opensource.org/licenses/MPL-2.0" target="_blank">MPLv2</a> as well as further rights reserved by the VideoLAN non-profit organization.<br />You can find more information about licensing in the About dialog within the app.<br />VideoLAN, VLC and VLC media player are internationally registered trademarks of the <a href="http://www.videolan.org/videolan/" target="_blank">VideoLAN non-profit organization</a>.</p>
</div>
</div>
<div id="overlay" class="">
<div id="modal">
<ul class="downloads cf">
<!-- content of div.content goes here -->
</ul>
</div>
</div>
</body>
</html>
......@@ -107,6 +107,14 @@
7D405ED01BEA11C1006ED886 /* VLCHTTPConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D30F3BD183AB24C00FFC021 /* VLCHTTPConnection.m */; };
7D405ED31BEA11CD006ED886 /* VLCHTTPUploaderController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D30F3C1183AB24C00FFC021 /* VLCHTTPUploaderController.m */; };
7D405ED41BEA150C006ED886 /* VLCActivityManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D18F0A11B34522000651A30 /* VLCActivityManager.m */; };
7D405ED51BEA1F56006ED886 /* Raleway.woff in Resources */ = {isa = PBXBuildFile; fileRef = 7D32B383185E293D006CA474 /* Raleway.woff */; };
7D405ED61BEA1F56006ED886 /* jquery-1.10.1.min.js in Resources */ = {isa = PBXBuildFile; fileRef = 7AC8629E1765E90C0011611A /* jquery-1.10.1.min.js */; };
7D405ED71BEA1F56006ED886 /* jquery.fileupload.js in Resources */ = {isa = PBXBuildFile; fileRef = 7AC8629F1765E90C0011611A /* jquery.fileupload.js */; };
7D405ED81BEA1F56006ED886 /* jquery.iframe-transport.js in Resources */ = {isa = PBXBuildFile; fileRef = 7AC862A01765E90C0011611A /* jquery.iframe-transport.js */; };
7D405ED91BEA1F56006ED886 /* jquery.ui.widget.js in Resources */ = {isa = PBXBuildFile; fileRef = 7AC862A11765E90C0011611A /* jquery.ui.widget.js */; };
7D405EDA1BEA1F56006ED886 /* style.css in Resources */ = {isa = PBXBuildFile; fileRef = 7AC8629B1765DC560011611A /* style.css */; };
7D405EDB1BEA1F56006ED886 /* main.js in Resources */ = {isa = PBXBuildFile; fileRef = 7D00161A17704DAC00649F27 /* main.js */; };
7D405EE21BEA1FAD006ED886 /* index.html in Resources */ = {isa = PBXBuildFile; fileRef = 7D405EE11BEA1FAD006ED886 /* index.html */; };
7D4408591BDA8DCA0080FB42 /* VLCBoxController.m in Sources */ = {isa = PBXBuildFile; fileRef = 41CD69591A29D72600E60BCE /* VLCBoxController.m */; };
7D44085A1BDA8DCE0080FB42 /* VLCBoxTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 41CD695B1A29D72600E60BCE /* VLCBoxTableViewController.m */; };
7D4625881A5614A1001A80B4 /* VLCEqualizerView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D4625871A5614A1001A80B4 /* VLCEqualizerView.m */; };
......@@ -640,6 +648,7 @@
7D3E52891BD7B5E100309D15 /* VLCCloudServicesTVViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VLCCloudServicesTVViewController.m; sourceTree = "<group>"; };
7D3E528A1BD7B5E100309D15 /* VLCCloudServicesTVViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = VLCCloudServicesTVViewController.xib; sourceTree = "<group>"; };
7D3EB013174A353E002062C2 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
7D405EE11BEA1FAD006ED886 /* index.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; name = index.html; path = web/index.html; sourceTree = "<group>"; };
7D4136621896710500D7B4B2 /* si */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = si; path = si.lproj/Localizable.strings; sourceTree = "<group>"; };
7D4625861A5614A1001A80B4 /* VLCEqualizerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VLCEqualizerView.h; path = Sources/VLCEqualizerView.h; sourceTree = SOURCE_ROOT; };
7D4625871A5614A1001A80B4 /* VLCEqualizerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VLCEqualizerView.m; path = Sources/VLCEqualizerView.m; sourceTree = SOURCE_ROOT; };
......@@ -1739,6 +1748,7 @@
7DEDD38B1BE936130053802C /* About Contents.html */,
7D2D7FD21BD2F109002D6B6D /* VLC for Apple TV.entitlements */,
7D13294E1BA1F10100BE647E /* Assets.xcassets */,
7D405EE11BEA1FAD006ED886 /* index.html */,
7D1329501BA1F10100BE647E /* Info.plist */,
7DEC8BE81BD68BC9006E1093 /* Settings.bundle */,
);
......@@ -2348,8 +2358,11 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7D405EDB1BEA1F56006ED886 /* main.js in Resources */,
DD8095E51BE3F4240065D8E1 /* VLCPlaybackInfoTVViewController.xib in Resources */,
7D405ED91BEA1F56006ED886 /* jquery.ui.widget.js in Resources */,
7D6069721BD94AD600AB765C /* VLCCloudStorageTableViewCell.xib in Resources */,
7D405ED71BEA1F56006ED886 /* jquery.fileupload.js in Resources */,
7DEC8BDF1BD67899006E1093 /* VLCFullscreenMovieTVViewController.xib in Resources */,
7DEDD38C1BE936130053802C /* About Contents.html in Resources */,
7D4CAAFC1BDE548A00A08EF5 /* Localizable.strings in Resources */,
......@@ -2357,11 +2370,16 @@
7DEDD38E1BE936F30053802C /* OpenSans-Regular.ttf in Resources */,
DDEAECF61BDFEAFA00756C83 /* VLCLocalNetworkServerTVCell.xib in Resources */,
DD8095EC1BE4F04E0065D8E1 /* VLCPlaybackInfoRateTVViewController.xib in Resources */,
7D405ED61BEA1F56006ED886 /* jquery-1.10.1.min.js in Resources */,
7DEC8BE91BD68BC9006E1093 /* Settings.bundle in Resources */,
7D405ED51BEA1F56006ED886 /* Raleway.woff in Resources */,
7D405ED81BEA1F56006ED886 /* jquery.iframe-transport.js in Resources */,
DD3EAC131BE26166003668DA /* VLCServerBrowsingTVCell.xib in Resources */,
7D3E528C1BD7B5E100309D15 /* VLCCloudServicesTVViewController.xib in Resources */,
7D405EDA1BEA1F56006ED886 /* style.css in Resources */,
7D7EF3DB1BD56B5900CD4CEE /* VLCOpenNetworkStreamTVViewController.xib in Resources */,
7DDE41901BE9225A0065C53A /* VLCAboutViewController.xib in Resources */,
7D405EE21BEA1FAD006ED886 /* index.html in Resources */,
7DEDD38D1BE936F30053802C /* SourceCodePro-Regular.ttf in Resources */,
DD8095F31BE510770065D8E1 /* VLCPlaybackInfoAudioTVViewController.xib in Resources */,
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment