ziggeo 0.0.1

  • Readme
  • Changelog
  • Example
  • Installing
  • 46

Ziggeo's Flutter SDK #

Index #

  1. Why Ziggeo's Flutter SDK?
  2. Codes
    1. Init
    2. Recorder
    3. Player
    4. Events / Callbacks
    5. API
    6. Examples
  3. Update Information
  4. Changelog

Why Ziggeo's Flutter SDK? #

Ziggeo is powerfull whitelabel video SAAS that helps people be part and lead the video revolution. It has award winning multimedia API and its CEO and CTO can often be seen talking in various events around the world.

Ziggeo's Flutter SDK is utilizing the API to bring you a native library you can add to your project. Just add to project and allow your application evolve into something much more, something video!

It offers you pre-built functionality to call and manipulate. This library also offers you direct access to the Ziggeo API as well if you want to do more things yourself.

Who it is for? #

Do you have a complex Flutter app that is missing that one key ingredient - the video?

Do you need a video library that can be seamlesly integrated into your existing app?

Want something that is simple and easy to use?

You need some powerful features high end video apps provide?

Want to provide a great video experience for your own customers?

If any of the above is "Yes" then you are in the right place as this SDK is for you!

Codes #

This section will introduce you to the most common ways you would integrate our video library into your app.

Init #

final String appToken = "YOUR_APP_TOKEN_HERE";
Ziggeo ziggeo = new Ziggeo(appToken);

Recorder #

The fullscreen recorder is useful when you want your recorder to take entire screen.

The embedded recorder is useful when you want your recorder to be part of your app. For example if you had an avatar in your app and you want it to be a quick video.

Create fullscreen Video Recorder

ziggeo.startCameraRecorder();
  • See examples section to see how to configure the recorder with more specific options, instead of using defaults

Player #

Player can be used to play local videos, videos from other services and of course videos from Ziggeo servers.

Create fullscreen Video Player

URI playback

ziggeo.startPlayerFromPath(List<String> videoPaths);

Playback from Ziggeo servers

ziggeo.startPlayerFromToken(List<String> videoTokens);

Events / Callbacks #

Callbacks allow you to know when something happens. They fire in case of some event happening, such as if error occurs. This way you can design your app to fine detail and be able to provide you customers with great experience.

We have separated the events that are available to you into several different categories.

Common #

Common callbacks happen for both player and recorder, each callback has additional details next to it.

Ups, something unexpected happened! Now it's your time to react.

onError: (exception) => {}

Some permissions are not given, so we can not do much at this point

onAccessForbidden: (permissions) => {}

Recorder #

The callbacks in this section are specific to recorder only. This means that they will not fire for the player at all.

Recording has just started

onRecordingStarted: () => {}

Want to detect if someone cancels the recording?

onCanceledByUser: () => {} 

Recording has just finished

onRecordingStopped: (path) => {}

Want to know when upload starts?

onUploadingStarted: (path) => {}

Want to know the progress of the uploads?

onUploadProgress: (token, path, current, total) => {}

Want to know once upload finishes?

onUploaded: (token, path) => {}

Want to know if the video can be processed?

  • This utilizes our quick check algorithm to inspect the video before it is sent to processing and see that it can actually be processed. This allows you to react if something is wrong with the video
onVerified: (token) =>  {}

Interested in the progress of the processing / transcoding of the video?

onProcessing: (token) => {}

Interested knowing when the video is successfully processed?

onProcessed: (token) => {}

API #

Authentication #

Our API is utilizing patent pending authorization token system. It allows you to secure and fine tune what someone can do and for how long.

The following will be needed if you have enabled the authorization tokens in your app.

Client Auth

ziggeo.setClientAuthToken(String token)

Server Auth

ziggeo.setServerAuthToken(String token);

Examples #

Configure the recorder #

Our recorder is utilizing helper class to define different properties of the recorder element. So we would always define it first

var recorderConfig = new RecorderConfig()

Set max duration

recorderConfig.maxDuration = 0; // seconds, 0 - endless by default

Set countdown time

recorderConfig.startDelay = 3; // seconds, default

Auto start recorder

recorderConfig.shouldAutoStartRecording = false; // default

Set which camera you prefer

recorderConfig.facing = RecorderConfig.facingBack; // default

Set the quality of recording

recorderConfig.videoQuality = RecorderConfig.qualityHigh; // default

Can camera be switched during recording?

recorderConfig.shouldDisableCameraSwitch = false; // default

Should video be sent to Ziggeo servers right away?

recorderConfig.shouldSendImmediately = true; // default

Show stop dialog

recorderConfig.shouldConfirmStopRecording = true; // default

