app.hypergames.hypersdk 1.11.0-beta.7 → 1.11.0-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [1.11.0-beta.8](https://github.com/mvmhyper/hyper-sdk/compare/v1.11.0-beta.7...v1.11.0-beta.8) (2026-08-30)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **replay:** mute audio while seeking ([5ab8cd1](https://github.com/mvmhyper/hyper-sdk/commit/5ab8cd1411493cb5add07b51dc190c85251f99d2))
|
|
7
|
+
|
|
1
8
|
# [1.11.0-beta.7](https://github.com/mvmhyper/hyper-sdk/compare/v1.11.0-beta.6...v1.11.0-beta.7) (2026-08-30)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -33,6 +33,8 @@ namespace Hyper.Internal
|
|
|
33
33
|
|
|
34
34
|
private static bool _seekPlaybackReady;
|
|
35
35
|
private static bool _watchAgainAutoStartPending;
|
|
36
|
+
private static bool _isSeekAudioMuted;
|
|
37
|
+
private static float _volumeBeforeSeek;
|
|
36
38
|
|
|
37
39
|
public static void Configure(
|
|
38
40
|
string playerName,
|
|
@@ -40,6 +42,7 @@ namespace Hyper.Internal
|
|
|
40
42
|
long originalRandomSeed,
|
|
41
43
|
string entryId = null)
|
|
42
44
|
{
|
|
45
|
+
RestoreAudioAfterSeek();
|
|
43
46
|
IsActive = true;
|
|
44
47
|
PlayerName = playerName ?? string.Empty;
|
|
45
48
|
AvatarUrl = avatarUrl ?? string.Empty;
|
|
@@ -96,6 +99,7 @@ namespace Hyper.Internal
|
|
|
96
99
|
IsSeeking = false;
|
|
97
100
|
_seekPlaybackReady = false;
|
|
98
101
|
PlaybackSpeed = UserPlaybackSpeed;
|
|
102
|
+
RestoreAudioAfterSeek();
|
|
99
103
|
SeekCompleted?.Invoke(PlaybackSpeed);
|
|
100
104
|
}
|
|
101
105
|
}
|
|
@@ -114,6 +118,7 @@ namespace Hyper.Internal
|
|
|
114
118
|
Progress01 = 1f;
|
|
115
119
|
if (IsSeeking) PlaybackSpeed = UserPlaybackSpeed;
|
|
116
120
|
IsSeeking = false;
|
|
121
|
+
RestoreAudioAfterSeek();
|
|
117
122
|
HasEnded = true;
|
|
118
123
|
}
|
|
119
124
|
|
|
@@ -126,6 +131,7 @@ namespace Hyper.Internal
|
|
|
126
131
|
PlaybackSpeed = SanitizeSpeed(seekSpeed);
|
|
127
132
|
IsSeeking = true;
|
|
128
133
|
_seekPlaybackReady = false;
|
|
134
|
+
MuteAudioForSeek();
|
|
129
135
|
}
|
|
130
136
|
|
|
131
137
|
public static void ResetForSeekRestart()
|
|
@@ -143,9 +149,16 @@ namespace Hyper.Internal
|
|
|
143
149
|
_seekPlaybackReady = true;
|
|
144
150
|
}
|
|
145
151
|
|
|
152
|
+
internal static void EnsureAudioMutedDuringSeek()
|
|
153
|
+
{
|
|
154
|
+
if (_isSeekAudioMuted)
|
|
155
|
+
AudioListener.volume = 0f;
|
|
156
|
+
}
|
|
157
|
+
|
|
146
158
|
public static void ResetForWatchAgain()
|
|
147
159
|
{
|
|
148
160
|
if (!IsActive) return;
|
|
161
|
+
RestoreAudioAfterSeek();
|
|
149
162
|
Progress01 = 0f;
|
|
150
163
|
PlaybackSpeed = 1f;
|
|
151
164
|
UserPlaybackSpeed = 1f;
|
|
@@ -171,6 +184,7 @@ namespace Hyper.Internal
|
|
|
171
184
|
|
|
172
185
|
public static void Clear()
|
|
173
186
|
{
|
|
187
|
+
RestoreAudioAfterSeek();
|
|
174
188
|
IsActive = false;
|
|
175
189
|
PlayerName = string.Empty;
|
|
176
190
|
AvatarUrl = string.Empty;
|
|
@@ -195,6 +209,23 @@ namespace Hyper.Internal
|
|
|
195
209
|
return float.IsNaN(speed) || float.IsInfinity(speed) || speed <= 0f ? 1f : speed;
|
|
196
210
|
}
|
|
197
211
|
|
|
212
|
+
private static void MuteAudioForSeek()
|
|
213
|
+
{
|
|
214
|
+
if (_isSeekAudioMuted) return;
|
|
215
|
+
|
|
216
|
+
_volumeBeforeSeek = AudioListener.volume;
|
|
217
|
+
_isSeekAudioMuted = true;
|
|
218
|
+
AudioListener.volume = 0f;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
private static void RestoreAudioAfterSeek()
|
|
222
|
+
{
|
|
223
|
+
if (!_isSeekAudioMuted) return;
|
|
224
|
+
|
|
225
|
+
AudioListener.volume = _volumeBeforeSeek;
|
|
226
|
+
_isSeekAudioMuted = false;
|
|
227
|
+
}
|
|
228
|
+
|
|
198
229
|
private static void ReleaseAvatarTexture()
|
|
199
230
|
{
|
|
200
231
|
if (AvatarTexture != null)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "app.hypergames.hypersdk",
|
|
3
|
-
"version": "1.11.0-beta.
|
|
3
|
+
"version": "1.11.0-beta.8",
|
|
4
4
|
"displayName": "HyperSDK",
|
|
5
5
|
"description": "Official Unity SDK for Hyper: multiplayer battles, leaderboards, deterministic RNG, session management, tutorials, and WebGL optimizations for production-ready games.",
|
|
6
6
|
"unity": "6000.0",
|