-
Notifications
You must be signed in to change notification settings - Fork 2
Add platform-specific user agents for iOS/Android streams #102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
Co-authored-by: jsit <[email protected]>
Co-authored-by: jsit <[email protected]>
|
@copilot Fix this merge conflict please. |
|
@copilot The tests need to be updated to either mock the package version number or use the real value. |
jsit
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests need to be updated to either mock the package version number or use the real value.
|
@copilot The tests need to be updated to either mock the package version number or use the real value. |
|
@copilot The tests need to be updated to either mock the package version number or use the real value. |
|
@copilot Please update the tests to either mock the package version number or use the real value. |
|
@copilot The tests are now failing. The test file should either mock the version number or use the real version number. |
|
@copilot Please update the tests to either mock the package version number or use the real value. |
|
@copilot Try again |
Adding distinct user agents for iOS/Android streams in Track objects
Plan
Implementation Summary
Successfully implemented platform-specific user agents for iOS and Android streams as requested in the issue.
New Files
src/utils/UserAgent.ts- Utility function that generates platform-specific user agent strings using React Native's Platform API and derives version from package.json__tests__/UserAgent.test.ts- Comprehensive tests for the user agent utility (4 test cases)Modified Files
src/services/ArchiveService.ts- Added userAgent to archive and live stream tracks (2 locations)src/services/AudioPreviewService.ts- Added userAgent to preview tracks (1 location)src/app/Home/index.tsx- Added userAgent to initial and restored live stream tracks (2 locations)tsconfig.json- AddedresolveJsonModuleandesModuleInteropto enable importing package.jsonUser Agent Formats
WMBRApp/{version} (iOS; iPhone)WMBRApp/{version} (Android; SDK {version})The version is now automatically derived from
package.jsoninstead of being hard-coded.Verification
✅ All tests pass (29 passing tests including 4 new UserAgent tests)
✅ Linting clean (ESLint)
✅ Security check clean (CodeQL - 0 alerts)
Security Summary
No security vulnerabilities were found by CodeQL analysis. The implementation uses React Native's built-in Platform API safely and only exposes basic platform information in the user agent string, which is standard practice for HTTP requests.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.