The cut to assign the video.
The video to assign to a cut.
(default: 0) start offset in relation to the clips start.
Estimates whether the given frame rate should be considered as a drop frame frame rate.
The frame rate to test.
Optional, a list of frame rates concidered to be drop frame.
Estimates frame rate by finding the nearest matching value.
The frame rate to estimate.
The rates to compare with.
Find a cut that contains the provided time.
The time to find in a clip.
The list of clips to find.
Find a preferred video for a clip. Will first check if video have same source, then check if clip time is buffered.
The clip to find a video-element to.
The list of available video elements.
(default: 0) offset from clips start, used when checking if buffered.
Converts a calculated frame rate to a FrameRate object (Numerator, denominator).
the calculated frame rate.
Converts from a frame number into a drop frame SMPTE time code.
Frame number (integer).
Frame rate (double).
Use drop frames in calculation? For manually toggling dropFrame support.
This number of frames will be added to the resulting time code.
The base frame rate used to determine the number of digits for frame value.
SMPTE time code.
Converts a frame in a timebase to the corresponding frame in another timebase.
Frames to convert.
Source time base numerator.
Source time base denominator.
Target time base numerator.
Target time base denominator.
Find the closest index of a number array
The value to look for.
The number array to look in.
The index of the closest value.
Helper method. Creates an S3 instance with credentials and region set. AWS parameter need to be loaded separatly i.e import AWS from "aws-cli"
aws-cli reference.
access key id
secret key
Region of the bucket. e.g "eu-west-1"
Gets the closest ending timespan relative to a specific time in a array of TimeRanges. Or undefined if any TimeRange is undefined, or if a TimeRange doesn't contain a matching timespan.
The time to look for.
An array of TimeRanges.
The closest ending timespan, or undefined.
Get a presigned url for s3. Handles s3 (start with s3://) and ordinary https urls. AWS parameter need to be loaded separatly i.e import AWS from "aws-cli"
aws-cli reference.
The url to sign
access key id
secret key
Region of the bucket. e.g "eu-west-1"
Gets the timespan that matches the given time, or undefined if no matching timespan is found.
The time to look for.
The raw TimeRanges object from HTMLMediaElement.
The matching timespan, or undefined if no matching timespan is found.
Check if time is buffered in a video element.
Time to check.
Video to check.
Checks if browser is Chrome
Checks if browser is firefox.
Util guard to check if object can be assigned as frameRate.
The object to be checked.
Util that checks if a HTMLMediaElement is considered loaded.
Element to check.
Optional number deciding which readyState is required.
Checks if browser is safari.
Checks if a specific time is considered to be buffered.
The current time.
The timespan to check against.
Optional margin for buffer end.
True if timespan contains time with the current margin.
Checks if playback rate is out of native elements range.
The playbackrate.
True if the playbackrate is out of range.
Extracts information of an url before signing. Extracts bucket, region and item from https urls. Extracts bucket and item from s3 url.
The url to analyze.
Assign video elements to sequential clips from active cut.
The currently playing cut.
The list of cuts.
The list of available video elements.
Helper method to convert seconds to another time format.
The time to convert.
The frame rate of the video file.
Should drop frame format be used.
The duration of the video file.
The desired time format.
The corresponding number of frames will be added the resulting value, iff outputFormat is SMPTE time code.
Used for seconds and milliseconds output. If paused we hide the frameOffset.
Converts the given time to an exact frame
The time in seconds to convert
The frame rate of the media
Converts the given time to an SMPTE timecode
The time in seconds to convert
The frame rate of the media
Whether the returned timecode should be returned as a drop frame timecode.
This number of frames will be added to the resulting time code.
The base frame rate used to determine the number of digits for frame value.
Convert a certain SMPTE time code, standard time code, frame, second or millisecond to a frame value.
Time value.
Format of time value.
Frame rate.
Drop frame setting.
Duration of media object in seconds.
The corresponding number of frames will be subtracted from the resulting value, iff input is SMPTE time code.
Time in seconds.
Convert a list of cuts to its internal representation.
The cuts to convert.
Convert a certain SMPTE time code, standard time code, frame, second or millisecond to an seconds value.
Time value.
Format of time value.
Frame rate.
Drop frame setting.
Duration of media object in seconds.
The corresponding number of frames will be subtracted from the resulting value, iff input is SMPTE time code.
Time in seconds.
Tries to convert input to a valid time value.
Input string or number.
Format of input string which is also used for the result.
A valid time value or undefined if not able to produce it.
Check if user agent contains a given pattern. Case insensitive.
Patern to match.
Converts user input to a frame, or undefined if it can't be parsed. Supports frame input, e.g. "123" -> 123 Supports 8 consecutive digits, e.g. 00000101 -> 00:00:01:01 -> 26 assuming frame rate is 25. Supports regular SMPTE timecodes, e.g. 00:00:00:01 -> 1. Returns undefined if input could not be converted to a frame.
Input from user.
Frame rate to use.
Duration (in frames).
Drop frame setting.
The corresponding number of frames will be subtracted from the resulting value, iff input is SMPTE time code.
Ensures that the resulting frame never exceeds the duration.
Assign a video element to a new cut. Will seek to the start of the new clip.