basic demo

This commit is contained in:
2025-08-17 11:51:03 -04:00
parent a3078c13b1
commit ceab5680dd
3 changed files with 19 additions and 5 deletions

12
examples/example-1.js Normal file
View File

@@ -0,0 +1,12 @@
import {RtmpPush} from '../dist/node/index.js';
const mediaSourceUri = 'https://storage.googleapis.com/phenix-testing-assets/NFL/nfl-h264-constrained-baseline-1920x1080p-cbr-10000kbps-29.97fps-aac-lc-255kbps-0h5m0s.mp4';
const streamKey = 'K4KZAlSyqPwyunGIbI7JEajen44S1V6xK37FAVhsVqqiGWoGI7DuJOR1ylortFffInHEZ2juAWQqUA2EIFD59uacryVgRnfB';
const ingestUri = `rtmp://ingest-stg.phenixrts.com:80/ingest/${streamKey}`;
const rtmpPush = new RtmpPush(mediaSourceUri, ingestUri).start(mediaSourceUri, ['multi-bitrate', 'fhd']);
setTimeout(() => {
rtmpPush.stop();
}, 60_000)