Constructor
new WebmGenerator(streamInfo)
Parameters:
- Implements:
- Source:
Members
MAX_CLUSTER_TICKS_ :number
How far apart in time the first and the last block of a Cluster may be. The
time of a block is a signed 16-bit number of ticks after that of its Cluster,
so this leaves room for the difference to be rounded.
Type:
- Source:
UNKNOWN_SIZE_ :Uint8Array
The size that EBML writes to say that an element goes on to the end: 8 bytes,
all the bits of the value set.
Type:
- Source:
Methods
element_(id, …payloadnon-null) → {Uint8Array}
Parameters:
| Name |
Type |
Attributes |
Description |
id |
number
|
|
|
payload |
Uint8Array
|
<repeatable>
|
|
- Source:
Returns:
-
Type
-
Uint8Array
float_(id, value) → {Uint8Array}
Parameters:
| Name |
Type |
Description |
id |
number
|
|
value |
number
|
|
- Source:
Returns:
-
Type
-
Uint8Array
idBytes_(id) → {Uint8Array}
Parameters:
| Name |
Type |
Description |
id |
number
|
An element ID, with its length marker. |
- Source:
Returns:
-
Type
-
Uint8Array
sizeVint_(value) → {Uint8Array}
Writes a variable-length integer with as few bytes as it can: the number
of leading zeros of the first byte is the number of bytes that follow it.
Parameters:
| Name |
Type |
Description |
value |
number
|
|
- Source:
Returns:
-
Type
-
Uint8Array
string_(id, value) → {Uint8Array}
Parameters:
| Name |
Type |
Description |
id |
number
|
|
value |
string
|
|
- Source:
Returns:
-
Type
-
Uint8Array
uint_(id, value) → {Uint8Array}
Parameters:
| Name |
Type |
Description |
id |
number
|
|
value |
number
|
|
- Source:
Returns:
-
Type
-
Uint8Array
initSegment() → {Uint8Array}
Generates an initialization segment.
- Implements:
- Source:
Returns:
-
Type
-
Uint8Array
segmentData() → {Uint8Array}
Generates a media segment: one or more Clusters.
- Implements:
- Source:
Returns:
-
Type
-
Uint8Array
simpleBlock_(frame, clusterTimecode) → {Uint8Array}
Parameters:
- Source:
Returns:
-
Type
-
Uint8Array
trackEntry_() → {Uint8Array}
- Source:
Returns:
-
Type
-
Uint8Array
Type Definitions
Frame
Type:
-
{timecode: number, data: !Uint8Array, keyframe: boolean}
Properties:
| Name |
Type |
Description |
timecode |
number
|
The time, in ticks of the timecode scale of the stream. |
data |
Uint8Array
|
|
keyframe |
boolean
|
|
- Source:
StreamInfo
Type:
-
{trackNumber: number, type: number, codecId: string, codecPrivate: ?Uint8Array, timecodeScale: number, width: number, height: number, channelCount: number, sampleRate: number, frames: !Array<shaka.util.WebmGenerator.Frame>}
Properties:
| Name |
Type |
Attributes |
Description |
trackNumber |
number
|
|
|
type |
number
|
|
A shaka.mkv.TrackType. |
codecId |
string
|
|
The Matroska CodecID. |
codecPrivate |
Uint8Array
|
<nullable>
|
|
timecodeScale |
number
|
|
Nanoseconds per tick. |
width |
number
|
|
Of a video track. |
height |
number
|
|
Of a video track. |
channelCount |
number
|
|
Of an audio track. |
sampleRate |
number
|
|
Of an audio track. |
frames |
Array<shaka.util.WebmGenerator.Frame>
|
|
The frames of the media segment. |
- Source: