Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 34 additions & 2 deletions OBSRemote.sln
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.31101.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebSocketAPIPlugin", "WebSocketAPIPlugin\WebSocketAPIPlugin.vcxproj", "{E905D054-ACE1-4BE1-8D78-B3D4961C5E99}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OBS", "..\OBS\OBS.vcxproj", "{221C92F4-3416-43F1-8E4E-78657AFD0111}"
Expand All @@ -15,6 +17,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OBSApi", "..\OBS\OBSApi\OBS
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PolarSSL", "WebSocketAPIPlugin\polarssl-1.2.5\visualc\VS2010\PolarSSL.vcxproj", "{46CF2D25-6A36-4189-B59C-E4815388E554}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libsamplerate", "..\OBS\libsamplerate\libsamplerate.vcxproj", "{47AFDBEF-F15F-4BC0-B436-5BE443C3F80F}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "librtmp", "..\OBS\librtmp\librtmp.vcxproj", "{22BF0EE3-CDCD-4925-A5F6-0A94CB5D4DB1}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libfaac", "..\OBS\libfaac\libfaac.vcxproj", "{9CC48C6E-92EB-4814-AD37-97AB3622AB65}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Expand Down Expand Up @@ -79,6 +87,30 @@ Global
{46CF2D25-6A36-4189-B59C-E4815388E554}.Release|Win32.Build.0 = Release|Win32
{46CF2D25-6A36-4189-B59C-E4815388E554}.Release|x64.ActiveCfg = Release|x64
{46CF2D25-6A36-4189-B59C-E4815388E554}.Release|x64.Build.0 = Release|x64
{47AFDBEF-F15F-4BC0-B436-5BE443C3F80F}.Debug|Win32.ActiveCfg = Debug|Win32
{47AFDBEF-F15F-4BC0-B436-5BE443C3F80F}.Debug|Win32.Build.0 = Debug|Win32
{47AFDBEF-F15F-4BC0-B436-5BE443C3F80F}.Debug|x64.ActiveCfg = Debug|x64
{47AFDBEF-F15F-4BC0-B436-5BE443C3F80F}.Debug|x64.Build.0 = Debug|x64
{47AFDBEF-F15F-4BC0-B436-5BE443C3F80F}.Release|Win32.ActiveCfg = Release|Win32
{47AFDBEF-F15F-4BC0-B436-5BE443C3F80F}.Release|Win32.Build.0 = Release|Win32
{47AFDBEF-F15F-4BC0-B436-5BE443C3F80F}.Release|x64.ActiveCfg = Release|x64
{47AFDBEF-F15F-4BC0-B436-5BE443C3F80F}.Release|x64.Build.0 = Release|x64
{22BF0EE3-CDCD-4925-A5F6-0A94CB5D4DB1}.Debug|Win32.ActiveCfg = Debug|Win32
{22BF0EE3-CDCD-4925-A5F6-0A94CB5D4DB1}.Debug|Win32.Build.0 = Debug|Win32
{22BF0EE3-CDCD-4925-A5F6-0A94CB5D4DB1}.Debug|x64.ActiveCfg = Debug|x64
{22BF0EE3-CDCD-4925-A5F6-0A94CB5D4DB1}.Debug|x64.Build.0 = Debug|x64
{22BF0EE3-CDCD-4925-A5F6-0A94CB5D4DB1}.Release|Win32.ActiveCfg = Release|Win32
{22BF0EE3-CDCD-4925-A5F6-0A94CB5D4DB1}.Release|Win32.Build.0 = Release|Win32
{22BF0EE3-CDCD-4925-A5F6-0A94CB5D4DB1}.Release|x64.ActiveCfg = Release|x64
{22BF0EE3-CDCD-4925-A5F6-0A94CB5D4DB1}.Release|x64.Build.0 = Release|x64
{9CC48C6E-92EB-4814-AD37-97AB3622AB65}.Debug|Win32.ActiveCfg = Debug|Win32
{9CC48C6E-92EB-4814-AD37-97AB3622AB65}.Debug|Win32.Build.0 = Debug|Win32
{9CC48C6E-92EB-4814-AD37-97AB3622AB65}.Debug|x64.ActiveCfg = Debug|x64
{9CC48C6E-92EB-4814-AD37-97AB3622AB65}.Debug|x64.Build.0 = Debug|x64
{9CC48C6E-92EB-4814-AD37-97AB3622AB65}.Release|Win32.ActiveCfg = Release|Win32
{9CC48C6E-92EB-4814-AD37-97AB3622AB65}.Release|Win32.Build.0 = Release|Win32
{9CC48C6E-92EB-4814-AD37-97AB3622AB65}.Release|x64.ActiveCfg = Release|x64
{9CC48C6E-92EB-4814-AD37-97AB3622AB65}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
9 changes: 7 additions & 2 deletions WebClient/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
Expand All @@ -24,7 +24,12 @@
<a href="http://obsremote.com" id="OBSHeader">OBS Remote</a>
<table id="buttoncontainer">
<tr>
<td>
<td>
<div id="button3" class="button">
<p>Start Recording</p>
</div>
</td>
<td>
<div id="button1" class="button">
<p>Start Streaming</p>
</div>
Expand Down
31 changes: 28 additions & 3 deletions WebClient/js/main.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
var currentlyStreaming = false;
var currentlyPreviewing = false;
var totalSecondsStreaming = 0;
var isRecording = false;

