basic demo
This commit is contained in:
12
examples/example-1.js
Normal file
12
examples/example-1.js
Normal 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)
|
||||
Reference in New Issue
Block a user