mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-05 19:42:38 +02:00
Make each live unique
This commit is contained in:
parent
c89e8478b9
commit
c233b25293
4 changed files with 4 additions and 6 deletions
|
@ -596,7 +596,7 @@ class Live extends PluginAbstract {
|
|||
$parts = explode('-', $key);
|
||||
$key = $parts[0] . "-{$forceIndex}";
|
||||
}
|
||||
return self::getRTMPLinkFromKey(self::getKeyFromUser($users_id));
|
||||
return self::getRTMPLinkFromKey($key);
|
||||
}
|
||||
|
||||
static function getRTMPLinkFromKey($key) {
|
||||
|
|
|
@ -22,7 +22,7 @@ window.addEventListener('message', event => {
|
|||
});
|
||||
|
||||
function startLiveRestream(m3u8, forceIndex) {
|
||||
console.log('WebRTCLiveCam: startLiveRestream', m3u8);
|
||||
console.log('WebRTCLiveCam: startLiveRestream', m3u8, forceIndex);
|
||||
modal.showPleaseWait();
|
||||
$.ajax({
|
||||
url: webSiteRootURL + '/plugin/Live/webRTCToLive.json.php',
|
||||
|
|
|
@ -44,9 +44,7 @@ while ($count <= 4) {
|
|||
}
|
||||
}
|
||||
|
||||
$forceIndex = "webRTCLive". md5($_REQUEST['m3u8']);
|
||||
|
||||
$obj->response = Live::reverseRestream($_REQUEST['m3u8'], $users_id, @$_REQUEST['live_servers_id'], $forceIndex);
|
||||
$obj->response = Live::reverseRestream($_REQUEST['m3u8'], $users_id, @$_REQUEST['live_servers_id'], @$_REQUEST['forceIndex']);
|
||||
|
||||
$obj->error = false;
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ if (!empty($chat)) {
|
|||
$users_id = User::getId();
|
||||
$trasnmition = LiveTransmition::createTransmitionIfNeed($users_id);
|
||||
$live_servers_id = Live::getCurrentLiveServersId();
|
||||
$forceIndex = "webRTCLive". date('YmdHis');
|
||||
$forceIndex = "Live". date('YmdHis');
|
||||
$liveStreamObject = new LiveStreamObject($trasnmition['key'], $live_servers_id, $forceIndex, 0);
|
||||
$streamName = $liveStreamObject->getKeyWithIndex(true, true);
|
||||
$controls = Live::getAllControlls($streamName);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue