NipaPlay-Reload Documentation

repository·main·Indexed 23 days ago

https://github.com/aimessoft/nipaplay-reload

A modern, cross-platform video player and media center optimized for anime, featuring integration with Bangumi and Danmaku platforms. The documentation covers the JS plugin system (manifests, UI actions, and danmaku filtering), the cpp_native C++20 to Dart FFI framework for high-performance modules, and build configurations for Windows, Linux, macOS, iOS, and Android.

Tokens
72.9K
Snippets
148
Records
373
Agent score
82%

What's inside NipaPlay-Reload

  1. Overview of NipaPlay-Reload

    main

    NipaPlay-Reload is a modern cross-platform video player designed for smooth, aesthetic, and feature-rich viewing experiences. It supports local video playback, danmaku (bullet chat) display, multi-format subtitles, and multi-track audio/video. It also provides seamless integration with Emby and Jellyfin media servers.

    Key Capabilities:

    • Local video playback
    • Danmaku and subtitle support
    • Multi-track audio/video management
    • Emby and Jellyfin media server integration
    • Cross-platform support: Windows, macOS, Linux, Android, and iOS
  2. Overview of media_kit for Flutter & Dart

    main

    The media_kit package is a high-performance library for Flutter and Dart designed for video and audio playback. It is built to be modular, allowing developers to reduce bundle size by including only necessary components.

    Key characteristics include:

    • High Performance: Supports 4K/8K at 60 FPS and handles multiple FHD videos using GPU-powered hardware acceleration.
    • Cross-Platform: Works on Android, iOS, macOS, Windows, GNU/Linux, and Web.
    • Predictable Behavior: Over 80% of the implementation is written in Dart using FFI, ensuring consistent behavior across different platforms.
    • Modular Architecture: The core logic is shared via Dart, while platform-specific video embedding is handled by separate packages.
  3. Overview of NipaPlay-Reload features

    main

    NipaPlay-Reload is a modern cross-platform media center designed for anime enthusiasts. Key features include:

    • Multi-Platform Support: Consistent experience across Windows, macOS, Linux, Android, and iOS.
    • Advanced Danmaku System: Automatic matching of online danmaku (bullet comments), support for 弹弹play, and local mounting (xml/json).
    • Media Library Integration: Support for Emby, Jellyfin, SMB, and WebDAV.
    • Anime Management: Syncs viewing progress with Bangumi, provides new anime schedules, and allows rating/commenting.
    • High-Performance Playback: Uses multiple kernels including the custom Erika (Rust/Metal), FVP (libmdk), Media Kit, and libmpv.
    • Visual Enhancements: Supports Anime4K super-resolution and CRT shaders.
    • Extensibility: Features a JavaScript plugin system for custom functionality.
  4. Overview of the GPU-Accelerated Danmaku Engine

    main

    The Danmaku Engine is a high-performance bullet-chat (danmaku) system built on the Flutter GPU API. It is designed to support rich visual effects and native-level collision detection with the following technical targets:

    • Capacity: 2000+ simultaneous danmaku.
    • Performance: Stable 60 FPS rendering.
    • Latency: GPU parallel collision detection latency < 1ms.
    • Customization: Support for custom shaders.
    • Memory: Memory footprint < 100MB.
  5. Overview of Adaptive Platform UI

    main
    Adaptive Platform UI is a Flutter package designed to provide platform-specific widgets that automatically adapt to the host operating system. It features modern iOS 26+ native designs (including Liquid Glass blur effects and native gesture handling), traditional Cupertino widgets for older iOS versions (iOS 18 and below), and full Material 3 support for Android. The package handles automatic platform detection and version-aware rendering without requiring manual configuration.
  6. Other ways to contribute to NipaPlay-Reload

    main

    Beyond code, distribution, and art, you can support the project through:

    • Testing and Feedback: Actively test development versions and submit detailed bug reports or improvement suggestions.
    • Documentation Improvement: Help improve the CONTRIBUTING_GUIDE or the application's help documentation to make it clearer.
    • Community Management: Help answer questions from new users in community channels such as Discord or Telegram.
  7. Advantages of NipaPlay Containerized Deployment

    main

    Deploying NipaPlay via Docker provides several key benefits:

    Deployment Advantages

    • Build Once, Run Anywhere: Docker ensures environment consistency.
    • Low Resource Usage: Extremely minimal memory footprint when running in headless mode.
    • 24/7 Operation: Optimized for long-term stability in server environments.

    Management Advantages

    • Remote Management: Manage all features via a Web interface.
    • Automatic Updates: Supports container hot-updates.
    • Centralized Storage: Unified management of all media files.

    Scalability Advantages

    • Load Balancing: Deploy multiple instances to distribute the load.
    • Open API: Provides interfaces for integration with other applications.
    • Plugin System: Supports functional extensions.
  8. Navigate the NipaPlay interface

    main

    The NipaPlay interface is organized into several key functional areas accessible via the top navigation bar:

    • Top Navigation: Provides access to the Home, Video Playback, Media Library, Settings, and New Anime Updates sections.
    • Home: Displays recommended new anime, recent watch history, and personalized content.
    • Media Library: Used for managing local media files and connecting to remote media servers.
  9. Overview of the OAuth 2.0 Authorization Code Flow

    main

    The 弹弹play Open Platform uses the OAuth 2.0 Authorization Code Flow (with PKCE support) to authorize applications. The process follows these steps:

    1. Redirect User to Login: Direct the user to GET /api/v2/oauth/login.
    2. User Authentication: The user logs in and grants permission.
    3. Receive Authorization Code: The server redirects back to your redirect_uri with a code parameter.
    4. Exchange Code for Token: Use the code to request an access token via POST /api/v2/oauth/token.
    5. Access Protected Resources: Use the access_token in the Authorization: Bearer header.
    6. Refresh Token: When the access token expires, use POST /api/v2/oauth/refresh to get a new one.
  10. Overview of RapidJSON APIs and features

    main

    RapidJSON provides several ways to interact with JSON data:

    • DOM API: Parses JSON into a tree structure (Document) for easy manipulation. Best for when you need to modify the JSON structure.
    • SAX API: A stream-based parser/generator. It is extremely fast and memory-efficient (the SAX parser is ~500 lines of code) because it doesn't build a full tree in memory. Best for high-performance parsing or serialization.
    • Schema API: Provides JSON Schema validation during parsing or generation.
    • JSON Pointer: Allows for easy access and modification of specific DOM elements using path strings.

    Key Characteristics:

    • Performance: Extremely fast, supporting SSE2/SSE4.2 acceleration.
    • Memory Efficient: Minimal overhead per JSON value (approx. 16 bytes on 32/64-bit machines).
    • Independent: No dependencies on BOOST or even the STL.
    • Unicode Support: Supports UTF-8, UTF-16, and UTF-32 with built-in detection and transcoding.