Polyv Help Center

Help Center

Introduction

Updated: 2024-10-21 09:33:43

1. Basic Description

  Polyv Live Streaming originates from the company's years of video technology accumulation. Based on professional cross-platform video codec technology and large-scale video content delivery networks, it provides stable, smooth, low-latency, and high-concurrency real-time audio and video services.

  Polyv Interactive Classroom Java SDK allows you to easily access Polyv Live Video Cloud services without complex programming, enabling cloud live streaming related video services.

  Polyv Interactive Classroom Java SDK is implemented based on the Polyv Interactive Classroom API, wrapping and optimizing it. It frees B-end users from common tasks. The API call logic and exception handling are encapsulated and optimized. B-end users only need to encapsulate the request parameters and hand them over to the Polyv Interactive Classroom Java SDK for processing. After processing, the SDK returns the result, and the B-end continues its business logic based on the returned data. Currently, the Polyv Interactive Classroom Java SDK covers most frequently used API operations, including channel management, viewing management, live interaction, chat room, and player.

  If you encounter any issues while using the Polyv Interactive Classroom Java SDK, directly contact Online Customer Service to ask after-sales technical support. Please submit the problem's runtime environment, operation steps, error feedback information, and contact details simultaneously to facilitate quick problem identification and resolution.

2. Overall SDK Design

image-20201023100552660
  1. The B-end administrator creates basic course session information through the SDK, such as course session name, start time, and other basic attributes;

  2. The B-end administrator configures basic settings for the course session through the SDK, such as viewing conditions, class duration, teacher, and number of co-hosts;

  3. The C-end instructor logs into the course session via a web page and starts teaching;

  4. The C-end student enters through the class link and starts listening;

  5. After the course ends, the B-end retrieves playback and statistical analysis data, completing the Interactive Classroom business loop;

image-20201023101248786

3. Detailed SDK Design

image-20201023105514125

4. SDK Business Logic Analysis

 * Prerequisite: SDK Global Initialization: Before calling the SDK, global parameters must be configured. Configurable parameters include account information (appId, userId, appSecret) and HTTP connection pool parameters (timeout, maxClientNum). For details, see Initialization

 * SDK Global Parameter Injection: The SDK injects the globally configured parameters into the request object;

 * Signature Generation: The SDK uses the MD5 algorithm signature rule to generate the signature;

 * Parameter Validity Check: The SDK uses a custom parameter validation tool to check input parameters. If any parameter is invalid, a PloyvSdkException will be thrown. The exception's message includes specific field information that failed validation. This exception is a runtime exception and must be caught and handled in related business logic;

 * Send HTTP Request and Get Return Data: The SDK initializes an HTTP connection pool during initialization. All SDK requests are sent through this connection pool;

 * Parse Return Data: Parse the returned data. If the SDK call succeeds normally, the response object will be encapsulated and returned normally. If the server returns an error message, the SDK will throw a PloyvSdkException. The exception's message includes specific server execution error information. This exception is a runtime exception and must be caught and handled in related business logic;

5. Call Flow Template

  The above business flow diagram is translated into code as follows. All calls to the Polyv Interactive Classroom Java SDK can refer to the following call template (Global initialization only needs to be called once globally).

Call Flow Template

联系客服,在线咨询