New Dacast Video SDK to Simplify Live Streaming API Implementation

Today we’re excited to announce that Dacast is launching a PHP video SDK (Software Development Kit) and a video SDK for Javascript!
These SDKs make it faster and easier for you to code your own solutions for live and on-demand video based on the Dacast platform.

A video SDK will make it simple for users to use the fully-featured Dacast Live Streaming API, version 2 which was released in early 2016, to build their own online video solutions. They allow users to fully leverage the power of Dacast’s live streaming, transcoding, uploading, analytics, custom video players, file management, monetization, and other features.

For those who aren’t familiar, we’ll provide a brief introduction to our Video API and SDKs later in the post. But first, let’s provide you with a bit more information about these new PHP video SDK and Node.js video SDK.

The new Dacast Video SDK

There are two new Dacast SDKs being announced today. The first is a PHP Video SDK for businesses and organizations running APACHE/NGINX servers. The second is a Javascript Video SDK for those using Node.js servers.

Each Video SDK provides a detailed set of demos of the Dacast API in action, demonstrating how to implement core features. Using these SDKs should greatly increase the speed with which you can implement a new API integration.

The Javascript SDK can also be used on the client side. In order to use the PHP Video SDK on the client side, you would probably want to use a preprocessor.

You can download the SDKs from the Dacast GitHub:

What is an SDK?

Video-SDK-Live-Stream-API

An SDK, or Software Development Kit, is an extension of API functionality (see the next section). Essentially, an SDK is a bundle of tools and example code to help you implement complex operations via an API.

You can think of it like a starter kit. If the API is the blueprint, the SDK is a package of pre-built elements that you can copy, modify, or plug straight into your programming projects.

Another way to say it is that the API is basically documentation, or a set of instructions. An SDK, on the other hand, is examples of useful ways to use those instructions.

What does that look like?

In reality, the contents of an SDK (or devkit) are usually libraries, runtimes, compilers, components, code samples, and other miscellaneous tools. These simplify the process of going from a multi-functional API to completing a specific coding project.

What is an API?

An API, or Application Programming Interface, is a simplified code language that allows you to interact with a given piece of software or hardware. For example, in live streaming, an API can enable you to code custom solutions that would be impossible through a standard web interface.

For example, many media outlets use APIs to integrate live streaming video into an existing television broadcast workflow.

By inserting the right code into their servers, they can extract their video stream and send it to their streaming video host provider.

Video-SDK-Live-Stream-API

Here are a few more ways that APIs can be used around live and on-demand video content:

  • Code a mobile, web, or desktop app that integrates live video in a native fashion,
  • Build your own video portal that includes full functionality for uploading, naming, packaging, and managing content,
  • Use a custom video player that reflect your brand and offers specific features, or
  • Create a custom analytics platform that includes data not built into the default analytics.

The world isn’t a simple place. An API allows anyone to custom-code a solution that works for them. It’s a way to leverage the power of a platform without having the build it all yourself.

 

SDKs in action

What are the benefits of Dacast Video SDK? Let’s say you’re running a business and want to use Dacast to monetize your videos. In this case, you have two options. First, you could upload videos to your Dacast account manually. Or, you could use the Dacast Video SDK to directly integrate the video service into your own architecture.

Using a Dacast Video SDK, you can automate the upload of videos from your servers to the Dacast server, with no manual intervention needed. You can also automate the transcoding of those videos.

How to set up the Dacast SDKs

Dacast NodeJS Video SDK

First, make sure node (https://nodejs.org/en/) is already set up on your engine. To download the SDK, please go to its file using your console :

cd /path/to/my/project

Then execute the following:

npm install dacast --save

Once Dacast SDK is installed, please log in to your Dacast account and go to PREFERENCES > API to get your API key. You are now ready to implement the SDK into your own project by requesting the following:

var dacast = require('dacast')('YOUR_API_KEY');

From there, you can use our documentation (Node.js SDK & php SDK)  to find the function you want to execute and implement it into your own code. For instance, here is what you’ll do to create a live channel using the Dacast NodeJs SDK :

Creating a live channel in Node.js

var dacast = require('dacast')('YOUR_API_KEY');

dacast.channel.create({
title:"Channel One", // Required
description:"This is my first channel", // Required
flash : 0 // Optional - Only few accounts are able to set flash channel type (Default : 0)
},function(success){
console.log('success',success);
},function(error){
console.log('error',error);
});

The process is the same for Dacast PHP Video SDK.

Creating a live channel in PHP

<code.$api = new \Dacast\Api(‘YOUR_API_KEY');
$data = [
'title' => 'New channel',
'description' => 'description of my new channel, it\'s awesome'
];

$channel = $api->live->create($data);
[Tweet “New SDKs from Dacast make it easier to set up API-integrated #livestreaming and on-demand video!”]

Conclusion

With the powerful Dacast Live Streaming API and these new video SDKs, integrating streaming video into PHP and Javascript server environments is now easier than it has ever been! We’re really excited about the possibilities opened by these sorts of integrations. We already have clients using our Video Streaming API to great effect. With these Video SDKs now available for download on Github, it’ll be much faster to get up and running.

Any questions about our Live Streaming API or any of our video SDK? The best way to resolve your issues is to read the API and SDK documentation. Then, if you can’t solve your problem, send a message to Dacast support with your API key, a description of the issue, and the time it happened. We’d also love to hear about any cool integrations you’ve got in the works—you can drop those in the comments.

Not a Dacastser yet? sign up today to enjoy free streaming and all our great features for 30 days.

YES, SIGN ME UP

Leave a Reply

Your email address will not be published. Required fields are marked *