Skip to content

API Reference


API Reference / @dasch-ng/utils / media/src / ShutterSpeedPipe

Class: ShutterSpeedPipe ​

Defined in: libs/ng/utils/media/src/lib/media-pipes.ts:48

Formats an exposure time in seconds the way cameras show it: 1/250 s for short times, 0.4 s or 2 s otherwise. A time counts as 1/n when n is within 5 % of a whole number.

Example ​

html
{{ 0.004 | shutterSpeed }}   <!-- 1/250 s -->
{{ '0.0333' | shutterSpeed }} <!-- 1/30 s -->
{{ 2.5 | shutterSpeed : 'de-DE' }} <!-- 2,5 s -->

Extends ​

  • LocalePipe

Implements ​

  • PipeTransform

Constructors ​

Constructor ​

new ShutterSpeedPipe(): ShutterSpeedPipe

Returns ​

ShutterSpeedPipe

Inherited from ​

LocalePipe.constructor

Properties ​

localeId ​

protected readonly localeId: string

Defined in: libs/ng/utils/media/src/lib/media-pipes.ts:4

Inherited from ​

LocalePipe.localeId

Methods ​

format() ​

protected format(value, maximumFractionDigits, locale?): string

Defined in: libs/ng/utils/media/src/lib/media-pipes.ts:6

Parameters ​

value ​

number

maximumFractionDigits ​

number

locale? ​

string

Returns ​

string

Inherited from ​

LocalePipe.format


transform() ​

transform(seconds, locale?): string

Defined in: libs/ng/utils/media/src/lib/media-pipes.ts:49

Parameters ​

seconds ​

string | number | null | undefined

locale? ​

string

Returns ​

string

Implementation of ​

PipeTransform.transform

Released under the MIT License.