Netless

Netless

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

›FAQ

FAQ

  • Authentication information
  • Add storage driver
  • Prefetch
  • Playback speed
  • Debug center
  • Instructions
  • Network exception handling
  • Aliyun OSS config
  • How to use docs-transform
  • How to use the adaptation screen
  • Debug help
  • Whiteboard playback principle
  • Firewall
  • How to insert ppt, switch ppt
  • Log
  • Dosage
  • Large class

How to insert ppt, switch ppt

1. What is the scene

For the end customer, the scenario is the "whiteboard" and "whiteboard pagination" above. For developers, it is the following data structure.

    type WhiteScene = {
        name: string; // Scene name
        componentsCount: number; // The number of elements on the white board, the new empty scene is 0
        ppt?: PptDescription; // ppt resources
    };

    type PptDescription = {
        src: string; // Dynamic json, static url
        width: number; // Document width
        height: number; // Document height
    };

2. How to insert ppt into the scene

2.1 Core Methods of Scene Operations

  1. Equivalent to "Save As" of daily computer operation, which is to save the scene in the corresponding address

        room.putScenes(`/init`, scenes); // Insert ppt content
    
  2. It is equivalent to the “open folder” of daily computer operation, which is to access the corresponding scene at the specified address

        room.setScenePath(`/init/page2`); // The corresponding content is displayed: the second page under init
    

2.2 Processing method for temporary submission document conversion service

    import {Room, PptConverter} from "white-web-sdk";
    const pptConverter = whiteWebSdk.pptConverter(roomToken);
    res = await pptConverter.convert({
            url: pptURL, // Source file address
            kind: kind, // Transcoding type
            onProgressUpdated: progress => {
                console.log(progress) // Transcoding progress
            },
        });

    // The convert method is to enter a document address and return an array of scenes [Scene, Scene, Scene]
    room.putScenes(`/init`, res.scenes);
    room.setScenePath(`/init/page2`);

2.3 Processing method of data obtained from server

    // [url, url] or [json, json] interact after map processing
    const scenes: []Scene = [url, url].map()

    // The convert method is to enter a document address and return an array of scenes [Scene, Scene, Scene]
    room.putScenes(`/`, scenes);
    room.setScenePath(`/init/page2`);

3. How to switch ppt

// Previous
 room.pptPreviousStep ();
 // next step
 room.pptNextStep ();
 // switch to the specified path
 room.setScenePath (`/ init / page2`);
 // If this method is in a dynamic ppt, then this is the next animation. If in static ppt, then the next page
Last updated on 3/27/2020 by 伍双
← FirewallLog →
  • 1. What is the scene
  • 2. How to insert ppt into the scene
    • 2.1 Core Methods of Scene Operations
    • 2.2 Processing method for temporary submission document conversion service
    • 2.3 Processing method of data obtained from server
  • 3. How to switch ppt
Netless
Let's interactive.
Product
ConsoleHomepageDemoGithub
Company
Join usServicePrivacy
Contact
support@netless.linkCommunity
Copyright © 2020 Netless