You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which API doesn't behave as documented, and how does it misbehave?
The playUrl method in just_audio_windows behaves inconsistently when handling URLs containing apostrophes. Some text strings with apostrophes work correctly while others fail, despite having similar structures.
Minimal reproduction project
Here's a minimal code example that demonstrates the issue:
Function build audio url
Uri audioUri(
String content, {
String style = 'default',
Speed speed = Speed.normal,
String? voice,
}) {
final parameters = {
'text': content,
'style': style,
'speed': speed.id,
'voice': voice,
};
final baseUrl = '${AppEnv().backendUrl}/speech';
final uri = Uri.parse(baseUrl).replace(
queryParameters: parameters..removeWhere((key, value) => value == null),
);
return uri;
}
DevTools version 2.37.2
✅ Windows Version (Installed version of Windows is version 10 or higher)
✅ Visual Studio - develop Windows apps (Visual Studio Community 2022 17.7.4)
Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
Visual Studio Community 2022 version 17.7.34031.279
Windows 10 SDK version 10.0.22621.0
Desktop Information:
OS: Windows 10 Version 22631.4602
Package Version:
just_audio: ^0.9.42
just_audio_windows: ^0.2.2
Additional context
The issue is Windows-specific
Generated URLs work correctly on all other platforms
No error messages or exceptions are thrown
The difference in behavior appears to be related to URL handling/encoding on Windows
The text was updated successfully, but these errors were encountered:
Which API doesn't behave as documented, and how does it misbehave?
The
playUrl
method in just_audio_windows behaves inconsistently when handling URLs containing apostrophes. Some text strings with apostrophes work correctly while others fail, despite having similar structures.Minimal reproduction project
Here's a minimal code example that demonstrates the issue:
Function build audio url
Usage in player service
Test Cases
Case 1: Not working ❌
final text = "I’d like a coffee, please.";
Url: https://api-dev.ahaspeak.app/speech?text=I%E2%80%99d%20like%20a%20coffee,%20please.&style=default&speed=normal&voice=en-US-AriaNeural
Case 2: Working normally ✅
final text = "I'd like an iced coffee, please.";
Url: https://api-dev.ahaspeak.app/speech?text=I'd%20like%20an%20iced%20coffee,%20please.&style=default&speed=normal&voice=en-US-AriaNeural
To Reproduce
Expected behavior
Current behavior
Platform-specific behavior
Flutter SDK version
Flutter (Channel stable, 3.24.2, on Microsoft Windows [Version 10.0.22631.4602], locale vi-VN)
✅ Windows Version (Installed version of Windows is version 10 or higher)
✅ Visual Studio - develop Windows apps (Visual Studio Community 2022 17.7.4)
Desktop Information:
just_audio: ^0.9.42
just_audio_windows: ^0.2.2
Additional context
The text was updated successfully, but these errors were encountered: