Integrate the AI Education Solution on Android
This topic describes how to integrate the AI Education Solution on Android. It covers the core capabilities, prerequisites, integration steps, architecture, App Server API, and data model.
Scenario overview
The AI Education scenario uses the player as a unified entry point. ApsaraVideo VOD provides the video content and service support, and the scenario integrates AI content understanding to generate summaries, chapters, and key points automatically. These capabilities let viewers grasp the content structure, locate key clips, and review content on demand.
The solution applies to online courses, professional training, enterprise learning, paid knowledge, and academic lectures. It improves learning efficiency and the viewing experience, makes better use of your existing video content, and reduces the cost of integrating the player and AI features.

Core capabilities
The AI Education scenario provides the following capabilities for quick understanding, precise positioning, and efficient review:
Capability | Description |
Smart chapters | Identifies the content structure of a video and generates chapters automatically. Chapters are displayed on the progress bar and in the chapter list. Click a chapter to jump to the corresponding clip. |
Content summary | Provides an overall video summary and per-chapter summaries to help viewers understand the main content and the key points of each chapter. |
Key point extraction | Extracts the key points of each chapter automatically and displays them in a structured format for learning and review. |
Chapter thumbnails | Displays a representative frame for each chapter to help viewers identify and locate the target content. |
Portrait and landscape adaptation | Adjusts the interaction layout based on the screen orientation: the bottom panel in portrait mode and the right-side panel in landscape mode. |
Prerequisites
Before you begin, make sure the following requirements are met:
Preparation | Requirement |
Alibaba Cloud services | You have activated the ApsaraVideo VOD console and Intelligent Media Services console. |
Media assets | You have prepared a test video and completed AI content analysis for it. |
App Server | You have deployed the App Server to provide playback credentials and AI analysis data. You can refer to the open source project |
SDK version | ApsaraVideo Player SDK 7.16.0 or later is required. Earlier versions do not support |
After you complete these preparations, configure the App Server address and the test video ID in the AiContentConstants class to start experiencing the AI Education scenario.
Quick start
Common integration
The AI Education scenario is built on the PlayerKit scene layer. If you have not completed the common integration steps, first see:
Integration Preparation: Scene layer integration (copy the
playerkitandscene-ai-educationmodules, and complete project registration and dependency adjustments).Quick start: Scene layer access (launch the scenario page).
Configure the App Server and test video
After you complete the common integration, configure the App Server address and test video ID.
Open AiContentConstants.java and modify the following configuration:
You can use the official App Server address for a quick trial. For production, deploy your own service first and use its address. For deployment instructions, see the VodAppServer open source project listed in the prerequisites.
public static final String APP_SERVER_BASE_URL = "http://your-server-host:port";
public static final String DEFAULT_MEDIA_ID = "your-media-id";Verify the integration
The AI Education scenario uses the following entry points:
Item | Value |
Activity |
|
Schema |
|
After the page starts, the video loads automatically and the player displays the chapter entry button. Click the button to view the chapter list and the AI analysis content. If the chapter button appears and the AI content is displayed, the integration is successful.
If verification fails, check the following:
The App Server address in
AiContentConstantsis correct and reachable.The video ID is valid and AI analysis has been completed for the video.
The network connection is available.
For more troubleshooting information, see Integration FAQ.
Architecture overview
The AI Education scenario consists of the client, the App Server, the ICE/AI analysis workflow, and the ApsaraVideo VOD service.
The overall pipeline is divided into two stages:
Production stage: The App Server triggers the AI analysis workflow. ICE retrieves the media asset and performs chapter extraction, summary generation, and key point analysis, and then writes the structured results back to ApsaraVideo VOD.
Consumption stage: The client obtains the playback credential and the AI analysis results through the App Server, and
PlayerKithandles video playback, chapter jumping, and AI content display.
End-to-end business process
The end-to-end business process describes the complete pipeline of AI analysis results, from production and storage to client consumption.
In this process, ApsaraVideo VOD provides unified storage for media assets and AI analysis results, the ICE/AI analysis workflow performs content understanding and structured analysis, and the App Server encapsulates the server-side capabilities and provides a unified API to the client.
Client interaction flow
The client interaction flow describes the call relationships among the client, PlayerKit, and the App Server after a user enters the AI Education playback page.
During page initialization, the client obtains the playback credential and the AI analysis results in parallel or in sequence. After the data is loaded, you can view chapters, summaries, and key points in the chapter content panel and jump to the corresponding position in the video.
If the AI analysis API request fails or returns an empty result, the client can still use the playback credential for normal video playback, but it does not display the chapter and AI analysis panels.
Client layered architecture
The client uses a layered design that consists of the scenario layer, the PlayerKit capability layer, and the Player SDK.
The scenario layer handles page orchestration, data loading, and AI content display. PlayerKit uses the slot mechanism to provide the player control bar entry and panel extension capabilities. The underlying Player SDK handles media asset playback, progress control, and playback state callbacks.

