curl --request GET \
--url https://video.bunnycdn.com/library/{libraryId}/videos/{videoId}/play/heatmapimport requests
url = "https://video.bunnycdn.com/library/{libraryId}/videos/{videoId}/play/heatmap"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://video.bunnycdn.com/library/{libraryId}/videos/{videoId}/play/heatmap', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://video.bunnycdn.com/library/{libraryId}/videos/{videoId}/play/heatmap",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://video.bunnycdn.com/library/{libraryId}/videos/{videoId}/play/heatmap"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://video.bunnycdn.com/library/{libraryId}/videos/{videoId}/play/heatmap")
.asString();require 'uri'
require 'net/http'
url = URI("https://video.bunnycdn.com/library/{libraryId}/videos/{videoId}/play/heatmap")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"video": {
"videoLibraryId": 123,
"guid": "<string>",
"title": "<string>",
"dateUploaded": "2023-11-07T05:31:56Z",
"views": 123,
"isPublic": true,
"length": 123,
"status": 0,
"framerate": 123,
"width": 123,
"height": 123,
"outputCodecs": "<string>",
"thumbnailCount": 123,
"encodeProgress": 123,
"storageSize": 123,
"hasMP4Fallback": true,
"averageWatchTime": 123,
"totalWatchTime": 123,
"description": "<string>",
"rotation": 123,
"availableResolutions": "<string>",
"captions": [
{
"srclang": "<string>",
"label": "<string>",
"version": 123
}
],
"collectionId": "<string>",
"thumbnailFileName": "<string>",
"thumbnailUrl": "<string>",
"thumbnailBlurhash": "<string>",
"category": "<string>",
"chapters": [
{
"title": "<string>",
"start": 123,
"end": 123
}
],
"moments": [
{
"label": "<string>",
"timestamp": 123
}
],
"metaTags": [
{
"property": "<string>",
"value": "<string>"
}
],
"transcodingMessages": [
{
"timeStamp": "2023-11-07T05:31:56Z",
"level": 0,
"issueCode": 0,
"message": "<string>",
"value": "<string>"
}
],
"jitEncodingEnabled": true,
"smartGenerateStatus": 0,
"smartGenerateFeaturesStatus": {
"title": 0,
"description": 0,
"chapters": 0,
"moments": 0
},
"hasOriginal": true,
"originalHash": "<string>",
"hasHighQualityPreview": true
},
"libraryName": "<string>",
"pullZoneId": 123,
"captionsPath": "<string>",
"seekPath": "<string>",
"thumbnailUrl": "<string>",
"fallbackUrl": "<string>",
"videoPlaylistUrl": "<string>",
"originalUrl": "<string>",
"previewUrl": "<string>",
"controls": "<string>",
"enableDRM": true,
"drmVersion": 123,
"playerKeyColor": "<string>",
"vastTagUrl": "<string>",
"viAiPublisherId": "<string>",
"captionsFontSize": 123,
"captionsFontColor": "<string>",
"captionsBackground": "<string>",
"uiLanguage": "<string>",
"allowEarlyPlay": true,
"tokenAuthEnabled": true,
"enableMP4Fallback": true,
"showHeatmap": true,
"fontFamily": "<string>",
"playbackSpeeds": "<string>",
"widevineMinClientSecurityLevel": 123,
"widevineEmeRobustness": "<string>",
"widevineSdOnlyForL3": true,
"maxSoftwareWidevineResolution": 123,
"zoneTier": 123,
"isPlayable": true,
"isPlaylistPlayable": true,
"preferredPlaybackSource": "None",
"rememberPlayerPosition": true,
"customCss": "<string>",
"exposeVideoMetadata": true,
"enableCompactControls": true
}{
"success": true,
"message": "<string>",
"statusCode": 123
}Get Video heatmap data
Returns raw heatmap data for the video, used to render the attention heatmap on the player timeline. Returns an empty string if the library has heatmaps disabled or no heatmap data exists yet.
curl --request GET \
--url https://video.bunnycdn.com/library/{libraryId}/videos/{videoId}/play/heatmapimport requests
url = "https://video.bunnycdn.com/library/{libraryId}/videos/{videoId}/play/heatmap"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://video.bunnycdn.com/library/{libraryId}/videos/{videoId}/play/heatmap', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://video.bunnycdn.com/library/{libraryId}/videos/{videoId}/play/heatmap",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://video.bunnycdn.com/library/{libraryId}/videos/{videoId}/play/heatmap"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://video.bunnycdn.com/library/{libraryId}/videos/{videoId}/play/heatmap")
.asString();require 'uri'
require 'net/http'
url = URI("https://video.bunnycdn.com/library/{libraryId}/videos/{videoId}/play/heatmap")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"video": {
"videoLibraryId": 123,
"guid": "<string>",
"title": "<string>",
"dateUploaded": "2023-11-07T05:31:56Z",
"views": 123,
"isPublic": true,
"length": 123,
"status": 0,
"framerate": 123,
"width": 123,
"height": 123,
"outputCodecs": "<string>",
"thumbnailCount": 123,
"encodeProgress": 123,
"storageSize": 123,
"hasMP4Fallback": true,
"averageWatchTime": 123,
"totalWatchTime": 123,
"description": "<string>",
"rotation": 123,
"availableResolutions": "<string>",
"captions": [
{
"srclang": "<string>",
"label": "<string>",
"version": 123
}
],
"collectionId": "<string>",
"thumbnailFileName": "<string>",
"thumbnailUrl": "<string>",
"thumbnailBlurhash": "<string>",
"category": "<string>",
"chapters": [
{
"title": "<string>",
"start": 123,
"end": 123
}
],
"moments": [
{
"label": "<string>",
"timestamp": 123
}
],
"metaTags": [
{
"property": "<string>",
"value": "<string>"
}
],
"transcodingMessages": [
{
"timeStamp": "2023-11-07T05:31:56Z",
"level": 0,
"issueCode": 0,
"message": "<string>",
"value": "<string>"
}
],
"jitEncodingEnabled": true,
"smartGenerateStatus": 0,
"smartGenerateFeaturesStatus": {
"title": 0,
"description": 0,
"chapters": 0,
"moments": 0
},
"hasOriginal": true,
"originalHash": "<string>",
"hasHighQualityPreview": true
},
"libraryName": "<string>",
"pullZoneId": 123,
"captionsPath": "<string>",
"seekPath": "<string>",
"thumbnailUrl": "<string>",
"fallbackUrl": "<string>",
"videoPlaylistUrl": "<string>",
"originalUrl": "<string>",
"previewUrl": "<string>",
"controls": "<string>",
"enableDRM": true,
"drmVersion": 123,
"playerKeyColor": "<string>",
"vastTagUrl": "<string>",
"viAiPublisherId": "<string>",
"captionsFontSize": 123,
"captionsFontColor": "<string>",
"captionsBackground": "<string>",
"uiLanguage": "<string>",
"allowEarlyPlay": true,
"tokenAuthEnabled": true,
"enableMP4Fallback": true,
"showHeatmap": true,
"fontFamily": "<string>",
"playbackSpeeds": "<string>",
"widevineMinClientSecurityLevel": 123,
"widevineEmeRobustness": "<string>",
"widevineSdOnlyForL3": true,
"maxSoftwareWidevineResolution": 123,
"zoneTier": 123,
"isPlayable": true,
"isPlaylistPlayable": true,
"preferredPlaybackSource": "None",
"rememberPlayerPosition": true,
"customCss": "<string>",
"exposeVideoMetadata": true,
"enableCompactControls": true
}{
"success": true,
"message": "<string>",
"statusCode": 123
}Path Parameters
The ID of the video library.
The GUID of the video.
Query Parameters
Signed access token, required when the library has token authentication enabled.
Unix timestamp (seconds) the token is valid until, required when the library has token authentication enabled.
Response
The heatmap data of the requested video
Video data.
Show child attributes
Show child attributes
The name of the video library.
The pull zone ID backing the video library's CDN delivery.
CDN URL of the directory containing the video's caption (.vtt) files.
CDN URL of the directory containing the video's seek/scrub thumbnail sprites.
CDN URL of the video's thumbnail image.
CDN URL prefix for the video's MP4 fallback renditions.
CDN URL of the video's HLS master playlist.
CDN URL of the original uploaded source file. Only populated when the library allows early/original playback.
CDN URL of the video's animated preview (scrub thumbnail).
Comma-separated list of player control identifiers enabled for this library.
Whether DRM protection is enabled for this video.
DRM protection tier applied to this video, as an integer cast of the Basic/Enterprise tier enum. Only relevant when EnableDRM is true.
The player's accent/key color, as a CSS color value.
VAST ad tag URL used to serve ads in the player; empty when ads are disabled.
Publisher ID for the vi.ai advertising integration; ads are enabled in the player when this is non-empty.
Caption font size in pixels.
CSS color value for the caption text.
CSS color value for the caption background.
Locale code for the player's UI language (e.g. "en").
Whether the video can be played from the original source file before encoding has finished.
Whether the library's CDN delivery requires signed URLs for playback assets (segments, manifests, thumbnails, etc.). This is a separate setting from whether this endpoint itself required a token to return data.
Whether MP4 fallback renditions are available for players that cannot use HLS.
Whether the attention heatmap is enabled for this library's player.
CSS font-family value used by the player.
Comma-separated list of playback speed multipliers offered to the viewer (e.g. "0.5,1,1.5,2").
Minimum required Widevine client security level (1-3). Ignored (always null here) when WidevineSdOnlyForL3 is enabled, since that setting takes precedence.
EME robustness string corresponding to WidevineMinClientSecurityLevel (e.g. "SW_SECURE_CRYPTO", "HW_SECURE_DECODE"); null when no minimum level applies.
When true, Widevine L3 (software-only) clients are capped to SD playback while stronger clients play at full quality; overrides WidevineMinClientSecurityLevel when both are set.
Maximum vertical resolution allowed for software (L3) Widevine clients when WidevineSdOnlyForL3 is enabled; null otherwise.
Pull zone tier associated with this video library (integer enum value).
Determines if the video is currently playable using either playlist or original source.
Determines if the HLS playlist is currently playable.
Preferred playback source for the current video state.
None Whether the player resumes from the viewer's last watched position.
Custom CSS injected into the player. Only populated when the caller explicitly requests it.
Whether JSON-LD structured data (schema.org VideoObject markup) is rendered for this video, e.g. for SEO.
Whether the player uses a compact control bar layout.
Was this page helpful?