Download the PHP package serch3/bunny-stream without Composer
On this page you can find all versions of the php package serch3/bunny-stream. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package bunny-stream
Bunny Stream PHP Library
A simple PHP library to interact with the Bunny Stream API.
Requires
In order to interact with the API you need the API Access Information (Stream->{Library}->API)
Installation
How to use:
Quick start
Create an instance of the \Bunny\Stream\Client with the authentication details:
Manage Videos:
Listing Videos:
Optional:
-
$Search
if set, the response will be filtered to only contain videos that contain the search termstring
-
$Page
Page number. Default is 1int
-
$Items
Number of results per page. Default is 100int
-
$Collection
If set, the response will only contain videos that belong to this collection Idstring
$OrderBy
Determines the ordering of the result within the response. date/titlestring
Get Video
$videoId
ID of the video string
Update Video
$videoId
Id of the video string
$body
Updated video details array
Delete Video
$videoId
Id of the video that will be permanently deleted string
Create Video Entry
$title
Title of the video string
Optional:
-
$collectionId
Collection Idstring
$thumbnailTime
Video time in ms to extract the main video thumbnailint32
Upload Video with Id
$videoId
Id of the video entry string
$path
Video file path string
Optional:
$enabledResolutions
Custom resolutions for the videostring
Upload Video
$title
Title of the video string
$path
Video file path string
Optional:
-
$collectionId
Collection Idstring
-
$thumbnailTime
Video time in ms to extract the main video thumbnailint32
$enabledResolutions
Custom resolutions for the videostring
Set Thumbnail
$videoId
Id of the video string
$url
accessible thumbnail url string
Get Video Heatmap
$videoId
Id of the video string
Get Video play data
$videoId
Id of the video string
Optional:
-
$token
Token to authenticate the requeststring
$expires
Expiry time of the tokenint64
Get Video Statistics
$videoId
Id of the video string
Optional:
$query
parametersarray
:- dateFrom - The start date of the statistics. If no value is passed, the last 30 days will be returned.
date-time
- dateTo - The end date of the statistics. If no value is passed, the last 30 days will be returned.
date-time
- hourly - If true, the statistics data will be returned in hourly groupping.
boolean
- videoGuid - The GUID of the video for which the statistics will be returned
string
- dateFrom - The start date of the statistics. If no value is passed, the last 30 days will be returned.
Re-encode Video
$videoId
Id of the video string
Add output codec to video (Requires Premium Encoding Plan)
$videoId
Id of the video string
$codec
Output codec to be added int
- 0 = x264
- 1 = vp9
- 2 = hevc
- 3 = av1
Repackage Video
$videoId
Id of the video string
$keepOriginalFiles
Marks whether previous file versions should be kept in storage, allows for faster repackage later on. Default is true.
Fetch Video
$url
The URL from which the video will be fetched from. string
Optional:
-
$title
Title of the videostring
-
$collectionId
Collection Idstring
-
$thumbnailTime
Video time in ms to extract the main video thumbnailint32
$headers
Additional headers that will be sent along with the fetch request.array
Add Caption
$videoId
Id of the video string
$srclang
Language shortcode for the caption. string
$path
Caption file path (.vtt/.srt) string
Optional:
$label
Label of the captionstring
Delete Caption
$videoId
Id of the video string
$srclang
Language shortcode for the caption. string
Transcribe video
$videoId
Id of the video string
$language
Language code for the transcription string
$force
Default is false bool
Request Video resolutions info
$videoId
Id of the video string
Cleanup unconfigured resolutions
$videoId
Id of the video string
$resolutions
List of resolutions to be removed array
Optional:
$query
parametersarray
:- resolutionsToDelete - List of resolutions to be removed
array
- deleteNonConfiguredResolutions - If set to true, all resolutions that are not configured in the video will be removed
boolean
- deleteOriginal - If set to true, the original file will be removed.
boolean
- deleteMp4Files - If set to true, all mp4 files will be removed.
boolean
- dryRun - If set to true, no actual file manipulation will happen, only informational data will be returned.
boolean
- resolutionsToDelete - List of resolutions to be removed
Collections:
Listing Collections
Optional:
-
$search
if set, the response will be filtered to only contain collections that contain the search termstring
-
$page
Page number. Default is 1int
-
$items
Number of results per page. Default is 100int
-
$orderby
Determines the ordering of the result within the response. date/titlestring
$includeThumbnails
If set to true, the response will include the thumbnail for each collection. Default is falsebool
Get Collection
$collectionId
Id of the collection string
Optional:
$includeThumbnails
If set to true, the response will include the thumbnail URL for the collection. Default is falsebool
Create Collection
$name
Name of the collection string
Update Collection
$collectionId
Id of the collection string
$name
Updated name of the collection string
Delete Collection
$collectionId
Id of the collection to be deleted string
Returns
All methods return an associative array with the response from the API, or an exception if an error occurs. Check reference for specific responses.