Socket
Socket
Sign inDemoInstall

media-carousel

Package Overview
Dependencies
263
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    media-carousel

Audio/Video navigation carousel with search and filtering capabilities


Version published
Maintainers
1
Created

Readme

Source

The purpose of media-carousel is navigation between a gallery of video and audio files presented in a form of carousel. The media-carousel component at its very naked form has a carousel at the bottom (top) that let the user slide through the files and select one to load the player stacked at the top (bottom).

In order to use media-carousel media must be saved in the Decooda S3 bucket:

UPLOAD

export const S3Configs = {
  bucketName: "decooda-media-galleries",
  bucketRegion: "us-east-1",
  IdentityPoolId: "XYZ"
}

Note that media must be saved with the following path structure: <product_name>/<company>/<project_id>/<video_id>/filename

Each media upload must be accompanied by the following HTTP POST (X-API-KEY http header in the request; we generate one for each client app)

{
   //REQUIRED FIELDS
  s3Url, // full path including the filename
  callbackUrl:"", // POST HTTP
  modelIds:[123,456,789], // All core models used to analyze media - leave it empty or use single model id
  type:"", //video, audio
  //THE REST IS NOT REQUIRED
  date:1234, // UNIX Time stamp number
  user_id:"XYZ",
  accessToken:"", // CORE API acess token containing the model ids
  brand_id:"" // if provided the transcipt will be saved in core also
}
  • Note that the video_id must be unique, otherwise you get an error in the callback.

the callbackURL will be sent the HTTP POST with

    s3Url,
    transcriptions:[
      {
      	message: "Possible retirement in overtime in price.",
      	time:12445235,
      },
      {
        message: "Possible retirement in overtime in price.",
      	time:12445235,
      }
    ],
    error:"" // if there is an error

SHOWREEL

To create a showreel the media-carousel send a POST to services.decooda.com/media/showreel (tentaive path URL - will change) with the body

{
    files:['m1','m2'], // the order is preserved in the showreel
    s3Url:'s3 url for showreel' // does not include the filename
    meta:{ // filtering all videos for following meta information
        emotions:[],
        valence:0, // -1 or 1
        topics:[],
        model_id:int, //
  }
  callbackUrl:'call back', //
  trigger:true // false to get only the processing time estimate
}

The server will respond with

{
    processingTime:12, //seconds
    numVideos:2, // number of video with the hit
    s3Url:''
}

if the trigger is set to true upon the completion of the task the callback url is hit by decooda process informing the from of POST request with the body

{
    s3Url:'XYZ',
    showreelId:''
}

When the media carousel is loaded it sends a GET HTTP request to test.v2t.decooda.com/service/media/gallery?projectId=x,company=x,productName=x,modelId=xxx and it expects (modelId is optional)

{
  files : [{
    id:'',
    src: 'url',
    status:"", // pending, complete, error
    scored:true/false,
    scoredWith:int, // model_id
    uploadDate:11111, //milliseconds - epoch
    type:"video", // or audio
    meta:{
      emotions:[],
      personas:[],
      valence:0, // -1 or 1
      topics:[]
    }
  }],
  showreels :[{
    src: 'url',
    type:"showreel"
    upload_date:11111,
    meta:{
      emotions:[],
      personas:[],
      valence:0, // -1 or 1
      topics:[]
    }
  }]
}

MEDIA LOAD EVENT

The client backend must provide the transcript <product_name>/<company>/<project_id>/<video_id>/filename When a media is loaded a GET request is sent to test.v2t.decooda.com/service/media/transcript?path=<> and a detailed v2t payload...

    transcriptions:[
      {
      	message: "Possible retirement in overtime in price.",
      	time:12445235,
      },
      {
        message: "Possible retirement in overtime in price.",
      	time:12445235,
      }
    ]

Score endpoint (used for re-scoring)

{
  "urls": [String],
  "modelIds": [Int], // single int for now
  "accessToken": "",
  "callbackUrl": "" // optional
}

Keywords

FAQs

Last updated on 24 Jun 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc