Documentation

What if you wanted to work with the videos through the API + from your NodeJS server codes? Well with Ziggeo that is very simple and here you will see more about how exactly you can do that.

You will see each method available and then example code that you can check to see a working example of the same.

Fork me on GitHub
  • index
    Return all streams associated with a video
    ZiggeoSdk.Streams.index(video_token_or_key, arguments, [callbacks])
    
    1. states Filter streams by state
    This method returns JSON
    [
    	{
    	"volatile":false,
    	"token":"d751140b4e1cf0a243f32092f6110296",
    	"key":null,
    	"creation_type":5,
    	"state":5,
    	"streamable":2,
    	"video_type":"mp4",
    	"video_sub_type":"other",
    	"image_size":0,
    	"video_size":36078,
    	"video_width":640,
    	"video_height":360,
    	"duration":1,
    	"has_video":true,
    	"has_image":true,
    	"submission_date":1390257799,
    	"type":"ApiVideoStream",
    	"created":1390257799,
    	"owned":true,
    	"creation_type_string":"SERVER_UPLOAD",
    	"streamable_string":"DEGRADED",
    	"state_string":"READY"
    }]
    
  • get
    Get a single stream
    ZiggeoSdk.Streams.get(video_token_or_key, token_or_key, [callbacks])
    
    This method returns JSON
    {
    	"volatile":false,
    	"token":"d751140b4e1cf0a243f32092f6110296",
    	"key":null,
    	"creation_type":5,
    	"state":5,
    	"streamable":2,
    	"video_type":"mp4",
    	"video_sub_type":"other",
    	"image_size":0,
    	"video_size":36078,
    	"video_width":640,
    	"video_height":360,
    	"duration":1,
    	"has_video":true,
    	"has_image":true,
    	"submission_date":1390257799,
    	"type":"ApiVideoStream",
    	"created":1390257799,
    	"owned":true,
    	"creation_type_string":"SERVER_UPLOAD",
    	"streamable_string":"DEGRADED",
    	"state_string":"READY"
    }
    
  • download_video
    Download the video data associated with the stream
    ZiggeoSdk.Streams.download_video(video_token_or_key, token_or_key, [callbacks])
    
    This method returns DATA
  • download_image
    Download the image data associated with the stream
    ZiggeoSdk.Streams.download_image(video_token_or_key, token_or_key, [callbacks])
    
    This method returns DATA
  • push_to_service
    Push a stream to a provided push service.
    ZiggeoSdk.Streams.push_to_service(video_token_or_key, token_or_key, arguments, [callbacks])
    
    1. pushservicetoken Push Services's token (from the Push Services configured for the app)
    This method returns JSON
  • delete
    Delete the stream
    ZiggeoSdk.Streams.destroy(video_token_or_key, token_or_key, [callbacks])
    
  • delete_file
    Delete video file only of specific stream (keeps the data) by providing video token or key.
    ZiggeoSdk.Streams.delete_file(video_token_or_key, token_or_key, [callbacks])
    
  • create
    Create a new stream
    ZiggeoSdk.Streams.create(video_token_or_key, arguments, [callbacks])
    
    1. file Video file to be uploaded
    This method returns JSON
    {
    	"volatile":false,
    	"token":"d751140b4e1cf0a243f32092f6110296",
    	"key":null,
    	"creation_type":5,
    	"state":5,
    	"streamable":2,
    	"video_type":"mp4",
    	"video_sub_type":"other",
    	"image_size":0,
    	"video_size":36078,
    	"video_width":640,
    	"video_height":360,
    	"duration":1,
    	"has_video":true,
    	"has_image":true,
    	"submission_date":1390257799,
    	"type":"ApiVideoStream",
    	"created":1390257799,
    	"owned":true,
    	"creation_type_string":"SERVER_UPLOAD",
    	"streamable_string":"DEGRADED",
    	"state_string":"READY"
    }
    
  • attach_image
    Attaches an image to a new stream. Must be attached before video, since video upload triggers the transcoding job and binds the stream
    ZiggeoSdk.Streams.attach_image(video_token_or_key, token_or_key, arguments, [callbacks])
    
    1. file Image file to be attached
    This method returns JSON
  • attach_video
    Attaches a video to a new stream
    ZiggeoSdk.Streams.attach_video(video_token_or_key, token_or_key, arguments, [callbacks])
    
    1. file Video file to be attached
    This method returns JSON
  • attach_subtitle
    Attaches a subtitle to the stream.
    ZiggeoSdk.Streams.attach_subtitle(video_token_or_key, token_or_key, arguments, [callbacks])
    
    1. lang Subtitle language
    2. label Subtitle reference
    3. data Actual subtitle
    This method returns JSON