Git Product home page Git Product logo

cordova-rtmp-rtsp-stream's Introduction

Cordova RTMP and RTSP Live Streaming Plugin

This cordova plugin is use to stream a live video to RTMP or RTSP server. Library based on rtmp-rtsp-stream-client-java

Install

Latest stable version from npm:

$ cordova plugin add cordova-rtsp-rtmp-stream

Bleeding edge version from Github:

$ cordova plugin add https://github.com/disono/cordova-rtmp-rtsp-stream

Using the plugin

// without comment
videoStreamer.streamRTSPAuth('rtsp://your-ip/live/app_name', 'your-username', 'your-password', [success], [failed]);
videoStreamer.streamStop([success], [failed]);

// show comment
videoStreamer.streamRTSPAuth('rtsp://your-ip/live/app_name', 'your-username', 'your-password', function (res) 
	// show all the comment form and list if connection and authentication is successful
	if (res.event_name == 'onConnectionSuccess') {
		videoStreamer.commentListShow(true, function (resCom) {
					
		}, function (e) {
					
		});
	}
}, function (e) {
		
});

Methods

videoStreamer.streamRTSP('uri', [success], [failed]);
videoStreamer.streamRTMP('uri', [success], [failed]);

videoStreamer.streamRTMPAuth('uri', 'your-username', 'your-password', [success], [failed]);
videoStreamer.streamRTSPAuth('uri', 'your-username', 'your-password', [success], [failed]);

// manually stop streaming
videoStreamer.streamStop([success], [failed]);

// comment list (Optional)
videoStreamer.commentListShow(boolean, [success], [failed]);
videoStreamer.commentList([{avatar: 'URI', username: 'Username', content: 'Message/Comment/Content Text'}], [success], [failed]);

// record locally (MP4)
videoStreamer.videoRecord([success], [failed]);

RTMP & RTSP action response

onConnectionSuccess: data

onConnectionFailed: void

onDisconnect: void

onAuthError: void

onAuthSuccess: data

onStartStream: data

onStopStream: data

onError: data

onCommentSend: data

onCommentItemSelected: data

Future Features

Credits

https://github.com/pedroSG94/rtmp-rtsp-stream-client-java

Library for stream in RTMP and RTSP. All code in Java.

License

Cordova RTMP and RTSP Streamer is licensed under the Apache License (ASL) license. For more information, see the LICENSE file in this repository.

Hire Us!

Do you like my work? I am a Senior Full Stack App Developer (Web, Desktop & Mobile App) & Syadmin, you can hire me, open a issue or contact me!

Additionally you could be interested in check or hire us through our Webmons Development Studio.

Do you still need more info about me or my work?

You could check my Linkedin profile and Twitter profile

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.