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.89k stars 1.51k forks source link

HTTP-FLV play have unauthorized access with AUTH enabled #571

Open Jeevittan opened 1 year ago

Jeevittan commented 1 year ago

I cant play the http-flv stream with auth enabled. However I can play the stream with rtmp.

RTMP: rtmp://localhost:1935/live/stream?sign= ✅ HTTP: http://localhost:8000/live/stream.flv?sign=

image

I'm sure I'm using the unexpired token. I've done thorough testing.

Here's my config :

const config = {
  rtmp: {
    port: 1935,
    chunk_size: 500,
    gop_cache: true,
    ping: 30,
    ping_timeout: 60,
  },
  http: {
    port: 8000,
    mediaroot: './media',
    allow_origin: '*',
  },
  auth: {
    play: true,
    publish: true,
    secret: 'nodemedia2017privatekey',
  },
  trans: {
    ffmpeg: 'C:\\Program Files\\ffmpeg\\bin\\ffmpeg.exe',
    tasks: [
      {
        app: 'live',
        mp4: true,
        mp4Flags: '[movflags=frag_keyframe+empty_moov]',
      },
    ],
  },
};
Jeevittan commented 1 year ago

can someone please help? @illuspas @hthetiot @hhdem @BtbN @rebelvg @dipaksarkar Thanks!