Register events listener

recorderConfig.eventsListener = new RecorderEventsListener(...)

Extra arguments to be sent

recorderConfig.extraArgs = map;

This can be used to specify effect profiles, video profiles, custom data, etc.

Extra arguments examples #

Custom data

var args = new Map<String, dynamic>();
args["data"] = "{\"key\":\"value\"}";
recorderConfig.extraArgs = args;

Effect Profile

var args = new Map<String, dynamic>();
args["effect_profile"] = "1234567890";
recorderConfig.extraArgs = args;

Video Profile

var args = new Map<String, dynamic>();
args["video_profile"] = "1234567890";
recorderConfig.extraArgs = args;

Changelog #

If you are interested in our changelog you can find it as a separate file next to this readme. It is named as CHANGELOG.md

0.0.1 #

Only Android support added in this version

  • set/get the application token
  • set/get the server auth token
  • start the camera recorder
  • start the video player (with tokens or paths)
  • upload files from the file selector
  • callbacks

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:ziggeo/ziggeo.dart';
import 'package:ziggeo/configs.dart';
import 'package:ziggeo/listeners.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  Ziggeo _ziggeo;

  @override
  void initState() {
    super.initState();
    final String appToken = "YOUR_APP_TOKEN_HERE";
    _ziggeo = new Ziggeo(appToken);
    prepareRecorderConfig();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
          appBar: AppBar(
            title: const Text('Ziggeo SDK demo app'),
          ),
          body: Center(
              child: Column(
            children: <Widget>[
              RaisedButton(
                  child: Text("Start camera recorder"),
                  onPressed: startCameraRecorder),
              RaisedButton(
                  child: Text("Start file selector"),
                  onPressed: startFileSelector)
            ],
          ))),
    );
  }

  void startCameraRecorder() {
    _ziggeo.startCameraRecorder();
  }

  void startFileSelector() {
    _ziggeo.uploadFromFileSelector(null);
  }

  void prepareRecorderConfig() {
    var recorderConfig = new RecorderConfig();

    var args = new Map<String, dynamic>();
    args["data"] = "{\"key\":\"value\"}";
    args["tags"] = new DateTime.now().millisecondsSinceEpoch;
    recorderConfig.extraArgs = args;

    recorderConfig.eventsListener = new RecorderEventsListener(
        onError: (exception) => print("onError:" + exception.toString()),
        onAccessForbidden: (permissions) =>
            print("onAccessForbidden:" + permissions.toString()),
        onCanceledByUser: () => print("onCanceledByUser"),
        onProcessed: (token) => print("onProcessed:" + token),
        onProcessing: (token) => print("onProcessing:" + token),
        onRecordingStarted: () => print("onRecordingStarted"),
        onRecordingStopped: (path) => print("onRecordingStopped:" + path),
        onUploaded: (token, path) =>
            print("onUploaded. Token:" + token + " Path:" + path),
        onUploadingStarted: (path) => print("onUploadingStarted:" + path),
        onUploadProgress: (token, path, current, total) => print(
            "onUploadProgress. Token:" +
                token +
                " " +
                current.toString() +
                "/" +
                total.toString() +
                " Path:" +
                path),
        onVerified: (token) => print("onVerified:" + token));

    _ziggeo.recorderConfig = recorderConfig;
  }
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  ziggeo: ^0.0.1

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:ziggeo/ziggeo.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
80
Overall:
Weighted score of the above. [more]
46
Learn more about scoring.

We analyzed this package on Jul 14, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.15
  • Flutter: 1.17.5

Analysis suggestions

Package does not support Flutter platform Linux

Because:

  • package:ziggeo/ziggeo.dart that declares support for platforms: Android

Package does not support Flutter platform Web

Because:

  • package:ziggeo/ziggeo.dart that declares support for platforms: Android

Package does not support Flutter platform Windows

Because:

  • package:ziggeo/ziggeo.dart that declares support for platforms: Android

Package does not support Flutter platform iOS

Because:

  • package:ziggeo/ziggeo.dart that declares support for platforms: Android

Package does not support Flutter platform macOS

Because:

  • package:ziggeo/ziggeo.dart that declares support for platforms: Android

Package not compatible with SDK dart

Because:

  • ziggeo that is a package requiring null.

Health issues and suggestions

Document public APIs. (-1 points)

109 out of 109 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Maintenance suggestions

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

The description is too long. (-10 points)

Search engines display only the first part of the description. Try to keep the value of the description field in your package's pubspec.yaml file between 60 and 180 characters.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.12 1.14.13
meta 1.1.8 1.2.2
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8 2.1.0-nullsafety
Dev dependencies
flutter_test