From 99687b7f7d6fa526cdaed8c4384bd9ce73801107 Mon Sep 17 00:00:00 2001 From: Stephen Hodgson Date: Sat, 30 Dec 2023 14:31:04 -0500 Subject: [PATCH] com.utilities.rest 2.4.4 (#60) - updated com.utilities.extensions -> 1.1.14 - updated docs - updated workflow --- Documentation~/README.md | 7 ++++--- package.json | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Documentation~/README.md b/Documentation~/README.md index 1b8a69f..89d5243 100644 --- a/Documentation~/README.md +++ b/Documentation~/README.md @@ -196,8 +196,8 @@ var audioClip = await Rest.DownloadAudioClipAsync("www.your.api/your_file.ogg", if (audioClip != null) { -// assign it to your audio source -audioSource.clip = audioClip; + // assign it to your audio source + audioSource.clip = audioClip; audioSource.PlayOneShot(audioClip); } ``` @@ -208,9 +208,10 @@ Streams an audio file from disk or remote resource as soon as enough data has be > Unsure if this is working correctly as Unity doesn't seem to respect streaming when setting [`DownloadHandlerAudioClip.streamAudio`](https://docs.unity3d.com/ScriptReference/Networking.DownloadHandlerAudioClip-streamAudio.html) to true. > Seems to work better for local files on disk than remote resources. +> Seems to only work for mp3 files. ```csharp -var audioClip = await Rest.StreamAudioAsync("local/path/to/your_file.ogg", AudioType.OGGVORBIS, onStreamPlaybackReady => +var audioClip = await Rest.StreamAudioAsync("local/path/to/your_file.mp3", AudioType.MPEG, onStreamPlaybackReady => { audioSource.PlayOneShot(onStreamPlaybackReady); }); diff --git a/package.json b/package.json index 99964ad..59f507a 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "displayName": "Utilities.Rest", "description": "This package contains useful RESTful utilities for the Unity Game Engine.", "keywords": [], - "version": "2.4.3", + "version": "2.4.4", "unity": "2021.3", "documentationUrl": "https://github.com/RageAgainstThePixel/com.utilities.rest#documentation", "changelogUrl": "https://github.com/RageAgainstThePixel/com.utilities.rest/releases", @@ -16,7 +16,7 @@ "url": "https://github.com/StephenHodgson", "dependencies": { "com.utilities.async": "2.1.1", - "com.utilities.extensions": "1.1.13", + "com.utilities.extensions": "1.1.14", "com.unity.modules.unitywebrequest": "1.0.0", "com.unity.modules.unitywebrequestassetbundle": "1.0.0", "com.unity.modules.unitywebrequestaudio": "1.0.0",