Skip to content

A Javascript API to use BombBomb services

Notifications You must be signed in to change notification settings

bombbomb/BBCore

Repository files navigation

BBCore

Build Status Code Climate

BombBomb makes it easy to build relationships with simple videos. Use this JavaScript API to record a video on your website, email it within a clean, beautiful design, and receive detailed analytics on opens, click and plays. With the free BombBomb app you can receive push notifications and respond right away when someone interacts with your email.

Quick Start

To begin, include the BBCore library in your html (The latest version is available at https://static.bombbomb.com/js/BBCore.min.js):

<script
  type="text/javascript"
  src="https://static.bombbomb.com/js/BBCore.min.js"
></script>

Then instantiate BBCore:

const bb = new BBCore({
  accessToken: "<your access token or api key>",
});

Usage Examples

Take a look in the examples/ directory to see a simple example implementation.

Record a Video On Your Website

Embed a video recorder on your website and record to a BombBomb account without leaving your site.

Create a video recorder by calling startVideoRecorder(), specifying a css selector target indicating the root container element where you want the recorder to appear.

The second argument is a callback function that will be called when the user stops recording.

bb.startVideoRecorder({ target: "#recorderDiv" }, function (vidInfo) {
  if (confirm("Is this the take you would like to save?")) {
    bb.saveRecordedVideo(
      "Our video!",
      vidInfo.videoId,
      vidInfo.filename,
      function (data) {
        alert("Your video has been saved!");
      }
    );
  }
});

IMPORTANT NOTE: After saving a video, you must call getNewVideoGuid() prior to calling startVideoRecorder or you will be recording over the video you just saved. Alternatively, destroy the BBCore object after the recorder has completed and create a new one for each recording saved.  

Send a Video in an Email Through BombBomb

Wrap your video in a nicely designed template, add a personal written message if you like, and press send.

To send a video in your default template, use videoQuickSend().

 

bb.videoQuickSend(
  {
    subject: "Your Subject Line",
    video_id: vidInfo.videoId, // saved from the earlier call
    email_addresses: "test@emailaddress.com",
    mobile_message: "Simple message to include",
  },
  function (data) {
    alert("You've sent a video! " + data.info);
  }
);

 

Register to receive real-time feedback via web hooks

Have your system be notified in real-time as events happen in your customer's BombBomb account. BombBomb's Webhooks make it easy to keep your system up to date.

 

bb.sendRequest("AddWebHook", {
  hookUrl: "<Your Listener URL>",
});

 

Detailed Analytics

View your email opens, link clicks and video plays. When you can see how people are interacting with your emails and videos you'll know exactly when to follow up.

 

 

 

Realtime Notifications

Download the free BombBomb app for your iOS or Android device and enable realtime notifications. View contact details or respond from your mobile device with one click.

 

 

See the full API Documentation here