mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-27 19:03:46 +02:00
Fix SourceRef race conditions, fix "source" and "target" getter returning unused instances, add missing validation, make "getDurationFromMetadata" only exist on tracks, fix examples, expand media player to support live playback, change the signatures of some Input APIs
This commit is contained in:
+6
-6
@@ -179,16 +179,16 @@ export abstract class InputTrack {
|
||||
}
|
||||
|
||||
/**
|
||||
* The peak bitrate of the track as specified in the track's metadata. This might not match the actual
|
||||
* media data's bitrate.
|
||||
* The peak bitrate of the track, in bits per second, as specified in the track's metadata. This might not match the
|
||||
* actual media data's bitrate.
|
||||
*/
|
||||
get bitrate() {
|
||||
return this._backing.getBitrate();
|
||||
}
|
||||
|
||||
/**
|
||||
* The average bitrate of the track as specified in the track's metadata. This might not match the actual
|
||||
* media data's bitrate.
|
||||
* The average bitrate of the track, in bits per second, as specified in the track's metadata. This might not match
|
||||
* the actual media data's bitrate.
|
||||
*/
|
||||
get averageBitrate() {
|
||||
return this._backing.getAverageBitrate();
|
||||
@@ -219,9 +219,9 @@ export abstract class InputTrack {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the duration (end timestamp) of this track from metadata stored in the file. This value may be
|
||||
* Gets the duration (end timestamp) in seconds of this track from metadata stored in the file. This value may be
|
||||
* approximate or diverge from the actual, precise duration returned by `.computeDuration()`, but compared to that
|
||||
* method, this method is very cheap. When the duration cannot be determined from the file metadata, `null`
|
||||
* method, this method is cheaper. When the duration cannot be determined from the file metadata, `null`
|
||||
* is returned.
|
||||
*
|
||||
* By default, when the underlying media is live, this method will only resolve once the live stream
|
||||
|
||||
Reference in New Issue
Block a user