# Aoshi Media Player - Technical & Capability Analysis
This document contains a comprehensive analysis of the **Aoshi Media Player** codebase to provide all the factual details required to compile user agreements, policies, and licenses.
---
## 1. Privacy Policy Information
*Information about what data is collected, stored, requested, or accessed by the application, including local databases and permissions.*
### A. Device Storage & File Scanning (Local-First)
- **Local Scanning**: The application scans user-selected directories on the device to discover media files. By default on Android, it initiates scanning in standard directories:
- `/storage/emulated/0/Music`
- `/storage/emulated/0/Movies`
- `/storage/emulated/0/Download`
- `/storage/emulated/0/DCIM`
- `/storage/emulated/0/Recordings`
- **Supported File Types**:
- **Audio**: `mp3`, `m4a`, `wav`, `ogg`, `flac`, `aac`
- **Video**: `mp4`, `mkv`, `mov`, `avi`, `webm`
- **Exclusion/Inclusion Control**: Users can add, toggle, or permanently remove specific folders in the media library via the "Manage Directories" settings.
### B. Device Permissions Requested
The application requests specific system permissions to access files and hardware details depending on the operating system version:
1. **Android 13+ (API 33+)**:
- `READ_MEDIA_AUDIO` (to scan and play audio files)
- `READ_MEDIA_VIDEO` (to scan and play video files)
2. **Android 10 to 12 (API 29–32)**:
- `READ_EXTERNAL_STORAGE` (to read files)
- `WRITE_EXTERNAL_STORAGE` (to write and edit file metadata)
3. **Android 11+ (API 30+)**:
- `MANAGE_EXTERNAL_STORAGE` (All Files Access) - Requested optional permission when renaming, updating tags, or deleting files in storage.
4. **General**:
- `INTERNET` and `ACCESS_NETWORK_STATE` (to check connectivity, load ads, and search for lyrics)
### C. Local Database & Cache (No Cloud Uploads)
All app databases and caching configurations reside solely on the user's device:
- **Hive Database**: Local key-value database used to store:
- Relational indexes of songs, videos, and folders.
- Playlist configurations and favorite markings.
- Application settings (theme, border style, resume playback preference, auto-save settings).
- Playback metrics: tracks cumulative time played (media seconds) and track count for ad triggers.
- Cached lyrics (loaded from LRCLIB).
- **Application Cache Directory**:
- `/media_cache`: Caches album cover art extracted from audio file tags (indexed by MD5 file path hash).
- `/video_thumbnails`: Caches thumbnail images generated from local video files.
### D. Third-Party Integrations & Data Transfer
When connected to the internet, the app interacts with two main third-party services:
1. **Google Mobile Ads (AdMob SDK)**:
- Displays Banner Ads and Interstitial Ads.
- *Data collected by Google*: Google may collect device identifiers (advertising IDs like Google Ad ID), IP address, network carrier, general geographic location (coarse IP-based), and ad interaction telemetry.
2. **LRCLIB API (`lrclib.net`)**:
- Fetches synchronized and plain text lyrics.
- *Data transmitted*: The application transmits the metadata of the currently playing track (specifically `artist_name` and `track_name`) via HTTPS to `https://lrclib.net/api/search`.
- *LRCLIB Data Processing*: As with standard web requests, lrclib.net will receive the request metadata (e.g., public IP address, user agent, requested URL parameters).
---
## 2. Terms of Service / Terms of Use
*Terms governing user conduct, system features, and software conditions.*
### A. Intellectual Property of User Media
- **Self-Provided Content**: Aoshi Media Player is a player tool only. It does not provide music, videos, or licensing. Users represent that they possess the proper rights or licenses for all local media files played through the software.
- **Physical File Manipulation Liability**: The application permits users to rename, delete, or physically alter audio tags (Metadata write operations). The application developer is not liable for data loss, metadata corruption, or accidental deletions occurring through the use of these features.
### B. Advertising & Ad-Blocking
- **Ad-Supported Access**: The free version of the application is monetized through advertising.
- **Dynamic Ad Trigger System**: The app runs a persistent "ad threshold backlog" counter.
- Interstitial ads are shown after cumulative playback reaches 2 hours (7200s) or 20 tracks are played.
- If a user clicks an ad (banner or interstitial), they are granted a 24-hour ad-free window where all ads are suppressed entirely.
- **Restrictions**: Users are prohibited from using software modifications, ad-blockers, or other methods to bypass, mute, or remove advertisement widgets. Intercepting or altering ad telemetry is a breach of the Terms.
- **Remove Ads IAP**: A paid in-app purchase allows users to permanently remove all advertisements.
### C. Lyrics Downloading & Export
- **Exporting LRC Files**: The app enables downloading lyrics and exporting them to plain and synced `.lrc` text files on local storage.
- **Use limitation**: This feature is provided strictly for personal, non-commercial use. Users must not mass-harvest or scrape lyrics using the application interface.
---
## 3. Copyright / DMCA Disclaimer
*Disclaimer regarding copyright ownership and takedowns.*
### A. Media Ownership and Hosting
- **Zero Content Hosting**: Aoshi Media Player does not host, upload, aggregate, or stream copyrighted audio/video tracks. All media playback runs locally from files stored on the user's device.
- **No Control Over User Storage**: The developers have no technical ability to access, delete, or block media stored on individual user devices.
### B. Lyrics Third-Party Database Disclaimer
- **LRCLIB Integration**: Lyrics are sourced automatically from the public open database `lrclib.net`.
- **No Association**: The developers of Aoshi Media Player do not host, check, edit, or control lrclib.net, its contents, or its copyright compliance.
- **Third-Party Rights**: All lyric properties are the exclusive copyrights of their respective songwriters, authors, and publishing administrators. If copyright owners wish to remove lyrics from search results, they must contact the database operators at lrclib.net directly.
### C. DMCA Contact
- Since the app is a local software tool, copyright issues related to personal files or the external database should be directed elsewhere. However, for copyright concerns regarding the application's source code, graphics, or assets, copyright holders can submit notices to the developer (insert contact email).
---
## 4. Open Source Licenses
*The third-party packages, libraries, and resources utilized in this Flutter project, categorized by license type.*
### A. Flutter Framework
- **Flutter SDK**: BSD 3-Clause License
### B. MIT License Packages
- `cupertino_icons`
- `riverpod` / `flutter_riverpod` / `riverpod_annotation` / `riverpod_generator` / `riverpod_lint`
- `flutter_animate`
- `cached_network_image`
- `audio_video_progress_bar`
- `audiotags`
- `flutter_video_info`
- `fc_native_video_thumbnail`
- `just_audio` / `just_audio_background` *(partially LGPL, see notes)*
- `file_picker`
- `audio_service`
- `audio_session`
- `freezed` / `freezed_annotation`
### C. BSD 3-Clause License Packages
- `go_router`
- `path_provider`
- `path`
- `device_info_plus`
- `video_player`
- `http`
- `connectivity_plus`
- `crypto`
- `flutter_lints`
### D. Apache 2.0 License Packages
- `hive` / `hive_flutter` / `hive_generator`
- `google_fonts` *(Contains fonts licensed under SIL Open Font License & Apache 2.0)*
- `google_mobile_ads`
- `dynamic_color`