Netless

Netless

  • JavaScript
  • Android
  • iOS
  • Server
  • FAQ
  • GitHub
  • 🇨🇳 中文

›Features

Overview

  • Introduction
  • Open source
  • Version history

Quick start

  • Overview
  • Client integration
  • Init SDK
  • Create Room
  • Join room
  • Callback and lifecycle

Features

  • Docs-conversion & replay
  • State management
  • Tools
  • Perspective operation
  • Whiteboard operation
  • Custom event
  • Scene management
  • Big class read-only
  • Replay

Upgrade

  • 2.0 v2migration

Docs-conversion & replay

Before reading this article, please read the server-side documentation: Document to Image, Document to Web Make sure that the corresponding service has been activated at console.

The SDK encapsulates the interaction of the SDK server into a WhiteConverter class, and developers do not need to care about the interaction with the SDK server on the client.

Show converted documents

For a pptx document, each page will correspond to a scene on the whiteboard.

A 24 page pptx file will create 24 scenes on a whiteboard. For scene concepts, see Scene Management.

WhiteConverter *converter = [[WhiteConverter alloc] initWithRoomToken:self.roomToken];
[converter startConvertTask:@"url" type:ConvertTypeDynamic progress:^(CGFloat progress, WhiteConversionInfo * _Nullable info) {
    NSLog(@"progress:%f", progress);
} completionHandler:^(BOOL success, ConvertedFiles * _Nullable ppt, WhiteConversionInfo * _Nullable info, NSError * _Nullable error) {
    NSLog(@"success:%d ppt: %@ error:%@", success, [ppt yy_modelDescription], error);
    if (ppt) {
        [self.room putScenes:@"/dynamic" scenes:ppt.scenes index:0];
        [self.room setScenePath:@"/dynamic/1"];
    }
}];

Dynamic PPT playback

You can play the dynamic PPT by calling the following method. After all the animations of the PPT on the current page are completed, when you call this method again, you will automatically enter the next page scene.

[room pptNextStep]; // Next page(Next step)
[room pptPreviousStep]; // Previous page(Previous step)

Custom font

If your pptx contains fonts that are not in our default font list, you can support it by configuring a custom font list. First, you need to upload the font file to your own server or object storage platform. Then, the URL of the font file is configured with the following code when the SDK is initialized.

WhiteSdkConfiguration *config = [WhiteSdkConfiguration defaultConfig];
config = @{@"Calibri": @"https://your-cdn.com/Calibri.ttf", 
            @"Songti": @"https://your-cdn.com/Songti.ttf",
            @"Kaiti": @"https://your-cdn.com/Kaiti.ttf"};
//When initializing the SDK, bring in config
Last updated on 8/25/2020 by az
← Callback and lifecycleState management →
  • Show converted documents
  • Dynamic PPT playback
  • Custom font
Netless
Let's interactive.
Product
ConsoleHomepageDemoGithub
Company
Join usServicePrivacy
Contact
support@netless.linkCommunity
Copyright © 2020 Netless