title: RTSP streaming using node js?
body: <p>I am using node-rtsp-stream package to run rtsp streaming,How can i implement and callback  it in mvc structure
   //Controller</p>
  
  <pre><code>var RTSP = require('./models/rtsp.js');
  var startRTSP = function startRTSP(queryData) {
    console.log("startRTSP enterred******************")
    console.log("queryData : "+JSON.stringify(queryData))
    stream = new Stream({
      name: 'name',
      streamUrl: 'rtsp://184.72.239.149/vod/mp4:BigBuckBunny_175k.mov',
      wsPort: 9999
    });
  };
  </code></pre>
  
  <p>//models</p>
  
  <pre><code>router.get('/', function(req,res){
         RTSP.startRTSP(req.body);
         res.send("SUCCESS")
  })     
  </code></pre>
  
  <p>// Views</p>
  
  <pre><code>   $.ajax({
          url:'/',
          type:'POST',
          cache:false,
          success:function(data){
              console.log("RTSP Result  : "+JSON.stringify(data)
              var canvas = document.getElementById('rtspvt');
              var ws = new WebSocket("ws://localhost:9999")
              var player = new jsmpeg(ws, {canvas:canvas, autoplay:true,audio:false,loop: true});
          }
      });
  </code></pre>