Back to Top

Record and Play the video using Viddler Series #1

Record and Play the video using Viddler

I am glad to inform you that again I am starting the article series for Record and Play the video using Viddler API.

Today in this first series of article, i will explain basics about viddler and how to record the video using Viddler API.Viddler provides the api to record and play video.

What Viddler API do?

Viddler give us to record the things and then save video on them server and that video we can fetch to show in our site as Play that video.

Viddle API is not free. Its paid version and here explained below things are trial version and I have made trial demo.

You can download php class and examples of PHP viddler from here [ https://github.com/viddler/phpviddler ]. You can download ,record and play through webpage.

To Record Video

Step 1:

create one php file into folder examples which is in the demo you have download. Here I am going to create file record_video.php.

Step 2:

Include phpviddler.php file into file and create object of it.

Step 3:

Next, Add authentication details of it.

Step 4:

Now, create session and display errors or authentication response using following code:

Step 5:

Flash code for recording a video:

Step 6:

Calling javascript function which will alert video_id of recorded video

After Adding above codes into record_video.php file,click on start recording. After recording finish, Press on the save button so it will get option to store that video on them server.

After saving that video, I have alert the video_id which is necessary so on the basis of it we can get uploaded video to play on our server.

Technical Notes

1. For saving recorded video I have to set get_record_token=> 1 in Request URL so it will return record token which passed.

2. For Fetching Video_ID we need to pass enableCallbacks=> 1 in flashvars attribute.

Trial version of Viddler account gives only 3 video access. So, You can upload 3 videos only after that its give you permission denied and security token error.For the solution of this, you need to remove uploaded video from viddler.com

How to remove uploaded video?

1. Go to the http://www.viddler.com/videos. Here, You get the uploaded video list.

2. Now, You just need to click on edit and then in left panel you will get the Delete option. Here you can delete those uploaded videos and again you can start to record the videos.

Conclusion

so to conclude, It’s very easy to record your videos using Viddler, isn’t? I have completed the first article here. we checked how to record video using viddler API.In Next article , I will show you how to play recorded video in PHP.

Recommended Read:

To convert PHP array into Javascript array
To grab content from nested tags in PHP

If you have any query or question,tell us in the comment section :). Don’t Forget to Follow us on Twitter or Subscribe us to Get the Latest Updates.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Most Popular Posts

The Readers’ Poll – August 2013

Posted on 11 years ago

Bhumi