disono / cordova-rtmp-rtsp-stream

Cordova RTMP and RTSP Live Streaming Plugin
Apache License 2.0
41 stars 23 forks source link

Stream works on initial load then stops #11

Closed daniel7912 closed 5 years ago

daniel7912 commented 5 years ago

Hi,

I'm trying to use the plugin within an Ionic app like so:

declare let videoStreamer;

import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-home',
  templateUrl: 'home.page.html',
  styleUrls: ['home.page.scss'],
})
export class HomePage implements OnInit {
  ngOnInit() {
    videoStreamer.streamRTMP('rtmp://192.168.1.64/live/HygATHcYV', (res) => {
      console.log(res);
    }, (err) => {
      console.log(err);
    });
  }

}

I then have a RTMP server set up using https://github.com/sallar/mac-local-rtmp-server. Finally, I am loading the RTMP stream using VLC player.

The server receives the stream OK and VLC can open it, but it only shows a still image and doesn't update.

I have tried another app from the play store (Larix Broadcaster) and this streams & updates as expected, so that would suggest that the server & VLC are both working fine & the issue is with this plugin/my app.

Any ideas on what's wrong? Thanks in advance for any help.

daniel7912 commented 5 years ago

Update - I tried a different server instead (https://github.com/iizukanao/node-rtsp-rtmp-server) and used RTSP which works fine.