Blog

  • Delete Videos From Kaltura

    Posted by Vipul Pandey | Last Updated: 13-Oct-16

    Delete videos from Kaltura

    To delete a video to kaltura we need  to initialize session with our credentials

    1) require kaltura to our project

    var kaltura = require('kaltura'); 

    2) get kaltura configuration with our Kaltura partner ID

    var kalturaConfig = new kaltura.kc.KalturaConfiguration(kalturaPartnerId); 

    3) create an object of kaltura with the your configurations

    kalturaClient = new kaltura.kc.KalturaClient(kalturaConfig);
    

    4) starting our sesssion and

    kalturaClient.session.start(function (session) {
    if (session.code && session.message) {
        console.log('Error starting session of kaltura. Please check your credentials', session);
      } else {
         // operation to perform
      }
    

    finally add delete the video to kaltura.
       to delete a video to kaltura we are using the following steps:
         1) deleteAction:  should be called to delete the video from Kaltura VPaaS

    Eg.

    var kalturaClient = null;
    var Session = null;
    var EXPIRATION_TIME = '10000000';
    var kalturaPartnerId = 100;
    var kalturaAdminSecret = "********************"; // this can be found in kaltura publisher console
    var kalturaUserId = "admin@admin.com"; // this can be found in kaltura publisher console
    var config = new kaltura.kc.KalturaConfiguration(kalturaPartnerId);
    config.serviceUrl = kalturaServiceURL;
    
    var videoObj = res; // response after upload the video to local
    kalturaClient = new kaltura.kc.KalturaClient(config);
    kalturaClient.session.start(function (session) {
            if (session.code && session.message) {
                console.log('Error starting session of kaltura. Please check  your credentials', session);
            } else {
                kalturaClient.setKs(session);
    
                   kalturaClient.media.deleteAction(function (deleteSuccess) {
                       if (deleteSuccess && deleteSuccess.code && deleteSuccess.message) {
                          console.log("Video Remove Error")
                      } else {
                            console.log("Video Removed Success")
                    }
                },
                mediaEntryId);
               
        }, kalturaAdminSecret, kalturaUserId, kaltura.kc.enums.KalturaSessionType.ADMIN,
        kalturaPartnerId, EXPIRATION_TIME);
    
    
    
    
    

    THANKS

Tags: kaltura

View All PostsLeave a Comment
comments powered by Disqus

Mobile Applications

Video Content

Bigdata & NoSQL

SaaS Applications

Miscellaneous

Archives


Alexa Certified Site Stats for www.oodlestechnologies.com