MediaStream.getDuration

long getDuration()

Gets the duration of the stream.

If the duration is not known, 0 will be returned.

Returns

the duration of the stream or 0 if not known.