/*auth variables*/
var authSalt = "";
Expand All @@ -12,7 +13,8 @@ $(function() {

$("#button1").on("click", startStreaming);
$("#button2").on("click", startPreview);

$("#button3").on("click", startRecording);

/* initialize auth dialog */
$( "#auth-dialog-form" ).dialog({
autoOpen: false,
Expand Down Expand Up @@ -308,8 +310,18 @@ function onStartStreaming(update)
$("#OnTheAir p:first").text("ON THE AIR");
streamConfigStartStreaming();
}
$("#button1").css("visibility", "hidden");
$("#button2 p:first").html("Stop " + ((previewOnly)?"Preview":"Streaming"));

if (!isRecording) {
$("#button1").css("visibility", "hidden");
$("#button3").css("visibility", "hidden");
$("#button2 p:first").html("Stop " + ((previewOnly) ? "Preview" : "Streaming"));
} else {
$("#button1").css("visibility", "hidden");
$("#button2").css("visibility", "hidden");
$("#button3 p:first").html("Stop Recording");
}


}

}
Expand All @@ -324,8 +336,12 @@ function onStopStreaming(update)
$("#OnTheAir").attr("class", null);
$("#OnTheAir p:first").text("OFF THE AIR");
$("#button1").css("visibility", "visible");
$("#button2").css("visibility", "visible");
$("#button3").css("visibility", "visible");
$("#button2 p:first").html("Start Preview");
$("#button3 p:first").html("Start Recording");
$("#StatsTable").css("visibility", "hidden");
isRecording = false;
}

streamConfigStopStreaming(totalSecondsStreaming);
Expand Down Expand Up @@ -364,6 +380,15 @@ function startStreaming()
sendMessage(myJSONRequest);
}

function startRecording()
{
var myJSONRequest = {};
myJSONRequest["request-type"] = "StartStopRecording";
isRecording = true;

sendMessage(myJSONRequest);
}

