mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 01:39:24 +02:00
Add more plugin events
This commit is contained in:
parent
2a45ce4af4
commit
176ed7fc02
3 changed files with 17 additions and 0 deletions
|
@ -1420,6 +1420,18 @@ class AVideoPlugin
|
|||
self::YPTend("{$value['dirName']}::" . __FUNCTION__);
|
||||
}
|
||||
}
|
||||
|
||||
public static function on_publish_done($live_transmitions_history_id, $users_id, $key, $live_servers_id){
|
||||
$plugins = Plugin::getAllEnabled();
|
||||
foreach ($plugins as $value) {
|
||||
self::YPTstart();
|
||||
$p = static::loadPlugin($value['dirName']);
|
||||
if (is_object($p)) {
|
||||
$p->onLiveStream($live_transmitions_history_id, $users_id, $key, $live_servers_id);
|
||||
}
|
||||
self::YPTend("{$value['dirName']}::" . __FUNCTION__);
|
||||
}
|
||||
}
|
||||
|
||||
public static function onUserSocketConnect()
|
||||
{
|
||||
|
|
|
@ -66,3 +66,4 @@ $parameters = Live::getLiveParametersFromKey($array['key']);
|
|||
$array['cleanKey'] = $parameters['cleanKey'];
|
||||
$array['stats'] = LiveTransmitionHistory::getStatsAndRemoveApplication($row['id']);
|
||||
$socketObj = Live::notifySocketStats("socketLiveOFFCallback", $array);
|
||||
AVideoPlugin::on_publish_done($row['id'], $row['users_id'], $row['key'], $row['live_servers_id']);
|
|
@ -480,6 +480,10 @@ abstract class PluginAbstract {
|
|||
public function onLiveStream($users_id, $live_servers_id) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public function on_publish_done($live_transmitions_history_id, $users_id, $key, $live_servers_id) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public function thumbsOverlay($videos_id) {
|
||||
return "";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue