StreamAPI class

Constructors

StreamAPI({required RestAPI restAPI, required String accountId})

Properties

accountId String
finalinherited
dataType CloudflareStreamVideo?
getter/setter pairinherited
errorType CloudflareErrorResponse?
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
isBasic bool
no setterinherited
restAPI ↔ RestAPI
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
service ↔ StreamService
getter/setter pairinherited
tusUploadUrl String
final

Methods

createDirectStreamUpload({required int maxDurationSeconds, String? creator, num? thumbnailTimestampPct, List<String>? allowedOrigins, bool? requireSignedURLs, Watermark? watermark, DateTime? expiry}) Future<CloudflareHTTPResponse<DataUploadDraft?>>
Direct uploads allow users to upload videos without API keys. A common place to use direct uploads is on web apps, client side applications, or on mobile devices where users upload content directly to Stream.
createTusDirectStreamUpload({required int size, String? name, int? maxDurationSeconds, String? creator, num? thumbnailTimestampPct, List<String>? allowedOrigins, bool? requireSignedURLs, Watermark? watermark, DateTime? expiry}) Future<CloudflareHTTPResponse<DataUploadDraft?>>
Direct upload using tus(https://tus.io) protocol. Direct uploads allow users to upload videos without API keys. A common place to use direct uploads is on web apps, client side applications, or on mobile devices where users upload content directly to Stream.
delete({String? id, CloudflareStreamVideo? video}) Future<CloudflareHTTPResponse>
Delete a video on Cloudflare Stream. On success, all copies of the video are deleted. Documentation: https://api.cloudflare.com/#stream-videos-delete-video
deleteMultiple({List<String>? ids, List<CloudflareStreamVideo>? videos}) Future<List<CloudflareHTTPResponse>>
Deletes a list of videos on Cloudflare Stream. On success, all copies of the videos are deleted.
directStreamUpload({required DataUploadDraft dataUploadDraft, DataTransmit<File>? contentFromFile, DataTransmit<String>? contentFromPath, DataTransmit<Uint8List>? contentFromBytes, String? fileName}) Future<CloudflareHTTPResponse<CloudflareStreamVideo?>>
For video direct stream upload without API key or token. This function is to be used specifically after a video createDirectStreamUpload has been requested.
genericParseResponse<DataTypeGeneric>(Future futureResponse, {DataTypeGeneric? dataType, bool parseCloudflareResponse = true}) Future<CloudflareHTTPResponse<DataTypeGeneric>>
inherited
genericParseResponseAsList<DataTypeGeneric extends Jsonable<Object>?>(Future futureResponse, {DataTypeGeneric? dataType, bool parseCloudflareResponse = true}) Future<CloudflareHTTPResponse<List<DataTypeGeneric>>>
inherited
get({String? id, CloudflareStreamVideo? video}) Future<CloudflareHTTPResponse<CloudflareStreamVideo?>>
Fetch details of a single video. Documentation: https://api.cloudflare.com/#stream-videos-video-details
getAll({DateTime? after, DateTime? before, String? creator, bool? includeCounts, String? search, int? limit, bool? asc, List<MediaProcessingState>? status}) Future<CloudflareHTTPResponse<List<CloudflareStreamVideo>?>>
Up to 1000 videos can be listed with one request, use optional parameters to get a specific range of videos. Please note that Cloudflare Stream does not use pagination, instead it uses a cursor pattern to list more than 1000 videos. In order to list all videos, make multiple requests to the API using the created date-time of the last item in the previous request as the before or after parameter.
getSaveResponse<ContainerDataTypeGeneric>(Future futureResponse, {bool parseCloudflareResponse = true}) Future<CloudflareHTTPResponse>
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parseResponse(Future futureResponse, {bool parseCloudflareResponse = true}) Future<CloudflareHTTPResponse<CloudflareStreamVideo>>
inherited
parseResponseAsList(Future futureResponse, {bool parseCloudflareResponse = true}) Future<CloudflareHTTPResponse<List<CloudflareStreamVideo>>>
inherited
stream({DataTransmit<File>? contentFromFile, DataTransmit<String>? contentFromPath, DataTransmit<Uint8List>? contentFromBytes, DataTransmit<String>? contentFromUrl, double? thumbnailTimestampPct, List<String>? allowedOrigins, bool? requireSignedURLs, Watermark? watermark, String? fileName}) Future<CloudflareHTTPResponse<CloudflareStreamVideo?>>
A video up to 200 MegaBytes can be uploaded using a single HTTP POST (multipart/form-data) request. For larger file sizes, please upload using the TUS protocol.
streamGeneric({MultipartFile? multipartFile, String? url, ProgressCallback? onUploadProgress, CancelToken? cancelToken}) Future<HttpResponse<CloudflareResponse?>>
streamMultiple({List<DataTransmit<File>>? contentFromFiles, List<DataTransmit<String>>? contentFromPaths, List<DataTransmit<Uint8List>>? contentFromBytes, List<DataTransmit<String>>? contentFromUrls, double? thumbnailTimestampPct, List<String>? allowedOrigins, bool? requireSignedURLs, Watermark? watermark}) Future<List<CloudflareHTTPResponse<CloudflareStreamVideo?>>>
Stream multiple videos by repeatedly calling stream
toString() String
A string representation of this object.
inherited
tusDirectStreamUpload({required DataUploadDraft dataUploadDraft, File? file, String? path, Uint8List? bytes, double? thumbnailTimestampPct, List<String>? allowedOrigins, bool? requireSignedURLs, Watermark? watermark, int? chunkSize, TusCache? cache, Duration? timeout}) Future<TusAPI>
For larger than 200 MegaBytes video direct stream upload using tus(https://tus.io) protocol without API key or token. This function is to be used specifically after a video createTusDirectStreamUpload has been requested.
tusStream({File? file, String? path, Uint8List? bytes, String? name, double? thumbnailTimestampPct, List<String>? allowedOrigins, bool? requireSignedURLs, Watermark? watermark, int? chunkSize, TusCache? cache, Duration? timeout}) Future<TusAPI>
For videos larger than 200 MegaBytes tus(https://tus.io) protocol is used

Operators

operator ==(Object other) bool
The equality operator.
inherited