Skip to content

Commit

Permalink
create a livenow embed code for a specific channel or category
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Neto committed Jan 5, 2024
1 parent 92c134a commit 06fa328
Show file tree
Hide file tree
Showing 9 changed files with 379 additions and 242 deletions.
2 changes: 2 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ Options All -Indexes
RewriteRule ^liveLink/([0-9]+).*$ plugin/LiveLinks/view/Live.php?link=$1 [NC,L,QSA]
RewriteRule ^liveLinkEmbed/([0-9]+).*$ plugin/LiveLinks/view/Live.php?link=$1&embed=1 [NC,L,QSA]
RewriteRule ^liveNow/?.*$ plugin/Live/latestOrLive.php [NC,L,QSA]
RewriteRule ^channel/([^/]+)/liveNow/?.*$ plugin/Live/latestOrLive.php?channelName=$1 [NC,L,QSA]
RewriteRule ^cat/([^/]+)/liveNow/?.*$ plugin/Live/latestOrLive.php?catName=$1 [NC,L,QSA]

#main Files
RewriteRule ^index.php$ view/index.php [NC,L,QSA]
Expand Down
8 changes: 8 additions & 0 deletions objects/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1814,6 +1814,14 @@ function getSources($fileName, $returnArray = false, $try = 0)
return $return;
}


function getSourceFromURL($url)
{
$url = AVideoPlugin::modifyURL($url);
$type = mime_content_type_per_filename($url);
return "<source src=\"{$url}\" type=\"{$type}\">";
}

function decideMoveUploadedToVideos($tmp_name, $filename, $type = "video")
{
if ($filename == '.zip') {
Expand Down
2 changes: 1 addition & 1 deletion plugin/Gallery/view/BigVideoLive.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
return '';
}
}
$urlLiveNow = "{$global['webSiteRootURL']}liveNow?muted=1&GalleryType=";
$urlLiveNow = "{$global['webSiteRootURL']}liveNow?muted=1";
$urlLiveNow = addQueryStringParameter($urlLiveNow, 'muted', 1);
?>
<style>
Expand Down
4 changes: 2 additions & 2 deletions plugin/Live/Live.php
Original file line number Diff line number Diff line change
Expand Up @@ -2630,9 +2630,9 @@ public static function getLatestKeyFromUser($users_id)
return $latest['key'];
}

public static function getLatest($active = false)
public static function getLatest($active = false, $users_id=0, $categories_id=0)
{
$latest = LiveTransmitionHistory::getLatest('', null, $active);
$latest = LiveTransmitionHistory::getLatest('', null, $active, $users_id, $categories_id);
if (empty($latest)) {
return false;
}
Expand Down
Loading

0 comments on commit 06fa328

Please sign in to comment.