Skip to content

Commit

Permalink
Merge branch 'master' into 'release'
Browse files Browse the repository at this point in the history
Release 2.2.3

See merge request voltstro-studios/uwb/unitywebbrowser!6
  • Loading branch information
Voltstro committed Oct 20, 2024
2 parents 433bcfe + 02137ff commit fe8bbac
Show file tree
Hide file tree
Showing 21 changed files with 87 additions and 33 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.2.3] - 2024-10-20

### Added

- Added `AudioMute`

### Changed

- Update CEF to 130.1.2
- Bump deps
- Change ready signal to fire when cef calls OnAfterCreated

## [2.2.2] - 2024-10-16

### Added
Expand Down
4 changes: 2 additions & 2 deletions src/Packages/UnityWebBrowser.Communication.Pipes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "dev.voltstro.unitywebbrowser.communication.pipes",
"displayName": "Unity Web Browser Pipes Communication",
"description": "Adds support to use pipes in UWB.",
"version": "2.2.2",
"version": "2.2.3",
"unity": "2021.3",
"author": {
"name": "Voltstro",
Expand All @@ -18,7 +18,7 @@
"documentationUrl": "https://projects.voltstro.dev/UnityWebBrowser/latest/",
"licensesUrl": "https://github.com/Voltstro-Studios/UnityWebBrowser/blob/master/LICENSE.md",
"dependencies": {
"dev.voltstro.unitywebbrowser": "2.2.2",
"dev.voltstro.unitywebbrowser": "2.2.3",
"org.nuget.voltrpc.communication.pipes": "3.1.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "dev.voltstro.unitywebbrowser.engine.cef.linux.x64",
"displayName": "Unity Web Browser CEF Engine (Linux x64)",
"description": "CEF engine for Unity Web Browser (Linux x64).",
"version": "2.2.2-129.0.11",
"version": "2.2.3-130.1.2",
"unity": "2021.3",
"author": {
"name": "Voltstro",
Expand All @@ -17,6 +17,6 @@
"documentationUrl": "https://projects.voltstro.dev/UnityWebBrowser/latest/articles/user/engines/#cef-engine",
"licensesUrl": "https://github.com/Voltstro-Studios/UnityWebBrowser/blob/master/LICENSE.md",
"dependencies": {
"dev.voltstro.unitywebbrowser.engine.cef": "2.2.2-129.0.11"
"dev.voltstro.unitywebbrowser.engine.cef": "2.2.3-130.1.2"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "dev.voltstro.unitywebbrowser.engine.cef.macos.arm64",
"displayName": "Unity Web Browser CEF Engine (MacOS arm64)",
"description": "CEF engine for Unity Web Browser (MacOS arm64).",
"version": "2.2.2-129.0.11",
"version": "2.2.3-130.1.2",
"unity": "2021.2",
"author": {
"name": "Voltstro",
Expand All @@ -17,6 +17,6 @@
"documentationUrl": "https://projects.voltstro.dev/UnityWebBrowser/latest/articles/user/engines/#cef-engine",
"licensesUrl": "https://github.com/Voltstro-Studios/UnityWebBrowser/blob/master/LICENSE.md",
"dependencies": {
"dev.voltstro.unitywebbrowser.engine.cef": "2.2.2-129.0.11"
"dev.voltstro.unitywebbrowser.engine.cef": "2.2.3-130.1.2"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "dev.voltstro.unitywebbrowser.engine.cef.macos.x64",
"displayName": "Unity Web Browser CEF Engine (MacOS x64)",
"description": "CEF engine for Unity Web Browser (MacOS x64).",
"version": "2.2.2-129.0.11",
"version": "2.2.3-130.1.2",
"unity": "2021.2",
"author": {
"name": "Voltstro",
Expand All @@ -17,6 +17,6 @@
"documentationUrl": "https://projects.voltstro.dev/UnityWebBrowser/latest/articles/user/engines/#cef-engine",
"licensesUrl": "https://github.com/Voltstro-Studios/UnityWebBrowser/blob/master/LICENSE.md",
"dependencies": {
"dev.voltstro.unitywebbrowser.engine.cef": "2.2.2-129.0.11"
"dev.voltstro.unitywebbrowser.engine.cef": "2.2.3-130.1.2"
}
}
4 changes: 2 additions & 2 deletions src/Packages/UnityWebBrowser.Engine.Cef.Win-x64/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "dev.voltstro.unitywebbrowser.engine.cef.win.x64",
"displayName": "Unity Web Browser CEF Engine (Win x64)",
"description": "CEF engine for Unity Web Browser (Win x64).",
"version": "2.2.2-129.0.11",
"version": "2.2.3-130.1.2",
"unity": "2021.2",
"author": {
"name": "Voltstro",
Expand All @@ -17,6 +17,6 @@
"documentationUrl": "https://projects.voltstro.dev/UnityWebBrowser/latest/articles/user/engines/#cef-engine",
"licensesUrl": "https://github.com/Voltstro-Studios/UnityWebBrowser/blob/master/LICENSE.md",
"dependencies": {
"dev.voltstro.unitywebbrowser.engine.cef": "2.2.2-129.0.11"
"dev.voltstro.unitywebbrowser.engine.cef": "2.2.3-130.1.2"
}
}
4 changes: 2 additions & 2 deletions src/Packages/UnityWebBrowser.Engine.Cef/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "dev.voltstro.unitywebbrowser.engine.cef",
"displayName": "Unity Web Browser CEF Engine",
"description": "CEF engine for Unity Web Browser.",
"version": "2.2.2-129.0.11",
"version": "2.2.3-130.1.2",
"unity": "2021.3",
"author": {
"name": "Voltstro",
Expand All @@ -18,6 +18,6 @@
"documentationUrl": "https://projects.voltstro.dev/UnityWebBrowser/latest/articles/user/engines/#cef-engine",
"licensesUrl": "https://github.com/Voltstro-Studios/UnityWebBrowser/blob/master/LICENSE.md",
"dependencies": {
"dev.voltstro.unitywebbrowser": "2.2.2"
"dev.voltstro.unitywebbrowser": "2.2.3"
}
}
4 changes: 2 additions & 2 deletions src/Packages/UnityWebBrowser/Runtime/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.2.2")]
[assembly: AssemblyFileVersion("2.2.2")]
[assembly: AssemblyVersion("2.2.3")]
[assembly: AssemblyFileVersion("2.2.3")]

[assembly: InternalsVisibleTo("VoltstroStudios.UnityWebBrowser.Prj")]
[assembly: InternalsVisibleTo("VoltstroStudios.UnityWebBrowser.Editor")]
Expand Down
11 changes: 11 additions & 0 deletions src/Packages/UnityWebBrowser/Runtime/Core/WebBrowserClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -951,6 +951,17 @@ public void Resize(Resolution newResolution)
logger.Debug($"Resized to {newResolution}.");
}

/// <summary>
/// Mutes browser audio
/// </summary>
/// <param name="muted"></param>
public void AudioMute(bool muted)
{
CheckIfIsReadyAndConnected();

communicationsManager.AudioMute(muted);
}

[DebuggerStepThrough]
private void CheckIfIsReadyAndConnected()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,11 @@ public void Resize(Resolution resolution)
ExecuteTask(() => engineProxy.Resize(resolution));
}

public void AudioMute(bool muted)
{
ExecuteTask(() => engineProxy.AudioMute(muted));
}

public void Connect()
{
ipcClient.Connect();
Expand Down
6 changes: 3 additions & 3 deletions src/Packages/UnityWebBrowser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "dev.voltstro.unitywebbrowser",
"displayName": "Unity Web Browser",
"description": "Unity Web Browser (UWB) is a Unity package that allows displaying and interacting with the web from within Unity.",
"version": "2.2.2",
"version": "2.2.3",
"unity": "2021.3",
"author": {
"name": "Voltstro",
Expand All @@ -20,8 +20,8 @@
"dependencies": {
"dev.voltstro.nativearrayspanextensions": "1.0.1",
"com.unity.nuget.newtonsoft-json": "3.2.1",
"com.cysharp.unitask": "2.5.5",
"org.nuget.voltrpc": "3.2.0"
"com.cysharp.unitask": "2.5.10",
"org.nuget.voltrpc": "3.2.1"
},
"samples": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,11 @@ public void Resize(Resolution resolution)
cefClient.Resize(resolution);
}

public void AudioMute(bool muted)
{
cefClient.AudioMute(muted);
}

#endregion

#region Destroy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ protected override void EntryPoint(LaunchArguments launchArguments, string[] arg
cefEngineControlsManager.Init(ClientControlsActions, PopupManager);

SetupIpc(cefEngineControlsManager, launchArguments);
Ready();
//Ready();

//Calling run message loop will cause the main thread to lock (what we want)
CefRuntime.RunMessageLoop();
Expand Down
7 changes: 7 additions & 0 deletions src/UnityWebBrowser.Engine.Cef/Shared/Browser/UwbCefClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using System.Runtime.CompilerServices;
using System.Text;
using Microsoft.Extensions.Logging;
using UnityWebBrowser.Engine.Cef.Core;
using UnityWebBrowser.Engine.Cef.Shared.Browser.Js;
using UnityWebBrowser.Engine.Cef.Shared.Browser.Messages;
using UnityWebBrowser.Engine.Cef.Shared.Browser.Popups;
Expand Down Expand Up @@ -81,6 +82,7 @@ public UwbCefClient(
{
browser = cefBrowser;
browserHost = cefBrowser.GetHost();
ClientControls.Ready();
};
displayHandler = new UwbCefDisplayHandler(this, mainLogger, browserConsoleLogger);
requestHandler = new UwbCefRequestHandler(proxySettings, ignoreSslErrors, ignoreSslErrorsDomains);
Expand Down Expand Up @@ -414,6 +416,11 @@ public void Resize(Resolution resolution)
browserHost.WasResized();
}

public void AudioMute(bool muted)
{
browserHost.SetAudioMuted(muted);
}

#endregion

#region Messages
Expand Down
2 changes: 1 addition & 1 deletion src/UnityWebBrowser.Engine.Cef/version.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
"version": "2.2.2-129.0.11",
"version": "2.2.3-130.1.2",
"publicReleaseRefSpec": [
"^refs/heads/master$"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ public sealed class UWBPrjDebugUI : MonoBehaviour

//Zoom
private double zoomLevel = double.MinValue;

//Audio
private bool audioMuted = false;

private void Awake()
{
Expand Down Expand Up @@ -134,7 +137,7 @@ private void OnClientConnected()

hasConnected = true;
}

private void Update()
{
if(webBrowserUIBasic.browserClient.HasDisposed || !hasConnected)
Expand Down Expand Up @@ -195,6 +198,11 @@ private void OnImGuiLayout(UImGui.UImGui uImGui)

//Buttons for getting details
{
if(ImGui.Checkbox("Audio Mute", ref audioMuted))
webBrowserUIBasic.browserClient.AudioMute(audioMuted);

ImGui.SameLine();

if (ImGui.Button("Get Scroll Pos"))
Debug.Log(webBrowserUIBasic.browserClient.GetScrollPosition());

Expand Down
20 changes: 10 additions & 10 deletions src/UnityWebBrowser.UnityProject/Packages/packages-lock.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"dependencies": {
"com.cysharp.unitask": {
"version": "2.5.5",
"version": "2.5.10",
"depth": 1,
"source": "registry",
"dependencies": {},
Expand Down Expand Up @@ -149,16 +149,16 @@
"dependencies": {
"dev.voltstro.nativearrayspanextensions": "1.0.1",
"com.unity.nuget.newtonsoft-json": "3.2.1",
"com.cysharp.unitask": "2.5.5",
"org.nuget.voltrpc": "3.2.0"
"com.cysharp.unitask": "2.5.10",
"org.nuget.voltrpc": "3.2.1"
}
},
"dev.voltstro.unitywebbrowser.communication.pipes": {
"version": "file:../../Packages/UnityWebBrowser.Communication.Pipes",
"depth": 0,
"source": "local",
"dependencies": {
"dev.voltstro.unitywebbrowser": "2.2.2",
"dev.voltstro.unitywebbrowser": "2.2.3",
"org.nuget.voltrpc.communication.pipes": "3.1.0"
}
},
Expand All @@ -167,39 +167,39 @@
"depth": 0,
"source": "local",
"dependencies": {
"dev.voltstro.unitywebbrowser": "2.2.2"
"dev.voltstro.unitywebbrowser": "2.2.3"
}
},
"dev.voltstro.unitywebbrowser.engine.cef.linux.x64": {
"version": "file:../../Packages/UnityWebBrowser.Engine.Cef.Linux-x64",
"depth": 0,
"source": "local",
"dependencies": {
"dev.voltstro.unitywebbrowser.engine.cef": "2.2.2-129.0.11"
"dev.voltstro.unitywebbrowser.engine.cef": "2.2.3-130.1.2"
}
},
"dev.voltstro.unitywebbrowser.engine.cef.macos.arm64": {
"version": "file:../../Packages/UnityWebBrowser.Engine.Cef.MacOS-arm64",
"depth": 0,
"source": "local",
"dependencies": {
"dev.voltstro.unitywebbrowser.engine.cef": "2.2.2-129.0.11"
"dev.voltstro.unitywebbrowser.engine.cef": "2.2.3-130.1.2"
}
},
"dev.voltstro.unitywebbrowser.engine.cef.macos.x64": {
"version": "file:../../Packages/UnityWebBrowser.Engine.Cef.MacOS-x64",
"depth": 0,
"source": "local",
"dependencies": {
"dev.voltstro.unitywebbrowser.engine.cef": "2.2.2-129.0.11"
"dev.voltstro.unitywebbrowser.engine.cef": "2.2.3-130.1.2"
}
},
"dev.voltstro.unitywebbrowser.engine.cef.win.x64": {
"version": "file:../../Packages/UnityWebBrowser.Engine.Cef.Win-x64",
"depth": 0,
"source": "local",
"dependencies": {
"dev.voltstro.unitywebbrowser.engine.cef": "2.2.2-129.0.11"
"dev.voltstro.unitywebbrowser.engine.cef": "2.2.3-130.1.2"
}
},
"dev.voltstro.unitywebbrowser.unix-support": {
Expand All @@ -223,7 +223,7 @@
"url": "https://upm-pkgs.voltstro.dev"
},
"org.nuget.voltrpc": {
"version": "3.2.0",
"version": "3.2.1",
"depth": 1,
"source": "registry",
"dependencies": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,10 @@ internal interface IEngineControls
/// </summary>
/// <param name="resolution"></param>
public void Resize(Resolution resolution);

/// <summary>
/// Mutes browser audio
/// </summary>
/// <param name="muted"></param>
public void AudioMute(bool muted);
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="VoltRpc" Version="3.2.0" />
<PackageReference Include="VoltRpc" Version="3.2.1" />
<PackageReference Include="VoltRpc.Proxy.Generator" Version="2.3.0" />

<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All"/>
Expand Down
2 changes: 1 addition & 1 deletion src/version.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
"version": "2.2.2",
"version": "2.2.3",
"publicReleaseRefSpec": [
"^refs/heads/release$"
],
Expand Down

0 comments on commit fe8bbac

Please sign in to comment.