@api.video/browser-to-rtmp-server
Advanced tools
Comparing version 0.2.1 to 0.2.2
@@ -80,2 +80,5 @@ "use strict"; | ||
onProcessStdinError(err) { | ||
if (err.code === 'EPIPE' && this.status === "ENDING") { | ||
return; | ||
} | ||
this.emitError({ | ||
@@ -88,2 +91,5 @@ ...err, | ||
onProcessError(err) { | ||
if (err.code === 'EPIPE' && this.status === "ENDING") { | ||
return; | ||
} | ||
this.status = 'ENDED'; | ||
@@ -106,2 +112,5 @@ if (err.code === 'ENOENT') { | ||
if (err) { | ||
if (err.code === 'EPIPE' && this.status === "ENDING") { | ||
return; | ||
} | ||
reject({ | ||
@@ -108,0 +117,0 @@ name: "FFMPEG_WRITE_ERROR", |
@@ -43,3 +43,3 @@ "use strict"; | ||
const connection = new connection_1.default(this.logger, socket, connectionId, (s, event) => { | ||
if (this.opts.maxFfmpegInstances && this.countFfmpegInstances() >= this.opts.maxFfmpegInstances) { | ||
if (typeof this.opts.maxFfmpegInstances !== "undefined" && this.countFfmpegInstances() >= this.opts.maxFfmpegInstances) { | ||
throw new Error("Max ffmpeg instances reached"); | ||
@@ -46,0 +46,0 @@ } |
{ | ||
"name": "@api.video/browser-to-rtmp-server", | ||
"description": "Library to broadcast the stream of a webcam from the browser to an RTMP server (server part).", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"main": "./dist/index.js", | ||
@@ -6,0 +6,0 @@ "typings": "./dist/index.d.ts", |
@@ -5,9 +5,8 @@ [![badge](https://img.shields.io/twitter/follow/api_video?style=social)](https://twitter.com/intent/follow?screen_name=api_video) [![badge](https://img.shields.io/github/stars/apivideo/api.video-browser-to-rtmp?style=social)](https://github.com/apivideo/api.video-browser-to-rtmp) [![badge](https://img.shields.io/discourse/topics?server=https%3A%2F%2Fcommunity.api.video)](https://community.api.video) | ||
**@api.video/browser-to-rtmp-server** ![npm](https://img.shields.io/npm/v/@api.video/@api.video/browser-to-rtmp-server) ![ts](https://badgen.net/badge/-/TypeScript/blue?icon=typescript&label) | ||
![npm](https://img.shields.io/npm/v/@api.video/@api.video/browser-to-rtmp-server) ![npm](https://img.shields.io/npm/v/@api.video/@api.video/browser-to-rtmp-client) ![ts](https://badgen.net/badge/-/TypeScript/blue?icon=typescript&label) | ||
**@api.video/browser-to-rtmp-client** ![npm](https://img.shields.io/npm/v/@api.video/@api.video/browser-to-rtmp-client) ![ts](https://badgen.net/badge/-/TypeScript/blue?icon=typescript&label) | ||
[api.video](https://api.video) is the video infrastructure for product builders. Lightning fast video APIs for integrating, scaling, and managing on-demand & low latency live streaming features in your app. | ||
**WARNING: this project is still in beta version. Use it with care and do not hesitate to report any problem you may encounter.** | ||
@@ -346,2 +345,2 @@ # Table of contents | ||
Stop the stream. | ||
Stop the stream. |
@@ -111,2 +111,5 @@ import { FfmpegConfig, ServerError } from './types'; | ||
private onProcessStdinError(err: Error) { | ||
if ((err as any).code === 'EPIPE' && this.status === "ENDING") { | ||
return; | ||
} | ||
this.emitError({ | ||
@@ -120,2 +123,5 @@ ...err, | ||
private onProcessError(err: Error) { | ||
if ((err as any).code === 'EPIPE' && this.status === "ENDING") { | ||
return; | ||
} | ||
this.status = 'ENDED'; | ||
@@ -139,2 +145,5 @@ if ((err as any).code === 'ENOENT') { | ||
if(err) { | ||
if ((err as any).code === 'EPIPE' && this.status === "ENDING") { | ||
return; | ||
} | ||
reject({ | ||
@@ -141,0 +150,0 @@ name: "FFMPEG_WRITE_ERROR", |
@@ -81,3 +81,3 @@ import { | ||
const connection = new Connection(this.logger, socket, connectionId, (s, event) => { | ||
if (this.opts.maxFfmpegInstances && this.countFfmpegInstances() >= this.opts.maxFfmpegInstances) { | ||
if (typeof this.opts.maxFfmpegInstances !== "undefined" && this.countFfmpegInstances() >= this.opts.maxFfmpegInstances) { | ||
throw new Error("Max ffmpeg instances reached"); | ||
@@ -84,0 +84,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
57757
998