Package tokbox.com.opentok.api

Examples of tokbox.com.opentok.api.OpenTokSDK


import tokbox.com.opentok.api.constants.RoleConstants;
import tokbox.com.opentok.exception.OpenTokException;

class Test {
  public static void main(final String argv[]) throws OpenTokException {
    final OpenTokSDK sdk = new OpenTokSDK(API_Config.API_KEY,API_Config.API_SECRET);

    //Generate a token
    final String s = sdk.generate_token("session");
    System.out.println(s);

    System.out.println(sdk.generate_token("session",RoleConstants.PUBLISHER));
    System.out.println(sdk.generate_token("session",RoleConstants.SUBSCRIBER));
    System.out.println(sdk.generate_token("session",RoleConstants.MODERATOR));



    //Generate a basic session
    System.out.println(sdk.create_session().session_id);

    System.out.println();

    //Generate Session Properties for a session
    final SessionProperties sp = new SessionProperties();
    sp.echoSuppression_enabled = true;

    //Generate a session with a location hint and session properties
    System.out.println(sdk.create_session("127.0.0.1", sp).session_id);
  }
View Full Code Here

TOP

Related Classes of tokbox.com.opentok.api.OpenTokSDK

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.