Commit c847be74 authored by Martin Finkel's avatar Martin Finkel

Add PHP peachpie PoC

parent 31987cc4
<Project Sdk="Peachpie.NET.Sdk/0.9.26">
<PropertyGroup>
<OutputType>exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
<StartupObject>program.php</StartupObject>
</PropertyGroup>
<ItemGroup>
<Compile Include="**/*.php" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="LibVLCSharp" Version="0.1.6" />
<PackageReference Include="VideoLAN.LibVLC.Windows" Version="3.0.5" />
</ItemGroup>
</Project>
\ No newline at end of file
<?php
use LibVLCSharp\Shared\Core as Core;
use LibVLCSharp\Shared\LibVLC as LibVLC;
use LibVLCSharp\Shared\MediaPlayer as MediaPlayer;
use LibVLCSharp\Shared\Media as Media;
# Hack to compute libvlc.dll/libvlccore.dll path for PHP projects
list($scriptPath) = get_included_files();
$p = str_replace("program.php", "", $scriptPath);
$libvlcPath = $p . "bin\\Debug\\netcoreapp2.0";
var_dump(Core::Initialize($libvlcPath));
Please register or sign in to reply
$libVLC = new LibVLC();
$mediaPlayer = new MediaPlayer($libVLC);
$media = new Media($libVLC, "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", 1);
$mediaPlayer->Play($media);
echo "Loading...";
$handle = fopen ("php://stdin","r");
$line = fgets($handle);
if(trim($line) != 'yes'){
echo "ABORTING!\n";
exit;
}
fclose($handle);
\ No newline at end of file
......@@ -29,6 +29,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PulseMusic.Android", "Pulse
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PulseMusic.iOS", "PulseMusic\src\PulseMusic\PulseMusic.iOS\PulseMusic.iOS.csproj", "{C9F0F801-61E0-4297-B3AB-32FCA8998395}"
EndProject
Project("{13B669BE-BB05-4DDF-9536-439F39A36129}") = "LibVLCSharp.PHP", "LibVLCSharp.PHP\LibVLCSharp.PHP.msbuildproj", "{34324FD2-0654-47A6-8ADC-90EC5AE5987F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Ad-Hoc|Any CPU = Ad-Hoc|Any CPU
......@@ -389,6 +391,30 @@ Global
{C9F0F801-61E0-4297-B3AB-32FCA8998395}.Release|iPhone.Build.0 = Release|iPhone
{C9F0F801-61E0-4297-B3AB-32FCA8998395}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
{C9F0F801-61E0-4297-B3AB-32FCA8998395}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
{34324FD2-0654-47A6-8ADC-90EC5AE5987F}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
{34324FD2-0654-47A6-8ADC-90EC5AE5987F}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
{34324FD2-0654-47A6-8ADC-90EC5AE5987F}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
{34324FD2-0654-47A6-8ADC-90EC5AE5987F}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
{34324FD2-0654-47A6-8ADC-90EC5AE5987F}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{34324FD2-0654-47A6-8ADC-90EC5AE5987F}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU
{34324FD2-0654-47A6-8ADC-90EC5AE5987F}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
{34324FD2-0654-47A6-8ADC-90EC5AE5987F}.AppStore|Any CPU.Build.0 = Debug|Any CPU
{34324FD2-0654-47A6-8ADC-90EC5AE5987F}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
{34324FD2-0654-47A6-8ADC-90EC5AE5987F}.AppStore|iPhone.Build.0 = Debug|Any CPU
{34324FD2-0654-47A6-8ADC-90EC5AE5987F}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{34324FD2-0654-47A6-8ADC-90EC5AE5987F}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU
{34324FD2-0654-47A6-8ADC-90EC5AE5987F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{34324FD2-0654-47A6-8ADC-90EC5AE5987F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{34324FD2-0654-47A6-8ADC-90EC5AE5987F}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{34324FD2-0654-47A6-8ADC-90EC5AE5987F}.Debug|iPhone.Build.0 = Debug|Any CPU
{34324FD2-0654-47A6-8ADC-90EC5AE5987F}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{34324FD2-0654-47A6-8ADC-90EC5AE5987F}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{34324FD2-0654-47A6-8ADC-90EC5AE5987F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{34324FD2-0654-47A6-8ADC-90EC5AE5987F}.Release|Any CPU.Build.0 = Release|Any CPU
{34324FD2-0654-47A6-8ADC-90EC5AE5987F}.Release|iPhone.ActiveCfg = Release|Any CPU
{34324FD2-0654-47A6-8ADC-90EC5AE5987F}.Release|iPhone.Build.0 = Release|Any CPU
{34324FD2-0654-47A6-8ADC-90EC5AE5987F}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{34324FD2-0654-47A6-8ADC-90EC5AE5987F}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......
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