function startPreview()
{
var myJSONRequest = {};
Expand Down
4 changes: 2 additions & 2 deletions WebClient/js/version.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var requiredPluginVersion = 1.1;
var requiredPluginVersion = 1.2;

var oldPluginUrls = {"1.00":"./V1_01/index.html"};

var webclientVersion = 1.1;
var webclientVersion = 1.2;
8 changes: 8 additions & 0 deletions WebSocketAPIPlugin/MessageHandling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ void OBSAPIMessageHandler::initializeMessageMap()
messageMap[REQ_SET_SCENEITEM_POSITION_AND_SIZE] = OBSAPIMessageHandler::HandleSetSceneItemPositionAndSize;
messageMap[REQ_GET_STREAMING_STATUS] = OBSAPIMessageHandler::HandleGetStreamingStatus;
messageMap[REQ_STARTSTOP_STREAMING] = OBSAPIMessageHandler::HandleStartStopStreaming;
messageMap[REQ_STARTSTOP_RECORDING] = OBSAPIMessageHandler::HandleStartStopRecording;
messageMap[REQ_TOGGLE_MUTE] = OBSAPIMessageHandler::HandleToggleMute;
messageMap[REQ_GET_VOLUMES] = OBSAPIMessageHandler::HandleGetVolumes;
messageMap[REQ_SET_VOLUME] = OBSAPIMessageHandler::HandleSetVolume;
Expand Down Expand Up @@ -410,6 +411,13 @@ json_t* OBSAPIMessageHandler::HandleStartStopStreaming(OBSAPIMessageHandler* han
return GetOkResponse();
}

json_t* OBSAPIMessageHandler::HandleStartStopRecording(OBSAPIMessageHandler* handler, json_t* message)
{
OBSStartStopRecording();

return GetOkResponse();
}

json_t* OBSAPIMessageHandler::HandleToggleMute(OBSAPIMessageHandler* handler, json_t* message)
{
json_t* channel = json_object_get(message, "channel");
Expand Down
3 changes: 3 additions & 0 deletions WebSocketAPIPlugin/MessageHandling.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@

#define REQ_GET_STREAMING_STATUS "GetStreamingStatus"
#define REQ_STARTSTOP_STREAMING "StartStopStreaming"
#define REQ_STARTSTOP_RECORDING "StartStopRecording"

#define REQ_TOGGLE_MUTE "ToggleMute"
#define REQ_GET_VOLUMES "GetVolumes"
#define REQ_SET_VOLUME "SetVolume"
Expand Down Expand Up @@ -80,6 +82,7 @@ struct OBSAPIMessageHandler
static json_t* HandleSetSceneItemPositionAndSize(OBSAPIMessageHandler* handler, json_t* message);
static json_t* HandleGetStreamingStatus(OBSAPIMessageHandler* handler, json_t* message);
static json_t* HandleStartStopStreaming(OBSAPIMessageHandler* handler, json_t* message);
static json_t* HandleStartStopRecording(OBSAPIMessageHandler* handler, json_t* message);
static json_t* HandleToggleMute(OBSAPIMessageHandler* handler, json_t* message);
static json_t* HandleGetVolumes(OBSAPIMessageHandler* handler, json_t* message);
static json_t* HandleSetVolume(OBSAPIMessageHandler* handler, json_t* message);
Expand Down
4 changes: 2 additions & 2 deletions WebSocketAPIPlugin/OBSRemote.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#pragma once

#define OBS_REMOTE_VERSION 1.1
#define OBS_REMOTE_FULLNAME "OBS Remote v1.1"
#define OBS_REMOTE_VERSION 1.2
#define OBS_REMOTE_FULLNAME "OBS Remote v1.2"

#include "resource.h"
6 changes: 5 additions & 1 deletion WebSocketAPIPlugin/WebSocketAPIPlugin.vcxproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
Expand Down Expand Up @@ -28,19 +28,23 @@
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
Expand Down
6 changes: 5 additions & 1 deletion WebSocketAPIPlugin/jansson-2.4/win32/vs2008/jansson.vcxproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
Expand Down Expand Up @@ -28,19 +28,23 @@
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug static|Win32">
<Configuration>Debug static</Configuration>
Expand Down Expand Up @@ -44,16 +44,19 @@
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug static|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug static|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
Expand All @@ -65,19 +68,26 @@
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release static|Win32'">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release DLL|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'">
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
Expand Down
12 changes: 11 additions & 1 deletion WebSocketAPIPlugin/libwebsockets/win32port/zlib/ZLib.vcxproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug static|Win32">
<Configuration>Debug static</Configuration>
Expand Down Expand Up @@ -42,33 +42,43 @@
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug static|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug static|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release static|Win32'">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release DLL|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'">
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
Expand Down
Loading