App Server API
Get a playback credential
Item | Value |
Method | GET |
Path |
|
Parameter |
|
Sample request:
GET http://your-server-host:port/appServer/GetVideoPlayAuth?videoId=201558617a9e71f1bfb9e6e7e5780102Sample response:
{
"code": 0,
"success": true,
"data": {
"videoId": "your-video-id",
"playAuth": "eyJ..."
}
}Response fields:
Field | Type | Description |
|
| The business status code. A value of 0 indicates success. |
|
| Indicates whether the request is successful. |
|
| The video ID. |
|
| The Base64-encoded playback credential. |
Get AI analysis content
Item | Value |
Method | GET |
Path |
|
Required parameter |
|
Optional parameter |
|
Sample request:
GET http://your-server-host:port/GetMediaAiAnalysisByResultType?MediaId=201558617a9e71f1bfb9e6e7e5780102Sample response:
{
"AiAnalysisResult": [
{
"ResultType": "Chapter",
"Title": "Video chapters",
"chapterContentItems": [
{
"ChapterId": 1,
"StartTime": 0,
"EndTime": 120000,
"ChapterTitle": "Course introduction",
"Summary": "This chapter introduces the overall framework of the course...",
"ThumbnailUrl": "https://example.com/thumb1.jpg",
"KnowledgePoints": [
{ "PointId": 1, "Point": "Core concept", "Description": "Description..." }
]
}
]
},
{
"ResultType": "Summary",
"Title": "Video summary",
"summaryContent": {
"ParagraphSummary": "This video mainly covers...",
"MindMapSummary": [
{ "Title": "Core concept", "Topics": [...] }
],
"MarkdownContent": "# Course summary\n\n..."
}
}
]
}To connect your own server, return the same JSON structure. The client does not depend on how the server is implemented.
Chapter fields:
Field | Type | Description |
|
| The chapter ID. |
|
| The start time of the chapter, in milliseconds. |
|
| The end time of the chapter, in milliseconds. |
|
| The chapter title. |
|
| The text summary of the chapter. |
|
| The URL of the chapter thumbnail. |
|
| The key point ID. |
|
| The name of the key point. |
|
| The description of the key point. |
Summary fields:
Field | Type | Description |
|
| The paragraph summary text. |
|
| The mind map summary list. This is a recursive structure in which each item contains |
|
| The content in Markdown format. |
API conventions:
Item | Description |
HTTP timeout | 5 seconds (connect + read). |
Error handling | If the API fails, the client falls back to normal playback mode without the AI panel. |
Time unit |
|
Data model and mapping
Data mapping
Server JSON field | Client | Business model | Description |
|
|
| Converted to |
|
|
| In milliseconds. |
|
|
| In milliseconds. |
|
|
| |
|
|
| |
|
|
| Generated through a three-level fallback. |
|
|
| Concatenated into Markdown. This field takes precedence over |
|
|
| The global video summary. |
|
|
| Extracts the list of top-level |
|
|
| The content in Markdown format. |
Presentation model
The data is assembled into AiContentViewModel, which is generated at once by AiContentAssembler.buildViewModel(AiAnalysisResponse) and is the single data entry for the panel:
Field or method | Type | Description |
|
| The chapter list. An empty list indicates that no chapter data is available. |
|
| The list of key point items. |
|
| The video summary information. This value can be null. |
|
| Indicates whether chapter data is included. |
|
| Indicates whether summary data is included. |
@AiContentType is not a field of the aggregate model. It is a tab-level rendering style enum (CHAPTERS_ONLY/TEXT_ANALYSIS/GRAPHIC_ANALYSIS) that is derived from the internal mTab0Type/mTab1Type values of ChapterContentDialogFragment.
Client data architecture
The client uses a layered design that separates data assembly from UI rendering. The server response lands as a plain DTO, which the assembler converts into a presentation model before the UI layer consumes it.
Data flow:
Server JSON -> AiAnalysisResponse (DTO) -> AiContentAssembler -> AiContentViewModel -> ChapterContentDialogFragment (UI)Client models:
Class | Responsibility |
| A pure static, stateless assembler that converts DTOs into presentation models. Public methods: |
| The presentation-layer |
| Key point information. Fields: |
| Video summary information. Fields: |
Design principles:
Single responsibility: The
DTOhandles only JSON mapping, the assembler handles only data conversion, and the UI handles only rendering.Lazy construction: The
ViewModelis built only when the panel is displayed and is released when the panel is hidden to avoid wasting memory.Stateless assembly: The assembler uses pure static methods without instance state, so you can call it any number of times.
Three-level fallback: The generation rule for
KnowledgeInfo.contentMarkdownisKnowledgePointsfirst, thenSummary, and null if both are empty.Tab combination rules:
Data condition | Tab structure | tab0 type | tab1 type |
Chapters only (no summary) | Two tabs |
|
|
Summary only (no chapters) | No tabs |
| -- |
Both | Two tabs |
|
|
Customization and extension
The customization path depends on your integration requirements:
Replace the data source: Choose this path if you want to keep the built-in UI and activity but load data from your own backend.
Customize the UI: Choose this path if you want to change the appearance of the AI content panels while keeping the built-in activity.
Integrate into an existing activity: Choose this path if you have an existing activity and want to embed the AI Education capabilities into it.
Replace the data source
The built-in AiEducationActivity loads data through AiContentLoader. To use your own data source, refer to the implementation of the activity and replace the data loading logic:
// Custom loading example
AiContentLoader loader = new AiContentLoader();
loader.loadPlayAuth(vid, playAuth -> {
// After you get playAuth, continue to load the AI content...
});
loader.loadAiAnalysis(vid, response -> {
// After you get the AiAnalysisResponse (a plain DTO), the consumer must explicitly call AiContentAssembler to assemble it...
});The chapter data is assembled from the DTO by AiContentAssembler.buildChapters() and passed to AliPlayerModel, and is delivered only when it is not empty. AI content such as the video summary and chapter segments cannot be carried by AliPlayerModel, so the scenario layer must pass it in by calling ChapterContentPanelSlot.updateAiContent().
Customize the UI
Replace the style of the chapter content panel: inherit
ChapterContentDialogFragmentand override the layout.Extend slots: register a custom slot through
CustomSlotType.For more information, see Slot System.
Integrate into an existing activity
If you do not want to use the built-in AiEducationActivity, refer to its implementation and do the following in your own activity:
Initialize
AliPlayerController.Register
ChapterButtonSlotandChapterContentPanelSlot, and save the instance references during registration.Load the
playAuthvalue and the AI content.Configure and attach the player. After the player is attached, pass the AI content to the panel slot.
Example:
After the integration is complete, verify that the chapter button appears in the player when AI content is available, and that clicking the button opens the chapter content panel with chapters, summaries, and key points.
Integration FAQ
Question | Solution |
The playback credential fails to be obtained | Check whether the App Server address is correct, the network is connected, and the |
The AI content is empty | Confirm that AI analysis is enabled for the video. The client falls back to normal playback mode without the AI panel. |
How do I use my own video ID | Modify |
The panel behaves abnormally when switching between portrait and landscape | Confirm that the activity declares |
How do I disable a specific AI capability | Do not return the corresponding |
SDK version compatibility | ApsaraVideo Player SDK 7.16.0 or later is required. Earlier versions do not support |