mirror of
https://github.com/eliasstepanik/vdo.ninja.git
synced 2026-01-12 06:08:33 +00:00
14 lines
584 B
Plaintext
14 lines
584 B
Plaintext
<?php
|
|
// If using static-auth-secret for your turn server, modify this file as needed; also rename to "turn-credentials.php"
|
|
|
|
$stun_server = "stun:<stun-server>:<stun-port>";
|
|
$turn_server = "turns:<turn-server>:<https-turn-port>";
|
|
$turn_expiry = 86400;
|
|
$turn_username = time() + $turn_expiry;
|
|
$turn_secret = '<turn-server static-auth-secret>';
|
|
$turn_password = base64_encode ( hash_hmac ( 'sha1', $turn_username, $turn_secret, true ) );
|
|
|
|
$arr = array('1' => $turn_username, '2' => $turn_password, '3' => $stun_server, '4' => $turn_server);
|
|
echo json_encode($arr);
|
|
?>
|