Last active
December 24, 2021 11:12
-
-
Save klyushkov/d12c8c6fd2fe84c280b29fa6e416b72f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
insert into flussonic.conf: | |
web_script securetoken /etc/flussonic/securetoken.lua key=mysecretkey password=mypassword; | |
auth /etc/flussonic/securetoken.lua key=mysecretkey; | |
Read more at: | |
English - http://flussonic.com/doc/auth/securelink | |
Russian - http://erlyvideo.ru/doc/auth/securelink | |
*/ | |
$streamname = "STREAMNAME"; | |
$flussonic = "http://flussonic:8080"; | |
$password = "mypassword"; | |
$session_lifetime = 3; // in hours | |
$query = http_build_query(array( | |
"password" => $password, | |
"name" => $streamname, | |
"ip" => $_SERVER["REMOTE_ADDR"], | |
"salt" => bin2hex(openssl_random_pseudo_bytes(16)), | |
"starttime" => time(), | |
"endtime" => time() + $session_lifetime*3600)); | |
$token = file_get_contents("$flussonic/securetoken/sign?$query"); | |
$embed = "$flussonic/$streamname/embed.html?dvr=false&token=$token"; | |
?> | |
<iframe frameborder="0" style="width:853px; height:480px;" src="<?= $embed?>"> </iframe> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hi
how can i use that in the html web page ?