Poster images of videos
Poster image is the image that is shown to the viewer before a video is loaded. By default, a shot from the video at a random time is taken and converted into posters of different sizes. It may be customized to better appeal to the viewers. You can use the API to auto upload new poster images.
#
Obtain video informationSend an HTTP GET request to https://dev.vdocipher.com/api/meta/{{videoID}}
to receive response from this API. The response contains detailed structure about the video including the URL to download the poster images.
The URL is valid for long-time and is backed by a CDN. This means you can directly save this URL and use it to display video thumbnail of the video on your website or mobile app.
#
Sample Code for Video ListThe sample video ID is written as {{videoID}}
. Replace this with your video ID.
- CURL
- NODE
- PHP
- C#
- Python
- Ruby
curl -X GET \ https://dev.vdocipher.com/api/meta/{{videoID}} \ -H 'Accept: application/json' \ -H 'Content-Type: application/json'
var request = require("request");
var options = { method: "GET", url: "https://dev.vdocipher.com/api/meta/{{videoID}}", headers: { Accept: "application/json", "Content-Type": "application/json" },};
request(options, function (error, response, body) { if (error) throw new Error(error);
console.log(body);});
<?php
$curl = curl_init();
curl_setopt_array($curl, array( CURLOPT_URL => "https://dev.vdocipher.com/api/meta/{{videoID}}", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => array( "Accept: application/json", "Content-Type: application/json" ),));
$response = curl_exec($curl);$err = curl_error($curl);
curl_close($curl);
if ($err) { echo "cURL Error #:" . $err;} else { echo $response;}
var client = new RestClient("https://dev.vdocipher.com/api/meta/{{videoID}}");var request = new RestRequest(Method.GET);request.AddHeader("Accept", "application/json");request.AddHeader("Content-Type", "application/json");IRestResponse response = client.Execute(request);
import requests
url = "https://dev.vdocipher.com/api/meta/{{videoID}}"
headers = { 'Content-Type': "application/json", 'Accept': "application/json" }
response = requests.request("GET", url, headers=headers)
print(response.text)
require 'uri'require 'net/http'
url = URI("https://dev.vdocipher.com/api/meta/{{videoID}}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)request["Content-Type"] = 'application/json'request["Accept"] = 'application/json'
response = http.request(request)puts response.read_body