illuspas / Node-Media-Server

A Node.js implementation of RTMP/HTTP-FLV/WS-FLV/HLS/DASH/MP4 Media Server
https://www.npmjs.com/package/node-media-server
MIT License
5.9k stars 1.51k forks source link

Pre play event only works for FLV #518

Open drpshtiwan opened 2 years ago

drpshtiwan commented 2 years ago

When somebody tries to play the FLV stream link the system will send a request to prePlay event callbak. I set HLS as another way to play the stream but the system does not send any request to prePlay event.

How to fix this issue?

This is my configuration for hls

  trans: {
    ffmpeg: '/usr/bin/ffmpeg',
    tasks: [
      {
        app: 'live',
        hls: true,
        hlsFlags: '[hls_time=2:hls_list_size=3:hls_flags=delete_segments]',
        dash: true,
        dashFlags: '[f=dash:window_size=3:extra_window_size=5]'
      }
    ]
  },