Commit 7b45f1a9 authored by Murukesh Mohanan's avatar Murukesh Mohanan

part 1

parent 31d82a39
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|AnyCPU">
<Configuration>Debug</Configuration>
<Platform>AnyCPU</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x86">
<Configuration>Debug</Configuration>
<Platform>x86</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|AnyCPU">
<Configuration>Release</Configuration>
<Platform>AnyCPU</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM">
<Configuration>Release</Configuration>
<Platform>ARM</Platform>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x86">
<Configuration>Release</Configuration>
<Platform>x86</Platform>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>74832f5f-024c-419e-a1ac-acd06f384a70</ProjectGuid>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup Condition="'$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0'">
<VisualStudioVersion>14.0</VisualStudioVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).Default.props" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).props" />
<PropertyGroup>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion>10.0.10586.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.10240.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>$(VersionNumberMajor).$(VersionNumberMinor)</MinimumVisualStudioVersion>
<DefaultLanguage>en-US</DefaultLanguage>
<PackageCertificateKeyFile>Video Queue_TemporaryKey.pfx</PackageCertificateKeyFile>
</PropertyGroup>
<ItemGroup>
<AppxManifest Include="package.appxmanifest">
<SubType>Designer</SubType>
</AppxManifest>
<Content Include="default.html" />
<Content Include="images\LockScreenLogo.scale-200.png" />
<Content Include="images\SplashScreen.scale-200.png" />
<Content Include="images\Square150x150Logo.scale-200.png" />
<Content Include="images\Square44x44Logo.scale-200.png" />
<Content Include="images\Square44x44Logo.targetsize-24_altform-unplated.png" />
<Content Include="images\StoreLogo.png" />
<Content Include="images\Wide310x150Logo.scale-200.png" />
<Content Include="js\default.js" />
<Content Include="css\default.css" />
<Content Include="js\video-search.js" />
<Content Include="packages.config" />
<Content Include="Scripts\jquery-2.2.0.intellisense.js" />
<Content Include="Scripts\jquery-2.2.0.js" />
<Content Include="Scripts\jquery-2.2.0.min.js" />
<Content Include="Scripts\jquery-2.2.0.min.map" />
<Content Include="WinJS\css\ui-dark.css" />
<Content Include="WinJS\css\ui-light.css" />
<Content Include="WinJS\fonts\Symbols.ttf" />
<Content Include="WinJS\js\en-US\ui.strings.js" />
<Content Include="WinJS\js\base.js" />
<Content Include="WinJS\js\ui.js" />
<None Include="Video Queue_TemporaryKey.pfx" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).targets" />
<!-- To modify your build process, add your task inside one of the targets below then uncomment
that target and the DisableFastUpToDateCheck PropertyGroup.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
<PropertyGroup>
<DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
</PropertyGroup>
-->
</Project>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
body
{
height: 100%;
}
#play-area {
width: 60%;
height: 100vh;
float: left;
text-align: center;
overflow: scroll;
}
#play-area iframe {
margin: 1em auto;
display: block;
}
#sidebar {
width: 40%;
background-color: darkgray;
min-height: 100vh;
float: right;
}
#search-form {
text-align: center;
}
#search-box {
width: 100%;
min-height: 2em;
padding: 0.2em 0.5em;
margin: 0.2em 0;
}
#search-button {
width: 60%;
padding: 0.2em;
margin: 0.5em;
}
#results {
overflow: scroll;
max-height: 90vh;
}
.result-box {
min-height: 6em;
margin-top: 1em;
background-color: silver;
width: 100%;
clear: both;
overflow: auto;
}
.result-box img {
float: right;
padding: 0.5em;
width: 90%;
text-align: center;
margin: auto;
}
.result-box ul {
list-style: none;
color: black;
}
.result-box a {
text-decoration: none;
}
.overlay {
top: 0;
left: 0;
width: 100%;
height: 100%;
position:absolute;
}
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Video_Queue</title>
<!-- WinJS references -->
<link href="WinJS/css/ui-dark.css" rel="stylesheet" />
<link href="css/default.css" rel="stylesheet"/>
<script src="WinJS/js/base.js"></script>
<script src="WinJS/js/ui.js"></script>
<!-- Video_Queue references -->
<link href="/css/default.css" rel="stylesheet" />
<script src="/js/default.js"></script>
<script src="/Scripts/jquery-2.2.0.min.js"></script>
<script src="https://www.youtube.com/iframe_api"></script>
</head>
<body class="win-type-body">
<section id="play-area">
</section>
<section id="sidebar">
<section id="search-area">
<form id="search-form">
<input id="search-box" type="text" placeholder="Type something..."/>
<button id="search-button" type="submit">Search!</button>
</form>
</section>
<section id="results">
</section>
</section>
</body>
<script src="/js/video-search.js"></script>
</html>
// For an introduction to the Blank template, see the following documentation:
// http://go.microsoft.com/fwlink/?LinkId=232509
(function () {
"use strict";
var app = WinJS.Application;
var activation = Windows.ApplicationModel.Activation;
app.onactivated = function (args) {
if (args.detail.kind === activation.ActivationKind.launch) {
if (args.detail.previousExecutionState !== activation.ApplicationExecutionState.terminated) {
// TODO: This application has been newly launched. Initialize your application here.
} else {
// TODO: This application was suspended and then terminated.
// To create a smooth user experience, restore application state here so that it looks like the app never stopped running.
}
args.setPromise(WinJS.UI.processAll());
}
};
app.oncheckpoint = function (args) {
// TODO: This application is about to be suspended. Save any state that needs to persist across suspensions here.
// You might use the WinJS.Application.sessionState object, which is automatically saved and restored across suspension.
// If you need to complete an asynchronous operation before your application is suspended, call args.setPromise().
};
app.start();
})();
var autoplay = true;
function playlistAppend() {
var playlist = $('#play-area');
var next_frame = document.createElement('iframe');
next_frame.id = this.id + ' iframe';
next_frame.width = Math.floor(playlist.width() * 0.9);
next_frame.height = next_frame.width * (390 / 640);
video_id = this.id.split(' ')[0];
time = parseInt(this.id.split(' ')[1]) + 2;
url = "https://www.youtube.com/embed/" + video_id + "?enablejsapi=1&origin=http://example.com";
if (autoplay) {
url += '&autoplay=1';
}
next_frame.src = url;
playlist.append(next_frame);
if (autoplay) {
console.log(time);
window.setTimeout(playNext, time);
autoplay = false;
}
}
function playNext () {
$('#play-area iframe:first').remove();
next_frame = $('#play-area iframe:first');
if (next_frame.length == 0) {
autoplay = true;
return false;
}
src = next_frame.prop('src');
time = parseInt(next_frame.prop('id').split(' ')[1]) + 2000;
next_frame.prop('src', src + '&autoplay=1');
console.log('next', time);
window.setTimeout(playNext, time);
}
function parseResults(data) {
var resultsArea = $('#results');
resultsArea.empty();
for (result of data.d.results) {
url = result.MediaUrl;
rdiv = document.createElement('div');
rdiv.classList.add('result-box');
if (url.split('/')[2] == 'www.youtube.com') {
rdiv.id = url.split('=').slice(-1)[0] + ' ' + result.RunTime;
rdiv.classList.add('youtube');
}
rdiv.onclick = playlistAppend;
thumbnail = document.createElement('img');
thumbnail.src = result.Thumbnail.MediaUrl;
link = document.createElement('a');
link.href = url;
link.innerText = result.Title;
title = document.createElement('li');
title.appendChild(link);
var date = new Date(null);
date.setSeconds(parseInt(result.RunTime) / 1000);
length = document.createElement('li');
length.innerHTML = 'Length: ' + date.toISOString().substr(11, 8);
videoName = document.createElement('ul');
videoName.appendChild(title);
videoName.appendChild(length);
rdiv.appendChild(videoName);
rdiv.appendChild(thumbnail);
resultsArea.append(rdiv);
}
}
document.getElementById('search-form').onsubmit = function searchBing() {
baseURI = 'https://api.datamarket.azure.com/Bing/Search/v1/Video?$format=json&$top=10';
query = $('#search-box').val();
$('#query-result').src = baseURI + "&Query=" + query;
$.ajax ({
url: baseURI,
data: {
Query: "'" + query + "'"
},
password: 'g6rRIbubGdH+I882h/C5U5qNjJ58MBOJB0lrbzTvcGw=',
username: 'g6rRIbubGdH+I882h/C5U5qNjJ58MBOJB0lrbzTvcGw='
}).done(parseResults);
return false;
};
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" IgnorableNamespaces="uap mp">
<Identity Name="74832f5f-024c-419e-a1ac-acd06f384a70" Version="1.0.0.0" Publisher="CN=Murukesh" />
<mp:PhoneIdentity PhoneProductId="74832f5f-024c-419e-a1ac-acd06f384a70" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<Properties>
<DisplayName>Video Queue</DisplayName>
<PublisherDisplayName>Murukesh</PublisherDisplayName>
<Logo>images\storelogo.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
</Dependencies>
<Resources>
<Resource Language="x-generate" />
</Resources>
<Applications>
<Application Id="App" StartPage="default.html">
<uap:VisualElements DisplayName="Video Queue" Description="Video Queue" BackgroundColor="transparent" Square150x150Logo="images\Square150x150Logo.png" Square44x44Logo="images\Square44x44Logo.png">
<uap:DefaultTile Wide310x150Logo="images\Wide310x150Logo.png">
</uap:DefaultTile>
<uap:SplashScreen Image="images\splashscreen.png" />
</uap:VisualElements>
<uap:ApplicationContentUriRules>
<uap:Rule Match="https://*.youtube.com" Type="include" WindowsRuntimeAccess="all" />
<uap:Rule Match="https://s.ytimg.com" Type="include" WindowsRuntimeAccess="all" />
</uap:ApplicationContentUriRules>
</Application>
</Applications>
<Capabilities>
<Capability Name="internetClient" />
</Capabilities>
</Package>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="jQuery" version="2.2.0" targetFramework="uap10.0.10586" />
</packages>
\ No newline at end of file
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