@gibme/tablo.tv
    Preparing search index...

    Class LiveTranscoder

    Hierarchy

    • EventEmitter
      • LiveTranscoder
    Index

    Constructors

    • Creates a new live transcoder instance.

      The output_path must be a valid path to a directory on the local filesystem.

      The channel_id must be a valid channel ID for the specified device.

      The device must be a valid Device instance.

      Parameters

      • id: string
      • device: Tablo
      • channel_id: string
      • output_path: string
      • filename: string = 'stream.m3u8'
      • auto_restart: boolean = true

      Returns LiveTranscoder

    Properties

    auto_restart: boolean = true
    filename: string = 'stream.m3u8'
    id: string
    output_path: string

    Accessors

    • get active(): boolean

      Returns boolean

    • set active(active: boolean): void

      Parameters

      • active: boolean

      Returns void

    • get full_path(): string

      Returns string

    • set full_path(path: string): void

      Parameters

      • path: string

      Returns void

    • get relative_path(): string

      Returns string

    • get use_count(): number

      Returns number

    Methods

    • Alias for emitter.removeListener().

      Parameters

      • event: "error"
      • listener: (error: Error) => void

      Returns this

      v10.0.0

    • Parameters

      • event: "exit"
      • listener: (code: null | number) => void

      Returns this

    • Parameters

      • event: "ready"
      • listener: () => void

      Returns this

    • Parameters

      • event: "stopped"
      • listener: () => void

      Returns this

    • Adds the listener function to the end of the listeners array for the event named eventName. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.

      server.on('connection', (stream) => {
      console.log('someone connected!');
      });

      Returns a reference to the EventEmitter, so that calls can be chained.

      By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the event listener to the beginning of the listeners array.

      import { EventEmitter } from 'node:events';
      const myEE = new EventEmitter();
      myEE.on('foo', () => console.log('a'));
      myEE.prependListener('foo', () => console.log('b'));
      myEE.emit('foo');
      // Prints:
      // b
      // a

      Parameters

      • event: "error"
      • listener: (error: Error) => void

        The callback function

      Returns this

      v0.1.101

    • Parameters

      • event: "exit"
      • listener: (code: null | number) => void

      Returns this

    • Parameters

      • event: "ready"
      • listener: () => void

      Returns this

    • Parameters

      • event: "stopped"
      • listener: () => void

      Returns this

    • Adds a one-time listener function for the event named eventName. The next time eventName is triggered, this listener is removed and then invoked.

      server.once('connection', (stream) => {
      console.log('Ah, we have our first user!');
      });

      Returns a reference to the EventEmitter, so that calls can be chained.

      By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the event listener to the beginning of the listeners array.

      import { EventEmitter } from 'node:events';
      const myEE = new EventEmitter();
      myEE.once('foo', () => console.log('a'));
      myEE.prependOnceListener('foo', () => console.log('b'));
      myEE.emit('foo');
      // Prints:
      // b
      // a

      Parameters

      • event: "error"
      • listener: (error: Error) => void

        The callback function

      Returns this

      v0.3.0

    • Parameters

      • event: "exit"
      • listener: (code: null | number) => void

      Returns this

    • Parameters

      • event: "ready"
      • listener: () => void

      Returns this

    • Parameters

      • event: "stopped"
      • listener: () => void

      Returns this

    • Starts the live transcoder.

      The live transcoder will attempt to start a new session for the specified channel_id on the specified device.

      If a session is successfully started, the live transcoder will attempt to start a new transcoding process.

      Returns Promise<boolean>

    • Stops the live transcoder.

      Returns void

    • Retrieves an existing instance of a live transcoder or creates a new instance if one does not exist.

      The device must be a valid Device instance.

      The channel_id must be a valid channel ID for the specified device.

      The output_path must be a valid path to a directory on the local filesystem.

      The filename is the name of the output file.

      Parameters

      • device: Tablo
      • channel_id: string
      • output_path: string
      • filename: string = 'stream.m3u8'
      • auto_restart: boolean = true

      Returns Promise<LiveTranscoder>