How lipangit/jiaozivideoplayer works
1. Repository shape
- This is an Android multi-module project centered on a reusable video playback framework, with a separate demo app that exercises the framework in many scenarios.
2. Module boundary
- jiaozivideoplayer/ is the core library.
- app/ is the sample application and integration testbed.
- The demo app depends on the library and adds custom player variants, sample activities, layouts, and assets.
3. Core playback engine
- The library’s main runtime lives in cn.jzvd.
- Jzvd is the base player component and state machine.
- JzvdStd is the standard out-of-the-box UI/player implementation.
- JZTextureView, JZUtils, and JZDataSource support rendering, utility behavior, and source selection.
4. Media backend abstraction
- Playback is abstracted behind JZMediaInterface.
- JZMediaSystem is the built-in system-media backend.
- The app adds alternative implementations in app/src/main/java/cn/jzvd/demo/CustomMedia/, including JZMediaExo and JZMediaIjk, showing that the architecture supports swapping media engines without changing the player UI layer.
5. UI and control surface
- The library includes its own reusable playback chrome in res/layout and res/drawable.
- These resources cover seek bars, play/pause/replay controls, dialogs for brightness/volume/progress, clarity selection, loading/retry states, and skins.
- This indicates the UI is tightly coupled to the player state machine but still themeable through resources.
6. Player behavior and modes
- The framework supports multiple interaction modes: standard inline playback, fullscreen transitions, tiny-window playback, orientation handling, list/recycler embedding, auto-preload, and web content embedding.
- The sample classes make these modes explicit through names like ActivityTinyWindow, ActivityPreloading, ActivityListViewRecyclerView, and ActivityWebView.
7. Demo application as integration layer
- app/src/main/java/cn/jzvd/demo/ contains the app entry point (ActivityMain) and a matrix of sample screens.
- These activities are not core logic; they demonstrate how the library behaves in different containers and lifecycle scenarios.
8. Customization examples
- The CustomJzvd/ package demonstrates extension points for specialized player skins and behaviors, such as custom title/share button visibility, speed controls, MP3 playback UI, tiny-window variants, and post-completion behavior.
- This suggests the intended extension mechanism is subclassing the player component and supplying custom layouts/resources.
9. List and feed integration
- Several activities and adapters target list-based feeds: ActivityListView*, ActivityTinyWindowRecycleView*, AdapterListView, and AdapterRecyclerView.
- These samples indicate the library is designed to manage playback handoff and window state inside scrolling containers, a common challenge for video feeds.
10. Assets and embedded content
- The app ships a local sample video in app/src/main/assets/local_video.mp4 and an HTML asset jzvd.html.
- These assets support offline demo scenarios, including direct playback and webview embedding.
11. Platform and build characteristics
- This is a Gradle-based Android project, with the usual manifest, resources, ProGuard rules, wrapper, and a keystore for the demo app.
- The library includes localized string resources across multiple languages, reinforcing that the framework UI is intended for broad end-user use, not just internal testing.
12. Architectural summary
- The key flow is: demo activity or host view configures a Jzvd/JzvdStd instance, which binds a JZDataSource, delegates decoding/rendering to a JZMediaInterface implementation, and uses bundled UI resources to manage playback state.
- The main boundary is between the reusable playback library and the demo app’s customizations and scenario-specific integrations.
Main entry points: jiaozivideoplayer jiaozivideoplayer · app app · JzvdStd.java JzvdStd · Jzvd.java Jzvd
Components 17
Core library
Reusable playback framework and bundled UI resources.
- jiaozivideoplayer · Reusable video playback framework.
jiaozivideoplayer - Jzvd · Base playback component and lifecycle/state coordinator.
jiaozivideoplayer/src/main/java/cn/jzvd/Jzvd.java - JzvdStd · Default reusable player implementation built on Jzvd.
jiaozivideoplayer/src/main/java/cn/jzvd/JzvdStd.java - JZMediaInterface · Abstraction layer for decoding and playback engines.
jiaozivideoplayer/src/main/java/cn/jzvd/JZMediaInterface.java - JZMediaSystem · Built-in implementation of the media interface.
jiaozivideoplayer/src/main/java/cn/jzvd/JZMediaSystem.java - JZTextureView · Video rendering surface used by the player.
jiaozivideoplayer/src/main/java/cn/jzvd/JZTextureView.java - JZUtils · Shared helper logic for player behavior and environment handling.
jiaozivideoplayer/src/main/java/cn/jzvd/JZUtils.java - JZDataSource · Playback source selection and data holder.
jiaozivideoplayer/src/main/java/cn/jzvd/JZDataSource.java - Player resources · Bundled chrome, dialogs, controls, and state visuals for the player.
jiaozivideoplayer/src/main/res
Demo app
Sample screens, custom player variants, and media backends used to exercise the library.
- app · Integration testbed and showcase for the library.
app - ActivityMain · Main menu and launcher for the sample scenarios.
app/src/main/java/cn/jzvd/demo/ActivityMain.java - Scenario activities · Sample activities for fullscreen, tiny window, lists, web content, preloading, and orientation behaviors.
app/src/main/java/cn/jzvd/demo - CustomJzvd · Subclassed player variants that demonstrate customization points.
app/src/main/java/cn/jzvd/demo/CustomJzvd - CustomMedia · Alternative playback implementations that swap behind the player UI.
app/src/main/java/cn/jzvd/demo/CustomMedia - List adapters · RecyclerView and ListView adapters used to manage playback in scrolling feeds.
app/src/main/java/cn/jzvd/demo - Demo resources · Demo layouts, selectors, sample HTML, and local video content.
app/src/main/res - Sample assets · Local video and HTML used for offline playback and WebView scenarios.
app/src/main/assets
Connections 28
- jiaozivideoplayer → Jzvd: contains · Core playback runtime entry point.
- jiaozivideoplayer → JzvdStd: contains · Standard player implementation.
- jiaozivideoplayer → JZMediaInterface: defines · Backend abstraction for playback engines.
- jiaozivideoplayer → JZMediaSystem: provides · Default media backend.
- jiaozivideoplayer → JZTextureView: contains · Rendering surface support.
- jiaozivideoplayer → JZUtils: contains · Shared player helpers.
- jiaozivideoplayer → JZDataSource: contains · Playback source model.
- jiaozivideoplayer → Player resources: bundles · Reusable UI chrome and state resources.
- Jzvd → JZMediaInterface: delegates to · Player state machine forwards playback to backend implementations.
- Jzvd → JZDataSource: uses · Binds selected media source.
- Jzvd → JZTextureView: renders on · Hosts video output surface.
- JzvdStd → Jzvd: extends · Default UI builds on base player behavior.
- JzvdStd → Player resources: uses · Consumes bundled controls and dialogs.
- JZMediaSystem → JZMediaInterface: implements · System media engine implementation.
- app → ActivityMain: contains · Demo launcher.
- app → Scenario activities: contains · Scenario-driven sample screens.
- app → CustomJzvd: contains · Custom player subclasses.
- app → CustomMedia: contains · Alternative media engines.
- app → List adapters: contains · Feed/list integration helpers.
- app → Demo resources: contains · Sample layouts and UI assets.
- app → Sample assets: ships · Embedded sample media and HTML.
- ActivityMain → Scenario activities: launches · Entry screen routes to sample scenarios.
- Scenario activities → JzvdStd: configures · Screens instantiate and configure the standard player.
- CustomJzvd → JzvdStd: extends · Custom skins and behaviors build from the standard player.
- CustomMedia → JZMediaInterface: implements · Swappable playback engines.
- CustomMedia → JzvdStd: pairs with · Demonstrates backend swaps without changing the UI layer.
- List adapters → JzvdStd: hosts · Embeds players in list/feed containers.
- Scenario activities → Sample assets: uses · WebView and local-video demo content.