mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 09:49:28 +02:00
Merge remote-tracking branch 'origin/master' into julzxcapz-yp
This commit is contained in:
commit
e97ef28c31
29 changed files with 2982 additions and 4340 deletions
24
composer.lock
generated
24
composer.lock
generated
|
@ -281,16 +281,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "aws/aws-sdk-php",
|
"name": "aws/aws-sdk-php",
|
||||||
"version": "3.275.7",
|
"version": "3.276.3",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/aws/aws-sdk-php.git",
|
"url": "https://github.com/aws/aws-sdk-php.git",
|
||||||
"reference": "54dcef3349c81b46c0f5f6e54b5f9bfb5db19903"
|
"reference": "c8b38cfab677a3ec98e3f40bccd1a2bf851a014f"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/54dcef3349c81b46c0f5f6e54b5f9bfb5db19903",
|
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/c8b38cfab677a3ec98e3f40bccd1a2bf851a014f",
|
||||||
"reference": "54dcef3349c81b46c0f5f6e54b5f9bfb5db19903",
|
"reference": "c8b38cfab677a3ec98e3f40bccd1a2bf851a014f",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -370,9 +370,9 @@
|
||||||
"support": {
|
"support": {
|
||||||
"forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
|
"forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
|
||||||
"issues": "https://github.com/aws/aws-sdk-php/issues",
|
"issues": "https://github.com/aws/aws-sdk-php/issues",
|
||||||
"source": "https://github.com/aws/aws-sdk-php/tree/3.275.7"
|
"source": "https://github.com/aws/aws-sdk-php/tree/3.276.3"
|
||||||
},
|
},
|
||||||
"time": "2023-07-13T18:21:04+00:00"
|
"time": "2023-07-21T18:30:18+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "brick/math",
|
"name": "brick/math",
|
||||||
|
@ -3988,16 +3988,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "stripe/stripe-php",
|
"name": "stripe/stripe-php",
|
||||||
"version": "v10.17.0",
|
"version": "v10.18.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/stripe/stripe-php.git",
|
"url": "https://github.com/stripe/stripe-php.git",
|
||||||
"reference": "73383b44de153f4d602b90dad3ef075259bcecef"
|
"reference": "c32549e443a619d1b885b99d624568ecae82d6a0"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/stripe/stripe-php/zipball/73383b44de153f4d602b90dad3ef075259bcecef",
|
"url": "https://api.github.com/repos/stripe/stripe-php/zipball/c32549e443a619d1b885b99d624568ecae82d6a0",
|
||||||
"reference": "73383b44de153f4d602b90dad3ef075259bcecef",
|
"reference": "c32549e443a619d1b885b99d624568ecae82d6a0",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -4043,9 +4043,9 @@
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/stripe/stripe-php/issues",
|
"issues": "https://github.com/stripe/stripe-php/issues",
|
||||||
"source": "https://github.com/stripe/stripe-php/tree/v10.17.0"
|
"source": "https://github.com/stripe/stripe-php/tree/v10.18.0"
|
||||||
},
|
},
|
||||||
"time": "2023-07-13T22:12:18+00:00"
|
"time": "2023-07-20T16:59:49+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/console",
|
"name": "symfony/console",
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1648,9 +1648,10 @@ if (!class_exists('Video')) {
|
||||||
$created = !empty($_POST['sort']['v.created']) ? $_POST['sort']['v.created'] : $_POST['sort']['created'];
|
$created = !empty($_POST['sort']['v.created']) ? $_POST['sort']['v.created'] : $_POST['sort']['created'];
|
||||||
unset($_POST['sort']);
|
unset($_POST['sort']);
|
||||||
$_POST['sort'] = array();
|
$_POST['sort'] = array();
|
||||||
|
if(strtoupper($created) === 'DESC'){
|
||||||
$_POST['sort']['v.`order`'] = 'IS NOT NULL DESC';
|
$_POST['sort']['v.`order`'] = 'IS NOT NULL DESC';
|
||||||
$_POST['sort']['`order`'] = 'ASC';
|
$_POST['sort']['`order`'] = 'ASC';
|
||||||
|
}
|
||||||
|
|
||||||
$_POST['sort']['v.created'] = $created;
|
$_POST['sort']['v.created'] = $created;
|
||||||
}
|
}
|
||||||
|
@ -1700,7 +1701,7 @@ if (!class_exists('Video')) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//echo $sql;//var_dump($_REQUEST['doNotShowCatChilds']);exit;
|
//echo $sql;//exit;
|
||||||
//_error_log("getAllVideos($status, $showOnlyLoggedUserVideos , $ignoreGroup , ". json_encode($videosArrayId).")" . $sql);
|
//_error_log("getAllVideos($status, $showOnlyLoggedUserVideos , $ignoreGroup , ". json_encode($videosArrayId).")" . $sql);
|
||||||
|
|
||||||
$timeLogName = TimeLogStart("video::getAllVideos");
|
$timeLogName = TimeLogStart("video::getAllVideos");
|
||||||
|
|
|
@ -63,7 +63,19 @@ if ($seconds_watching_video < 0) {
|
||||||
$seconds_watching_video = 0;
|
$seconds_watching_video = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Comparison and update
|
||||||
|
$current_time = time();
|
||||||
|
if (isset($_SESSION['addViewCount'][$_REQUEST['id']]['last_update_time'])) {
|
||||||
|
$elapsed_time = $current_time - $_SESSION['addViewCount'][$_REQUEST['id']]['last_update_time'];
|
||||||
|
if ($seconds_watching_video > $elapsed_time) {
|
||||||
|
$seconds_watching_video = $elapsed_time;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$_SESSION['addViewCount'][$_REQUEST['id']]['last_update_time'] = $current_time;
|
||||||
|
|
||||||
$obj2->seconds_watching_video = $seconds_watching_video;
|
$obj2->seconds_watching_video = $seconds_watching_video;
|
||||||
|
|
||||||
if (empty($_SESSION['addViewCount'][$_REQUEST['id']]['time'])) {
|
if (empty($_SESSION['addViewCount'][$_REQUEST['id']]['time'])) {
|
||||||
//_error_log("videos_statistics addView {$_REQUEST['id']} {$_SERVER['HTTP_USER_AGENT']} ".json_encode($_SESSION['addViewCount']));
|
//_error_log("videos_statistics addView {$_REQUEST['id']} {$_SERVER['HTTP_USER_AGENT']} ".json_encode($_SESSION['addViewCount']));
|
||||||
$resp = $obj->addView();
|
$resp = $obj->addView();
|
||||||
|
|
|
@ -20,6 +20,6 @@ Video::resetOrder();
|
||||||
foreach ($_REQUEST['videos'] as $key => $value) {
|
foreach ($_REQUEST['videos'] as $key => $value) {
|
||||||
$obj->responses[] = Video::updateOrder($value['videos_id'], $value['order']);
|
$obj->responses[] = Video::updateOrder($value['videos_id'], $value['order']);
|
||||||
}
|
}
|
||||||
$obj->error = empty($obj->responses);
|
$obj->error = empty($obj->responses) && !empty($_REQUEST['videos']);
|
||||||
mysqlCommit();
|
mysqlCommit();
|
||||||
echo json_encode($obj);
|
echo json_encode($obj);
|
||||||
|
|
|
@ -22,6 +22,7 @@ class VideoStatistic extends ObjectYPT {
|
||||||
protected $seconds_watching_video;
|
protected $seconds_watching_video;
|
||||||
protected $json;
|
protected $json;
|
||||||
protected $rewarded;
|
protected $rewarded;
|
||||||
|
protected $created_php_time;
|
||||||
|
|
||||||
public static function getSearchFieldsNames() {
|
public static function getSearchFieldsNames() {
|
||||||
return ['json', 'ip', 'when', 'user', 'name', 'email', 'channelName'];
|
return ['json', 'ip', 'when', 'user', 'name', 'email', 'channelName'];
|
||||||
|
@ -105,6 +106,10 @@ class VideoStatistic extends ObjectYPT {
|
||||||
$vs->setWhen(date("Y-m-d h:i:s"));
|
$vs->setWhen(date("Y-m-d h:i:s"));
|
||||||
} else {
|
} else {
|
||||||
$vs = new VideoStatistic($lastStatistic['id']);
|
$vs = new VideoStatistic($lastStatistic['id']);
|
||||||
|
$elapsedTime = time() - $vs->created_php_time;
|
||||||
|
if ($seconds_watching_video > $elapsedTime) {
|
||||||
|
$seconds_watching_video = $elapsedTime;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$vs->setLastVideoTime($lastVideoTime);
|
$vs->setLastVideoTime($lastVideoTime);
|
||||||
$vs->setIp(getRealIpAddr());
|
$vs->setIp(getRealIpAddr());
|
||||||
|
|
289
package-lock.json
generated
289
package-lock.json
generated
|
@ -16,7 +16,7 @@
|
||||||
"flickity": "^3.0.0",
|
"flickity": "^3.0.0",
|
||||||
"flickity-bg-lazyload": "^2.0.0",
|
"flickity-bg-lazyload": "^2.0.0",
|
||||||
"fontawesome-free": "^1.0.4",
|
"fontawesome-free": "^1.0.4",
|
||||||
"hls.js": "^1.4.9",
|
"hls.js": "^1.4.10",
|
||||||
"infinite-scroll": "^4.0.1",
|
"infinite-scroll": "^4.0.1",
|
||||||
"inputmask": "^5.0.8",
|
"inputmask": "^5.0.8",
|
||||||
"jquery": "^3.7.0",
|
"jquery": "^3.7.0",
|
||||||
|
@ -32,13 +32,13 @@
|
||||||
"p2p-media-loader-hlsjs": "^0.6.2",
|
"p2p-media-loader-hlsjs": "^0.6.2",
|
||||||
"pouchdb": "^8.0.0",
|
"pouchdb": "^8.0.0",
|
||||||
"sweetalert": "^2.1.2",
|
"sweetalert": "^2.1.2",
|
||||||
"tinymce": "^6.4.2",
|
"tinymce": "^6.6.0",
|
||||||
"tinymce-langs": "^1.0.0",
|
"tinymce-langs": "^1.0.0",
|
||||||
"video.js": "^8.3.0",
|
"video.js": "^8.3.0",
|
||||||
"videojs-contrib-ads": "^7.2.0",
|
"videojs-contrib-ads": "^7.3.2",
|
||||||
"videojs-contrib-quality-levels": "^4.0.0",
|
"videojs-contrib-quality-levels": "^4.0.0",
|
||||||
"videojs-font": "^4.1.0",
|
"videojs-font": "^4.1.0",
|
||||||
"videojs-ima": "^2.1.0",
|
"videojs-ima": "^2.2.0",
|
||||||
"videojs-landscape-fullscreen": "^11.1111.0",
|
"videojs-landscape-fullscreen": "^11.1111.0",
|
||||||
"videojs-overlay": "^3.1.0",
|
"videojs-overlay": "^3.1.0",
|
||||||
"videojs-playlist": "^5.1.0",
|
"videojs-playlist": "^5.1.0",
|
||||||
|
@ -801,9 +801,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/hls.js": {
|
"node_modules/hls.js": {
|
||||||
"version": "1.4.9",
|
"version": "1.4.10",
|
||||||
"resolved": "https://registry.npmjs.org/hls.js/-/hls.js-1.4.9.tgz",
|
"resolved": "https://registry.npmjs.org/hls.js/-/hls.js-1.4.10.tgz",
|
||||||
"integrity": "sha512-i2BuNh7C7sd+wpW1V9p+P37KKCWNc6Ph/3BiPr+8nfJ7eZdtQQvSQUn2QwKU+7Fvc7b5BpS/lM6RJ3LUf+XbWg=="
|
"integrity": "sha512-wAVSj4Fm2MqOHy5+BlYnlKxXvJlv5IuZHjlzHu18QmjRzSDFQiUDWdHs5+NsFMQrgKEBwuWDcyvaMC9dUzJ5Uw=="
|
||||||
},
|
},
|
||||||
"node_modules/ieee754": {
|
"node_modules/ieee754": {
|
||||||
"version": "1.2.1",
|
"version": "1.2.1",
|
||||||
|
@ -1731,9 +1731,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/tinymce": {
|
"node_modules/tinymce": {
|
||||||
"version": "6.4.2",
|
"version": "6.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/tinymce/-/tinymce-6.4.2.tgz",
|
"resolved": "https://registry.npmjs.org/tinymce/-/tinymce-6.6.0.tgz",
|
||||||
"integrity": "sha512-te+4c8PoAwTKPMBQtMQehnSZlOO9Ay5tDgaRFJKBehYb6SlX2PYZ0v3oe/cmiv5EfqdwZLkEMXk2MNOeApZZLg=="
|
"integrity": "sha512-b9Mb7z8ryFOwLm8WCmlpwzdgOt1xD1u5Jjdh68B4QjkIyTLyHRBsfsrbiCUGonnVTymDlkexPkaP8sj24zexKQ=="
|
||||||
},
|
},
|
||||||
"node_modules/tinymce-langs": {
|
"node_modules/tinymce-langs": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
|
@ -1911,9 +1911,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/videojs-contrib-ads": {
|
"node_modules/videojs-contrib-ads": {
|
||||||
"version": "7.2.0",
|
"version": "7.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/videojs-contrib-ads/-/videojs-contrib-ads-7.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/videojs-contrib-ads/-/videojs-contrib-ads-7.3.2.tgz",
|
||||||
"integrity": "sha512-5DAO8BpD4mm/xKCGm4JhmIkjYOC+TByiO0XXInoc981Gr71xcFpO2wxPHMFrojhKROmYGWnYKcLsKNMkvYOWHg==",
|
"integrity": "sha512-O5zSqP9GePr8XDUgCKQoRdDr5dUX5GEbNx7s2R7LC/Pxn8L10x3RNCrijzO56bli7Vr5wAlTJgAk1dR5lqQ44A==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"global": "^4.3.2"
|
"global": "^4.3.2"
|
||||||
},
|
},
|
||||||
|
@ -1946,143 +1946,22 @@
|
||||||
"integrity": "sha512-X1LuPfLZPisPLrANIAKCknZbZu5obVM/ylfd1CN+SsCmPZQ3UMDPcvLTpPBJxcBuTpHQq2MO1QCFt7p8spnZ/w=="
|
"integrity": "sha512-X1LuPfLZPisPLrANIAKCknZbZu5obVM/ylfd1CN+SsCmPZQ3UMDPcvLTpPBJxcBuTpHQq2MO1QCFt7p8spnZ/w=="
|
||||||
},
|
},
|
||||||
"node_modules/videojs-ima": {
|
"node_modules/videojs-ima": {
|
||||||
"version": "2.1.0",
|
"version": "2.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/videojs-ima/-/videojs-ima-2.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/videojs-ima/-/videojs-ima-2.2.0.tgz",
|
||||||
"integrity": "sha512-Zb+J4by0d4FbserGOiSbdNo0U4vXSDuiPVCKFMksbaj4DO3mC8IpmvZ9Vci3tUwOhb/ladmUdhif9euSwq92Sw==",
|
"integrity": "sha512-VKg7mZsaiW89ko2Sjfz/sDcCbCTjj2OAkg8CakvCs9ZiVg20g6QYVtEWj249V/HTm0/1X01GEPk9hnIrRzgd+A==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@hapi/cryptiles": "^5.1.0",
|
"@hapi/cryptiles": "^5.1.0",
|
||||||
"can-autoplay": "^3.0.2",
|
"can-autoplay": "^3.0.2",
|
||||||
"extend": ">=3.0.2",
|
"extend": ">=3.0.2",
|
||||||
"videojs-contrib-ads": "^6.9.0"
|
"videojs-contrib-ads": "^6.9.0 || ^7"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=0.8.0"
|
"node": ">=0.8.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"video.js": "^5.19.2 || ^6 || ^7"
|
"video.js": "^5.19.2 || ^6 || ^7 || ^8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/videojs-ima/node_modules/@videojs/http-streaming": {
|
|
||||||
"version": "2.16.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@videojs/http-streaming/-/http-streaming-2.16.2.tgz",
|
|
||||||
"integrity": "sha512-etPTUdCFu7gUWc+1XcbiPr+lrhOcBu3rV5OL1M+3PDW89zskScAkkcdqYzP4pFodBPye/ydamQoTDScOnElw5A==",
|
|
||||||
"dependencies": {
|
|
||||||
"@babel/runtime": "^7.12.5",
|
|
||||||
"@videojs/vhs-utils": "3.0.5",
|
|
||||||
"aes-decrypter": "3.1.3",
|
|
||||||
"global": "^4.4.0",
|
|
||||||
"m3u8-parser": "4.8.0",
|
|
||||||
"mpd-parser": "^0.22.1",
|
|
||||||
"mux.js": "6.0.1",
|
|
||||||
"video.js": "^6 || ^7"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=8",
|
|
||||||
"npm": ">=5"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"video.js": "^6 || ^7"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/videojs-ima/node_modules/@videojs/http-streaming/node_modules/video.js": {
|
|
||||||
"version": "7.21.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/video.js/-/video.js-7.21.4.tgz",
|
|
||||||
"integrity": "sha512-R5e57M/5uqxQMQpFpybNbd8GtiRwFJPqkHjrhv0QTJ2tqnesbjETbck5kU5dhFr1FevsJRFhjBG4hAnvRGnXbw==",
|
|
||||||
"dependencies": {
|
|
||||||
"@babel/runtime": "^7.12.5",
|
|
||||||
"@videojs/http-streaming": "2.16.2",
|
|
||||||
"@videojs/vhs-utils": "^3.0.4",
|
|
||||||
"@videojs/xhr": "2.6.0",
|
|
||||||
"aes-decrypter": "3.1.3",
|
|
||||||
"global": "^4.4.0",
|
|
||||||
"keycode": "^2.2.0",
|
|
||||||
"m3u8-parser": "4.8.0",
|
|
||||||
"mpd-parser": "0.22.1",
|
|
||||||
"mux.js": "6.0.1",
|
|
||||||
"safe-json-parse": "4.0.0",
|
|
||||||
"videojs-font": "3.2.0",
|
|
||||||
"videojs-vtt.js": "^0.15.4"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/videojs-ima/node_modules/aes-decrypter": {
|
|
||||||
"version": "3.1.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/aes-decrypter/-/aes-decrypter-3.1.3.tgz",
|
|
||||||
"integrity": "sha512-VkG9g4BbhMBy+N5/XodDeV6F02chEk9IpgRTq/0bS80y4dzy79VH2Gtms02VXomf3HmyRe3yyJYkJ990ns+d6A==",
|
|
||||||
"dependencies": {
|
|
||||||
"@babel/runtime": "^7.12.5",
|
|
||||||
"@videojs/vhs-utils": "^3.0.5",
|
|
||||||
"global": "^4.4.0",
|
|
||||||
"pkcs7": "^1.0.4"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/videojs-ima/node_modules/mpd-parser": {
|
|
||||||
"version": "0.22.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/mpd-parser/-/mpd-parser-0.22.1.tgz",
|
|
||||||
"integrity": "sha512-fwBebvpyPUU8bOzvhX0VQZgSohncbgYwUyJJoTSNpmy7ccD2ryiCvM7oRkn/xQH5cv73/xU7rJSNCLjdGFor0Q==",
|
|
||||||
"dependencies": {
|
|
||||||
"@babel/runtime": "^7.12.5",
|
|
||||||
"@videojs/vhs-utils": "^3.0.5",
|
|
||||||
"@xmldom/xmldom": "^0.8.3",
|
|
||||||
"global": "^4.4.0"
|
|
||||||
},
|
|
||||||
"bin": {
|
|
||||||
"mpd-to-m3u8-json": "bin/parse.js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/videojs-ima/node_modules/mux.js": {
|
|
||||||
"version": "6.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/mux.js/-/mux.js-6.0.1.tgz",
|
|
||||||
"integrity": "sha512-22CHb59rH8pWGcPGW5Og7JngJ9s+z4XuSlYvnxhLuc58cA1WqGDQPzuG8I+sPm1/p0CdgpzVTaKW408k5DNn8w==",
|
|
||||||
"dependencies": {
|
|
||||||
"@babel/runtime": "^7.11.2",
|
|
||||||
"global": "^4.4.0"
|
|
||||||
},
|
|
||||||
"bin": {
|
|
||||||
"muxjs-transmux": "bin/transmux.js"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=8",
|
|
||||||
"npm": ">=5"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/videojs-ima/node_modules/videojs-contrib-ads": {
|
|
||||||
"version": "6.9.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/videojs-contrib-ads/-/videojs-contrib-ads-6.9.0.tgz",
|
|
||||||
"integrity": "sha512-nzKz+jhCGMTYffSNVYrmp9p70s05v6jUMOY3Z7DpVk3iFrWK4Zi/BIkokDWrMoHpKjdmCdKzfJVBT+CrUj6Spw==",
|
|
||||||
"dependencies": {
|
|
||||||
"global": "^4.3.2",
|
|
||||||
"video.js": "^6 || ^7"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=8",
|
|
||||||
"npm": ">=5"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/videojs-ima/node_modules/videojs-contrib-ads/node_modules/video.js": {
|
|
||||||
"version": "7.21.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/video.js/-/video.js-7.21.4.tgz",
|
|
||||||
"integrity": "sha512-R5e57M/5uqxQMQpFpybNbd8GtiRwFJPqkHjrhv0QTJ2tqnesbjETbck5kU5dhFr1FevsJRFhjBG4hAnvRGnXbw==",
|
|
||||||
"dependencies": {
|
|
||||||
"@babel/runtime": "^7.12.5",
|
|
||||||
"@videojs/http-streaming": "2.16.2",
|
|
||||||
"@videojs/vhs-utils": "^3.0.4",
|
|
||||||
"@videojs/xhr": "2.6.0",
|
|
||||||
"aes-decrypter": "3.1.3",
|
|
||||||
"global": "^4.4.0",
|
|
||||||
"keycode": "^2.2.0",
|
|
||||||
"m3u8-parser": "4.8.0",
|
|
||||||
"mpd-parser": "0.22.1",
|
|
||||||
"mux.js": "6.0.1",
|
|
||||||
"safe-json-parse": "4.0.0",
|
|
||||||
"videojs-font": "3.2.0",
|
|
||||||
"videojs-vtt.js": "^0.15.4"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/videojs-ima/node_modules/videojs-font": {
|
|
||||||
"version": "3.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/videojs-font/-/videojs-font-3.2.0.tgz",
|
|
||||||
"integrity": "sha512-g8vHMKK2/JGorSfqAZQUmYYNnXmfec4MLhwtEFS+mMs2IDY398GLysy6BH6K+aS1KMNu/xWZ8Sue/X/mdQPliA=="
|
|
||||||
},
|
|
||||||
"node_modules/videojs-landscape-fullscreen": {
|
"node_modules/videojs-landscape-fullscreen": {
|
||||||
"version": "11.1111.0",
|
"version": "11.1111.0",
|
||||||
"resolved": "https://registry.npmjs.org/videojs-landscape-fullscreen/-/videojs-landscape-fullscreen-11.1111.0.tgz",
|
"resolved": "https://registry.npmjs.org/videojs-landscape-fullscreen/-/videojs-landscape-fullscreen-11.1111.0.tgz",
|
||||||
|
@ -2805,9 +2684,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"hls.js": {
|
"hls.js": {
|
||||||
"version": "1.4.9",
|
"version": "1.4.10",
|
||||||
"resolved": "https://registry.npmjs.org/hls.js/-/hls.js-1.4.9.tgz",
|
"resolved": "https://registry.npmjs.org/hls.js/-/hls.js-1.4.10.tgz",
|
||||||
"integrity": "sha512-i2BuNh7C7sd+wpW1V9p+P37KKCWNc6Ph/3BiPr+8nfJ7eZdtQQvSQUn2QwKU+7Fvc7b5BpS/lM6RJ3LUf+XbWg=="
|
"integrity": "sha512-wAVSj4Fm2MqOHy5+BlYnlKxXvJlv5IuZHjlzHu18QmjRzSDFQiUDWdHs5+NsFMQrgKEBwuWDcyvaMC9dUzJ5Uw=="
|
||||||
},
|
},
|
||||||
"ieee754": {
|
"ieee754": {
|
||||||
"version": "1.2.1",
|
"version": "1.2.1",
|
||||||
|
@ -3491,9 +3370,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tinymce": {
|
"tinymce": {
|
||||||
"version": "6.4.2",
|
"version": "6.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/tinymce/-/tinymce-6.4.2.tgz",
|
"resolved": "https://registry.npmjs.org/tinymce/-/tinymce-6.6.0.tgz",
|
||||||
"integrity": "sha512-te+4c8PoAwTKPMBQtMQehnSZlOO9Ay5tDgaRFJKBehYb6SlX2PYZ0v3oe/cmiv5EfqdwZLkEMXk2MNOeApZZLg=="
|
"integrity": "sha512-b9Mb7z8ryFOwLm8WCmlpwzdgOt1xD1u5Jjdh68B4QjkIyTLyHRBsfsrbiCUGonnVTymDlkexPkaP8sj24zexKQ=="
|
||||||
},
|
},
|
||||||
"tinymce-langs": {
|
"tinymce-langs": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
|
@ -3644,9 +3523,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"videojs-contrib-ads": {
|
"videojs-contrib-ads": {
|
||||||
"version": "7.2.0",
|
"version": "7.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/videojs-contrib-ads/-/videojs-contrib-ads-7.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/videojs-contrib-ads/-/videojs-contrib-ads-7.3.2.tgz",
|
||||||
"integrity": "sha512-5DAO8BpD4mm/xKCGm4JhmIkjYOC+TByiO0XXInoc981Gr71xcFpO2wxPHMFrojhKROmYGWnYKcLsKNMkvYOWHg==",
|
"integrity": "sha512-O5zSqP9GePr8XDUgCKQoRdDr5dUX5GEbNx7s2R7LC/Pxn8L10x3RNCrijzO56bli7Vr5wAlTJgAk1dR5lqQ44A==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"global": "^4.3.2"
|
"global": "^4.3.2"
|
||||||
}
|
}
|
||||||
|
@ -3665,120 +3544,14 @@
|
||||||
"integrity": "sha512-X1LuPfLZPisPLrANIAKCknZbZu5obVM/ylfd1CN+SsCmPZQ3UMDPcvLTpPBJxcBuTpHQq2MO1QCFt7p8spnZ/w=="
|
"integrity": "sha512-X1LuPfLZPisPLrANIAKCknZbZu5obVM/ylfd1CN+SsCmPZQ3UMDPcvLTpPBJxcBuTpHQq2MO1QCFt7p8spnZ/w=="
|
||||||
},
|
},
|
||||||
"videojs-ima": {
|
"videojs-ima": {
|
||||||
"version": "2.1.0",
|
"version": "2.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/videojs-ima/-/videojs-ima-2.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/videojs-ima/-/videojs-ima-2.2.0.tgz",
|
||||||
"integrity": "sha512-Zb+J4by0d4FbserGOiSbdNo0U4vXSDuiPVCKFMksbaj4DO3mC8IpmvZ9Vci3tUwOhb/ladmUdhif9euSwq92Sw==",
|
"integrity": "sha512-VKg7mZsaiW89ko2Sjfz/sDcCbCTjj2OAkg8CakvCs9ZiVg20g6QYVtEWj249V/HTm0/1X01GEPk9hnIrRzgd+A==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@hapi/cryptiles": "^5.1.0",
|
"@hapi/cryptiles": "^5.1.0",
|
||||||
"can-autoplay": "^3.0.2",
|
"can-autoplay": "^3.0.2",
|
||||||
"extend": ">=3.0.2",
|
"extend": ">=3.0.2",
|
||||||
"videojs-contrib-ads": "^6.9.0"
|
"videojs-contrib-ads": "^6.9.0 || ^7"
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@videojs/http-streaming": {
|
|
||||||
"version": "2.16.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@videojs/http-streaming/-/http-streaming-2.16.2.tgz",
|
|
||||||
"integrity": "sha512-etPTUdCFu7gUWc+1XcbiPr+lrhOcBu3rV5OL1M+3PDW89zskScAkkcdqYzP4pFodBPye/ydamQoTDScOnElw5A==",
|
|
||||||
"requires": {
|
|
||||||
"@babel/runtime": "^7.12.5",
|
|
||||||
"@videojs/vhs-utils": "3.0.5",
|
|
||||||
"aes-decrypter": "3.1.3",
|
|
||||||
"global": "^4.4.0",
|
|
||||||
"m3u8-parser": "4.8.0",
|
|
||||||
"mpd-parser": "^0.22.1",
|
|
||||||
"mux.js": "6.0.1",
|
|
||||||
"video.js": "^6 || ^7"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"video.js": {
|
|
||||||
"version": "7.21.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/video.js/-/video.js-7.21.4.tgz",
|
|
||||||
"integrity": "sha512-R5e57M/5uqxQMQpFpybNbd8GtiRwFJPqkHjrhv0QTJ2tqnesbjETbck5kU5dhFr1FevsJRFhjBG4hAnvRGnXbw==",
|
|
||||||
"requires": {
|
|
||||||
"@babel/runtime": "^7.12.5",
|
|
||||||
"@videojs/http-streaming": "2.16.2",
|
|
||||||
"@videojs/vhs-utils": "^3.0.4",
|
|
||||||
"@videojs/xhr": "2.6.0",
|
|
||||||
"aes-decrypter": "3.1.3",
|
|
||||||
"global": "^4.4.0",
|
|
||||||
"keycode": "^2.2.0",
|
|
||||||
"m3u8-parser": "4.8.0",
|
|
||||||
"mpd-parser": "0.22.1",
|
|
||||||
"mux.js": "6.0.1",
|
|
||||||
"safe-json-parse": "4.0.0",
|
|
||||||
"videojs-font": "3.2.0",
|
|
||||||
"videojs-vtt.js": "^0.15.4"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"aes-decrypter": {
|
|
||||||
"version": "3.1.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/aes-decrypter/-/aes-decrypter-3.1.3.tgz",
|
|
||||||
"integrity": "sha512-VkG9g4BbhMBy+N5/XodDeV6F02chEk9IpgRTq/0bS80y4dzy79VH2Gtms02VXomf3HmyRe3yyJYkJ990ns+d6A==",
|
|
||||||
"requires": {
|
|
||||||
"@babel/runtime": "^7.12.5",
|
|
||||||
"@videojs/vhs-utils": "^3.0.5",
|
|
||||||
"global": "^4.4.0",
|
|
||||||
"pkcs7": "^1.0.4"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"mpd-parser": {
|
|
||||||
"version": "0.22.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/mpd-parser/-/mpd-parser-0.22.1.tgz",
|
|
||||||
"integrity": "sha512-fwBebvpyPUU8bOzvhX0VQZgSohncbgYwUyJJoTSNpmy7ccD2ryiCvM7oRkn/xQH5cv73/xU7rJSNCLjdGFor0Q==",
|
|
||||||
"requires": {
|
|
||||||
"@babel/runtime": "^7.12.5",
|
|
||||||
"@videojs/vhs-utils": "^3.0.5",
|
|
||||||
"@xmldom/xmldom": "^0.8.3",
|
|
||||||
"global": "^4.4.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"mux.js": {
|
|
||||||
"version": "6.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/mux.js/-/mux.js-6.0.1.tgz",
|
|
||||||
"integrity": "sha512-22CHb59rH8pWGcPGW5Og7JngJ9s+z4XuSlYvnxhLuc58cA1WqGDQPzuG8I+sPm1/p0CdgpzVTaKW408k5DNn8w==",
|
|
||||||
"requires": {
|
|
||||||
"@babel/runtime": "^7.11.2",
|
|
||||||
"global": "^4.4.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"videojs-contrib-ads": {
|
|
||||||
"version": "6.9.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/videojs-contrib-ads/-/videojs-contrib-ads-6.9.0.tgz",
|
|
||||||
"integrity": "sha512-nzKz+jhCGMTYffSNVYrmp9p70s05v6jUMOY3Z7DpVk3iFrWK4Zi/BIkokDWrMoHpKjdmCdKzfJVBT+CrUj6Spw==",
|
|
||||||
"requires": {
|
|
||||||
"global": "^4.3.2",
|
|
||||||
"video.js": "^6 || ^7"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"video.js": {
|
|
||||||
"version": "7.21.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/video.js/-/video.js-7.21.4.tgz",
|
|
||||||
"integrity": "sha512-R5e57M/5uqxQMQpFpybNbd8GtiRwFJPqkHjrhv0QTJ2tqnesbjETbck5kU5dhFr1FevsJRFhjBG4hAnvRGnXbw==",
|
|
||||||
"requires": {
|
|
||||||
"@babel/runtime": "^7.12.5",
|
|
||||||
"@videojs/http-streaming": "2.16.2",
|
|
||||||
"@videojs/vhs-utils": "^3.0.4",
|
|
||||||
"@videojs/xhr": "2.6.0",
|
|
||||||
"aes-decrypter": "3.1.3",
|
|
||||||
"global": "^4.4.0",
|
|
||||||
"keycode": "^2.2.0",
|
|
||||||
"m3u8-parser": "4.8.0",
|
|
||||||
"mpd-parser": "0.22.1",
|
|
||||||
"mux.js": "6.0.1",
|
|
||||||
"safe-json-parse": "4.0.0",
|
|
||||||
"videojs-font": "3.2.0",
|
|
||||||
"videojs-vtt.js": "^0.15.4"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"videojs-font": {
|
|
||||||
"version": "3.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/videojs-font/-/videojs-font-3.2.0.tgz",
|
|
||||||
"integrity": "sha512-g8vHMKK2/JGorSfqAZQUmYYNnXmfec4MLhwtEFS+mMs2IDY398GLysy6BH6K+aS1KMNu/xWZ8Sue/X/mdQPliA=="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"videojs-landscape-fullscreen": {
|
"videojs-landscape-fullscreen": {
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
"flickity": "^3.0.0",
|
"flickity": "^3.0.0",
|
||||||
"flickity-bg-lazyload": "^2.0.0",
|
"flickity-bg-lazyload": "^2.0.0",
|
||||||
"fontawesome-free": "^1.0.4",
|
"fontawesome-free": "^1.0.4",
|
||||||
"hls.js": "^1.4.9",
|
"hls.js": "^1.4.10",
|
||||||
"infinite-scroll": "^4.0.1",
|
"infinite-scroll": "^4.0.1",
|
||||||
"inputmask": "^5.0.8",
|
"inputmask": "^5.0.8",
|
||||||
"jquery": "^3.7.0",
|
"jquery": "^3.7.0",
|
||||||
|
@ -27,13 +27,13 @@
|
||||||
"p2p-media-loader-hlsjs": "^0.6.2",
|
"p2p-media-loader-hlsjs": "^0.6.2",
|
||||||
"pouchdb": "^8.0.0",
|
"pouchdb": "^8.0.0",
|
||||||
"sweetalert": "^2.1.2",
|
"sweetalert": "^2.1.2",
|
||||||
"tinymce": "^6.4.2",
|
"tinymce": "^6.6.0",
|
||||||
"tinymce-langs": "^1.0.0",
|
"tinymce-langs": "^1.0.0",
|
||||||
"video.js": "^8.3.0",
|
"video.js": "^8.3.0",
|
||||||
"videojs-contrib-ads": "^7.2.0",
|
"videojs-contrib-ads": "^7.3.2",
|
||||||
"videojs-contrib-quality-levels": "^4.0.0",
|
"videojs-contrib-quality-levels": "^4.0.0",
|
||||||
"videojs-font": "^4.1.0",
|
"videojs-font": "^4.1.0",
|
||||||
"videojs-ima": "^2.1.0",
|
"videojs-ima": "^2.2.0",
|
||||||
"videojs-landscape-fullscreen": "^11.1111.0",
|
"videojs-landscape-fullscreen": "^11.1111.0",
|
||||||
"videojs-overlay": "^3.1.0",
|
"videojs-overlay": "^3.1.0",
|
||||||
"videojs-playlist": "^5.1.0",
|
"videojs-playlist": "^5.1.0",
|
||||||
|
|
|
@ -245,12 +245,12 @@ class ADs extends PluginAbstract
|
||||||
{
|
{
|
||||||
global $global;
|
global $global;
|
||||||
if (isBot()) {
|
if (isBot()) {
|
||||||
return false;
|
return array();
|
||||||
}
|
}
|
||||||
$paths = self::getAdsPath($type, $is_regular_user);
|
$paths = self::getAdsPath($type, $is_regular_user);
|
||||||
|
|
||||||
if (empty($paths)) {
|
if (empty($paths)) {
|
||||||
return false;
|
return array();
|
||||||
}
|
}
|
||||||
|
|
||||||
$files = _glob($paths['path'], '/.png$/');
|
$files = _glob($paths['path'], '/.png$/');
|
||||||
|
@ -280,10 +280,8 @@ class ADs extends PluginAbstract
|
||||||
{
|
{
|
||||||
global $global;
|
global $global;
|
||||||
|
|
||||||
$emptyAd = ['adCode' => '', 'label' => '', 'paths' => array()];
|
|
||||||
|
|
||||||
if (isBot()) {
|
if (isBot()) {
|
||||||
return $emptyAd;
|
return ['adCode' => '', 'label' => '', 'paths' => array()];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($videos_id)) {
|
if (empty($videos_id)) {
|
||||||
|
@ -298,9 +296,15 @@ class ADs extends PluginAbstract
|
||||||
$users_id = 0;
|
$users_id = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return self::getAdsFromUsersId($type, $users_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getAdsFromUsersId($type, $users_id)
|
||||||
|
{
|
||||||
$ad = AVideoPlugin::getObjectDataIfEnabled('ADs');
|
$ad = AVideoPlugin::getObjectDataIfEnabled('ADs');
|
||||||
if(empty($ad->$type)){
|
if(empty($ad->$type)){
|
||||||
return $emptyAd;
|
return ['adCode' => '', 'label' => '', 'paths' => array()];
|
||||||
}
|
}
|
||||||
$label = '';
|
$label = '';
|
||||||
eval("\$label = \$ad->{$type}Label;");
|
eval("\$label = \$ad->{$type}Label;");
|
||||||
|
@ -325,7 +329,6 @@ class ADs extends PluginAbstract
|
||||||
return ['adCode' => $adCode, 'label' => $label, 'paths' => $array['paths']];
|
return ['adCode' => $adCode, 'label' => $label, 'paths' => $array['paths']];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static function getAdsCode($type)
|
public static function getAdsCode($type)
|
||||||
{
|
{
|
||||||
global $global;
|
global $global;
|
||||||
|
@ -349,6 +352,34 @@ class ADs extends PluginAbstract
|
||||||
return $adCode;
|
return $adCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function getAdsCodeReason($type)
|
||||||
|
{
|
||||||
|
$reasons = array();
|
||||||
|
if (isBot()) {
|
||||||
|
$reasons[] = 'Is a bot';
|
||||||
|
}
|
||||||
|
$videos_id = 0;
|
||||||
|
if (empty($videos_id)) {
|
||||||
|
$videos_id = getVideos_id();
|
||||||
|
}
|
||||||
|
$reasons[] = 'videos_id='.$videos_id;
|
||||||
|
$ad = AVideoPlugin::getObjectDataIfEnabled('ADs');
|
||||||
|
if (!empty($ad)) {
|
||||||
|
if (isMobile()) {
|
||||||
|
$type = $type . 'Mobile';
|
||||||
|
}
|
||||||
|
$adC = self::getAdsFromVideosId($type, $videos_id);
|
||||||
|
$reasons[] = 'type='.$type;
|
||||||
|
$reasons[] = 'label='.$adC['label'];
|
||||||
|
if(empty($adC['adCode'])){
|
||||||
|
$reasons[] = 'adCode is empty';
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
$reasons[] = 'ADs plugin disabled';
|
||||||
|
}
|
||||||
|
return $reasons;
|
||||||
|
}
|
||||||
|
|
||||||
public static function getSize($type)
|
public static function getSize($type)
|
||||||
{
|
{
|
||||||
$obj = AVideoPlugin::getObjectData("ADs");
|
$obj = AVideoPlugin::getObjectData("ADs");
|
||||||
|
|
|
@ -3,28 +3,34 @@
|
||||||
global $global;
|
global $global;
|
||||||
require_once $global['systemRootPath'] . 'plugin/Plugin.abstract.php';
|
require_once $global['systemRootPath'] . 'plugin/Plugin.abstract.php';
|
||||||
|
|
||||||
class API extends PluginAbstract {
|
class API extends PluginAbstract
|
||||||
|
{
|
||||||
|
|
||||||
public function getTags() {
|
public function getTags()
|
||||||
|
{
|
||||||
return [
|
return [
|
||||||
PluginTags::$FREE,
|
PluginTags::$FREE,
|
||||||
PluginTags::$MOBILE,
|
PluginTags::$MOBILE,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getDescription() {
|
public function getDescription()
|
||||||
|
{
|
||||||
return "Handle APIs for third party Applications";
|
return "Handle APIs for third party Applications";
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getName() {
|
public function getName()
|
||||||
|
{
|
||||||
return "API";
|
return "API";
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getUUID() {
|
public function getUUID()
|
||||||
|
{
|
||||||
return "1apicbec-91db-4357-bb10-ee08b0913778";
|
return "1apicbec-91db-4357-bb10-ee08b0913778";
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function addRowInfo($obj) {
|
private static function addRowInfo($obj)
|
||||||
|
{
|
||||||
if (!isset($obj->current)) {
|
if (!isset($obj->current)) {
|
||||||
$obj->current = getCurrentPage();
|
$obj->current = getCurrentPage();
|
||||||
}
|
}
|
||||||
|
@ -48,20 +54,23 @@ class API extends PluginAbstract {
|
||||||
return $obj;
|
return $obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getEmptyDataObject() {
|
public function getEmptyDataObject()
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
$obj = new stdClass();
|
$obj = new stdClass();
|
||||||
$obj->APISecret = md5($global['salt'] . $global['systemRootPath'] . 'API');
|
$obj->APISecret = md5($global['salt'] . $global['systemRootPath'] . 'API');
|
||||||
return $obj;
|
return $obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getPluginMenu() {
|
public function getPluginMenu()
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
$fileAPIName = $global['systemRootPath'] . 'plugin/API/pluginMenu.html';
|
$fileAPIName = $global['systemRootPath'] . 'plugin/API/pluginMenu.html';
|
||||||
return file_get_contents($fileAPIName);
|
return file_get_contents($fileAPIName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function set($parameters) {
|
public function set($parameters)
|
||||||
|
{
|
||||||
if (empty($parameters['APIName'])) {
|
if (empty($parameters['APIName'])) {
|
||||||
$object = new ApiObject("Parameter APIName can not be empty (set)");
|
$object = new ApiObject("Parameter APIName can not be empty (set)");
|
||||||
} else {
|
} else {
|
||||||
|
@ -96,7 +105,8 @@ class API extends PluginAbstract {
|
||||||
return $object;
|
return $object;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function get($parameters) {
|
public function get($parameters)
|
||||||
|
{
|
||||||
if (empty($parameters['APIName'])) {
|
if (empty($parameters['APIName'])) {
|
||||||
$object = new ApiObject("Parameter APIName can not be empty (get)");
|
$object = new ApiObject("Parameter APIName can not be empty (get)");
|
||||||
} else {
|
} else {
|
||||||
|
@ -131,7 +141,8 @@ class API extends PluginAbstract {
|
||||||
return $object;
|
return $object;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function startResponseObject($parameters) {
|
private function startResponseObject($parameters)
|
||||||
|
{
|
||||||
$obj = new stdClass();
|
$obj = new stdClass();
|
||||||
if (empty($parameters['sort']) && !empty($parameters['order'][0]['dir'])) {
|
if (empty($parameters['sort']) && !empty($parameters['order'][0]['dir'])) {
|
||||||
$index = intval($parameters['order'][0]['column']);
|
$index = intval($parameters['order'][0]['column']);
|
||||||
|
@ -148,7 +159,8 @@ class API extends PluginAbstract {
|
||||||
return $obj;
|
return $obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getToPost() {
|
private function getToPost()
|
||||||
|
{
|
||||||
foreach ($_GET as $key => $value) {
|
foreach ($_GET as $key => $value) {
|
||||||
$_POST[$key] = $value;
|
$_POST[$key] = $value;
|
||||||
}
|
}
|
||||||
|
@ -161,7 +173,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&rowCount=3&APISecret={APISecret}
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&rowCount=3&APISecret={APISecret}
|
||||||
* @return \ApiObject
|
* @return \ApiObject
|
||||||
*/
|
*/
|
||||||
public function get_api_plugin_parameters($parameters) {
|
public function get_api_plugin_parameters($parameters)
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
$name = "get_api_plugin_parameters" . json_encode($parameters);
|
$name = "get_api_plugin_parameters" . json_encode($parameters);
|
||||||
$obj = ObjectYPT::getCacheGlobal($name, 3600);
|
$obj = ObjectYPT::getCacheGlobal($name, 3600);
|
||||||
|
@ -181,13 +194,79 @@ class API extends PluginAbstract {
|
||||||
return new ApiObject("", false, $obj);
|
return new ApiObject("", false, $obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get ads information for a specific video, user, or live stream.
|
||||||
|
*
|
||||||
|
* @param array $parameters
|
||||||
|
* 'users_id' (optional) The users_id for which you want to retrieve ads information. If provided,
|
||||||
|
* ads specific to the user will be retrieved. If no ads are set for the user, global ads will be returned.
|
||||||
|
* 'videos_id' (optional) The videos_id for which you want to retrieve the users_id.
|
||||||
|
* 'live_key' (optional) The live_key for which you want to retrieve the users_id
|
||||||
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&users_id=1
|
||||||
|
* @return array|ApiObject An array containing the ads information or an ApiObject with an error message.
|
||||||
|
*/
|
||||||
|
public function get_api_adsInfo($parameters)
|
||||||
|
{
|
||||||
|
|
||||||
|
$ads = AVideoPlugin::loadPluginIfEnabled('ADs');
|
||||||
|
if (empty($ads)) {
|
||||||
|
return new ApiObject("ADs Plugin is disabled");
|
||||||
|
}
|
||||||
|
$users_id = 0;
|
||||||
|
if (!empty($parameters['users_id'])) {
|
||||||
|
$users_id = $parameters['users_id'];
|
||||||
|
} else if (!empty($parameters['videos_id'])) {
|
||||||
|
$users_id = Video::getOwner($parameters['videos_id']);
|
||||||
|
} else if (!empty($parameters['live_key']) && AVideoPlugin::isEnabledByName('Live')) {
|
||||||
|
$row = LiveTransmition::keyExists($parameters['live_key']);
|
||||||
|
$users_id = $row['users_id'];
|
||||||
|
}
|
||||||
|
$ad = AVideoPlugin::getObjectDataIfEnabled('ADs');
|
||||||
|
$array = array('users_id' => $users_id, 'ads' => array());
|
||||||
|
foreach (ADs::$AdsPositions as $key => $value) {
|
||||||
|
$type = $value[0];
|
||||||
|
$desktopGlobal = false;
|
||||||
|
$mobileGlobal = false;
|
||||||
|
if (empty($desktop)) {
|
||||||
|
$desktopGlobal = true;
|
||||||
|
$desktop = ADs::getAds($type, false);
|
||||||
|
}
|
||||||
|
if (empty($mobile)) {
|
||||||
|
$mobileGlobal = true;
|
||||||
|
$mobile = ADs::getAds($type . 'Mobile', false);
|
||||||
|
}
|
||||||
|
|
||||||
|
$desktopURLs = array();
|
||||||
|
foreach ($desktop as $item) {
|
||||||
|
$desktopURLs[] = $item['imageURL'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$mobileURLs = array();
|
||||||
|
foreach ($mobile as $item) {
|
||||||
|
$mobileURLs[] = $item['imageURL'];
|
||||||
|
}
|
||||||
|
$label = '';
|
||||||
|
eval("\$label = \$ad->{$type}Label;");
|
||||||
|
$array['ads'][] = array(
|
||||||
|
'label' => $label,
|
||||||
|
'type' => $type,
|
||||||
|
'desktop' => array('isValid'=>!empty($desktopURLs), 'isGlobal'=>$desktopGlobal, 'urls'=>$desktopURLs),
|
||||||
|
'mobile' => array('isValid'=>!empty($mobileURLs), 'isGlobal'=>$mobileGlobal, 'urls'=>$mobileURLs)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return new ApiObject("", false, $array);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $parameters
|
* @param array $parameters
|
||||||
* Returns the site unique ID
|
* Returns the site unique ID
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}
|
||||||
* @return \ApiObject
|
* @return \ApiObject
|
||||||
*/
|
*/
|
||||||
public function get_api_id($parameters) {
|
public function get_api_id($parameters)
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
$obj = $this->startResponseObject($parameters);
|
$obj = $this->startResponseObject($parameters);
|
||||||
$obj->id = getPlatformId();
|
$obj->id = getPlatformId();
|
||||||
|
@ -204,7 +283,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&userAgent=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F89.0.4389.82+Safari%2F537.36
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&userAgent=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F89.0.4389.82+Safari%2F537.36
|
||||||
* @return \ApiObject
|
* @return \ApiObject
|
||||||
*/
|
*/
|
||||||
public function get_api_is_mobile($parameters) {
|
public function get_api_is_mobile($parameters)
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
$obj = $this->startResponseObject($parameters);
|
$obj = $this->startResponseObject($parameters);
|
||||||
if (!empty($_REQUEST['httpHeaders'])) {
|
if (!empty($_REQUEST['httpHeaders'])) {
|
||||||
|
@ -232,7 +312,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&rowCount=3¤t=1&sort[created]=DESC
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&rowCount=3¤t=1&sort[created]=DESC
|
||||||
* @return \ApiObject
|
* @return \ApiObject
|
||||||
*/
|
*/
|
||||||
public function get_api_category($parameters) {
|
public function get_api_category($parameters)
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
require_once $global['systemRootPath'] . 'objects/category.php';
|
require_once $global['systemRootPath'] . 'objects/category.php';
|
||||||
$obj = $this->startResponseObject($parameters);
|
$obj = $this->startResponseObject($parameters);
|
||||||
|
@ -292,7 +373,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&playlists_id=1&index=2&APISecret={APISecret}
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&playlists_id=1&index=2&APISecret={APISecret}
|
||||||
* @return \ApiObject
|
* @return \ApiObject
|
||||||
*/
|
*/
|
||||||
public function get_api_video_from_program($parameters) {
|
public function get_api_video_from_program($parameters)
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
$playlists = AVideoPlugin::loadPlugin("PlayLists");
|
$playlists = AVideoPlugin::loadPlugin("PlayLists");
|
||||||
if (empty($parameters['playlists_id'])) {
|
if (empty($parameters['playlists_id'])) {
|
||||||
|
@ -345,7 +427,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&playlists_id=1&index=2&APISecret={APISecret}
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&playlists_id=1&index=2&APISecret={APISecret}
|
||||||
* @return \ApiObject
|
* @return \ApiObject
|
||||||
*/
|
*/
|
||||||
public function get_api_audio_from_program($parameters) {
|
public function get_api_audio_from_program($parameters)
|
||||||
|
{
|
||||||
$parameters['audioOnly'] = 1;
|
$parameters['audioOnly'] = 1;
|
||||||
return $this->get_api_video_from_program($parameters);
|
return $this->get_api_video_from_program($parameters);
|
||||||
}
|
}
|
||||||
|
@ -355,7 +438,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}
|
||||||
* @return \ApiObject
|
* @return \ApiObject
|
||||||
*/
|
*/
|
||||||
public function get_api_suggested_programs($parameters) {
|
public function get_api_suggested_programs($parameters)
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
$playlists = AVideoPlugin::loadPlugin("PlayLists");
|
$playlists = AVideoPlugin::loadPlugin("PlayLists");
|
||||||
//var_dump($videos);exit;
|
//var_dump($videos);exit;
|
||||||
|
@ -398,7 +482,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}
|
||||||
* @return \ApiObject
|
* @return \ApiObject
|
||||||
*/
|
*/
|
||||||
public function get_api_tags($parameters) {
|
public function get_api_tags($parameters)
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
$vtags = AVideoPlugin::loadPluginIfEnabled("VideoTags");
|
$vtags = AVideoPlugin::loadPluginIfEnabled("VideoTags");
|
||||||
|
|
||||||
|
@ -433,7 +518,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=1&APISecret={APISecret}
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=1&APISecret={APISecret}
|
||||||
* @return \ApiObject
|
* @return \ApiObject
|
||||||
*/
|
*/
|
||||||
public function get_api_video_file($parameters) {
|
public function get_api_video_file($parameters)
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
$obj = $this->startResponseObject($parameters);
|
$obj = $this->startResponseObject($parameters);
|
||||||
$obj->videos_id = $parameters['videos_id'];
|
$obj->videos_id = $parameters['videos_id'];
|
||||||
|
@ -458,7 +544,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}
|
||||||
* @return \ApiObject
|
* @return \ApiObject
|
||||||
*/
|
*/
|
||||||
public function get_api_user_can_watch_video($parameters) {
|
public function get_api_user_can_watch_video($parameters)
|
||||||
|
{
|
||||||
|
|
||||||
$obj = new stdClass();
|
$obj = new stdClass();
|
||||||
$obj->users_id = intval($parameters['users_id']);
|
$obj->users_id = intval($parameters['users_id']);
|
||||||
|
@ -489,7 +576,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}
|
||||||
* @return \ApiObject
|
* @return \ApiObject
|
||||||
*/
|
*/
|
||||||
public function get_api_video_password_is_correct($parameters) {
|
public function get_api_video_password_is_correct($parameters)
|
||||||
|
{
|
||||||
|
|
||||||
$obj = new stdClass();
|
$obj = new stdClass();
|
||||||
$obj->videos_id = intval($parameters['videos_id']);
|
$obj->videos_id = intval($parameters['videos_id']);
|
||||||
|
@ -519,7 +607,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=2
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=2
|
||||||
* @return \ApiObject
|
* @return \ApiObject
|
||||||
*/
|
*/
|
||||||
public function get_api_ppv_plans($parameters) {
|
public function get_api_ppv_plans($parameters)
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
$obj = new stdClass();
|
$obj = new stdClass();
|
||||||
$error = true;
|
$error = true;
|
||||||
|
@ -561,7 +650,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=2&plans_id=4
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=2&plans_id=4
|
||||||
* @return \ApiObject
|
* @return \ApiObject
|
||||||
*/
|
*/
|
||||||
public function set_api_ppv_buy($parameters) {
|
public function set_api_ppv_buy($parameters)
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
$obj = new stdClass();
|
$obj = new stdClass();
|
||||||
$error = true;
|
$error = true;
|
||||||
|
@ -614,7 +704,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=2
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=2
|
||||||
* @return \ApiObject
|
* @return \ApiObject
|
||||||
*/
|
*/
|
||||||
public function get_api_subscription_plans($parameters) {
|
public function get_api_subscription_plans($parameters)
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
$obj = new stdClass();
|
$obj = new stdClass();
|
||||||
$error = true;
|
$error = true;
|
||||||
|
@ -653,7 +744,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&plans_id=2
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&plans_id=2
|
||||||
* @return \ApiObject
|
* @return \ApiObject
|
||||||
*/
|
*/
|
||||||
public function set_api_subscription_buy($parameters) {
|
public function set_api_subscription_buy($parameters)
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
$obj = new stdClass();
|
$obj = new stdClass();
|
||||||
$error = true;
|
$error = true;
|
||||||
|
@ -723,7 +815,8 @@ class API extends PluginAbstract {
|
||||||
* @example MostWatched ----> {webSiteRootURL}plugin/API/get.json.php?APIName={APIName}&rowCount=10&sort[views_count]=desc
|
* @example MostWatched ----> {webSiteRootURL}plugin/API/get.json.php?APIName={APIName}&rowCount=10&sort[views_count]=desc
|
||||||
* @return \ApiObject
|
* @return \ApiObject
|
||||||
*/
|
*/
|
||||||
public function get_api_video($parameters) {
|
public function get_api_video($parameters)
|
||||||
|
{
|
||||||
$start = microtime(true);
|
$start = microtime(true);
|
||||||
|
|
||||||
$cacheParameters = array('noRelated', 'APIName', 'catName', 'rowCount', 'APISecret', 'sort', 'searchPhrase', 'current', 'tags_id', 'channelName', 'videoType', 'is_serie', 'user', 'videos_id', 'playlist');
|
$cacheParameters = array('noRelated', 'APIName', 'catName', 'rowCount', 'APISecret', 'sort', 'searchPhrase', 'current', 'tags_id', 'channelName', 'videoType', 'is_serie', 'user', 'videos_id', 'playlist');
|
||||||
|
@ -825,6 +918,7 @@ class API extends PluginAbstract {
|
||||||
$rows[$key]['videos'] = Video::getVideosPaths($value['filename'], true);
|
$rows[$key]['videos'] = Video::getVideosPaths($value['filename'], true);
|
||||||
} else {
|
} else {
|
||||||
$extension = getExtension($rows[$key]['videoLink']);
|
$extension = getExtension($rows[$key]['videoLink']);
|
||||||
|
$rows[$key]['videoLink'] = modifyURL($rows[$key]['videoLink']);
|
||||||
if ($extension == 'mp4') {
|
if ($extension == 'mp4') {
|
||||||
$rows[$key]['videos'] = array(
|
$rows[$key]['videos'] = array(
|
||||||
'mp4' => array(
|
'mp4' => array(
|
||||||
|
@ -864,8 +958,7 @@ class API extends PluginAbstract {
|
||||||
$rows[$key]['mp3'] = convertVideoToMP3FileIfNotExists($value['id']);
|
$rows[$key]['mp3'] = convertVideoToMP3FileIfNotExists($value['id']);
|
||||||
$rows[$key]['category_name'] = $value['category'];
|
$rows[$key]['category_name'] = $value['category'];
|
||||||
$rows[$key]['category'] = array('name' => $rows[$key]['category_name']);
|
$rows[$key]['category'] = array('name' => $rows[$key]['category_name']);
|
||||||
$rows[$key]['channel_name'] = User::_getChannelName($rows[$key]['users_id']);
|
$rows[$key]['channel_name'] = User::_getChannelName($rows[$key]['users_id']);;
|
||||||
;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (User::isLogged()) {
|
if (User::isLogged()) {
|
||||||
|
@ -968,7 +1061,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&user=admin&pass=f321d14cdeeb7cded7489f504fa8862b
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&user=admin&pass=f321d14cdeeb7cded7489f504fa8862b
|
||||||
* @return \ApiObject
|
* @return \ApiObject
|
||||||
*/
|
*/
|
||||||
public function set_api_video_save($parameters) {
|
public function set_api_video_save($parameters)
|
||||||
|
{
|
||||||
global $advancedCustomUser;
|
global $advancedCustomUser;
|
||||||
|
|
||||||
// Check if parameters array is not empty
|
// Check if parameters array is not empty
|
||||||
|
@ -1056,7 +1150,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&APISecret={APISecret}
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&APISecret={APISecret}
|
||||||
* @return \ApiObject
|
* @return \ApiObject
|
||||||
*/
|
*/
|
||||||
public function get_api_videosCount($parameters) {
|
public function get_api_videosCount($parameters)
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
require_once $global['systemRootPath'] . 'objects/video.php';
|
require_once $global['systemRootPath'] . 'objects/video.php';
|
||||||
$obj = $this->startResponseObject($parameters);
|
$obj = $this->startResponseObject($parameters);
|
||||||
|
@ -1080,7 +1175,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=1&user=admin&pass=123&APISecret={APISecret}
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=1&user=admin&pass=123&APISecret={APISecret}
|
||||||
* @return \ApiObject
|
* @return \ApiObject
|
||||||
*/
|
*/
|
||||||
public function get_api_video_delete($parameters) {
|
public function get_api_video_delete($parameters)
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
require_once $global['systemRootPath'] . 'objects/video.php';
|
require_once $global['systemRootPath'] . 'objects/video.php';
|
||||||
$obj = $this->startResponseObject($parameters);
|
$obj = $this->startResponseObject($parameters);
|
||||||
|
@ -1113,7 +1209,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=1&user=admin&pass=123&APISecret={APISecret}
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=1&user=admin&pass=123&APISecret={APISecret}
|
||||||
* @return \ApiObject
|
* @return \ApiObject
|
||||||
*/
|
*/
|
||||||
public function set_api_comment($parameters) {
|
public function set_api_comment($parameters)
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
$obj = $this->startResponseObject($parameters);
|
$obj = $this->startResponseObject($parameters);
|
||||||
if (!empty($parameters['videos_id'])) {
|
if (!empty($parameters['videos_id'])) {
|
||||||
|
@ -1155,7 +1252,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=1&user=admin&pass=123&APISecret={APISecret}
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=1&user=admin&pass=123&APISecret={APISecret}
|
||||||
* @return \ApiObject
|
* @return \ApiObject
|
||||||
*/
|
*/
|
||||||
public function get_api_comment($parameters) {
|
public function get_api_comment($parameters)
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
$obj = $this->startResponseObject($parameters);
|
$obj = $this->startResponseObject($parameters);
|
||||||
if (!empty($parameters['videos_id'])) {
|
if (!empty($parameters['videos_id'])) {
|
||||||
|
@ -1188,7 +1286,8 @@ class API extends PluginAbstract {
|
||||||
* 'pass' password of the user that will like the video
|
* 'pass' password of the user that will like the video
|
||||||
* @return \ApiObject
|
* @return \ApiObject
|
||||||
*/
|
*/
|
||||||
public function get_api_live_schedule($parameters) {
|
public function get_api_live_schedule($parameters)
|
||||||
|
{
|
||||||
if (!User::canStream()) {
|
if (!User::canStream()) {
|
||||||
return new ApiObject("You cannot stream");
|
return new ApiObject("You cannot stream");
|
||||||
} else {
|
} else {
|
||||||
|
@ -1216,7 +1315,8 @@ class API extends PluginAbstract {
|
||||||
* 'pass' password of the user that will like the video
|
* 'pass' password of the user that will like the video
|
||||||
* @return \ApiObject
|
* @return \ApiObject
|
||||||
*/
|
*/
|
||||||
public function set_api_live_schedule_delete($parameters) {
|
public function set_api_live_schedule_delete($parameters)
|
||||||
|
{
|
||||||
if (!User::canStream()) {
|
if (!User::canStream()) {
|
||||||
return new ApiObject("You cannot stream");
|
return new ApiObject("You cannot stream");
|
||||||
} else {
|
} else {
|
||||||
|
@ -1252,7 +1352,8 @@ class API extends PluginAbstract {
|
||||||
* 'pass' password of the user that will like the video
|
* 'pass' password of the user that will like the video
|
||||||
* @return \ApiObject
|
* @return \ApiObject
|
||||||
*/
|
*/
|
||||||
public function set_api_live_schedule($parameters) {
|
public function set_api_live_schedule($parameters)
|
||||||
|
{
|
||||||
$live_schedule_id = 0;
|
$live_schedule_id = 0;
|
||||||
$obj = new stdClass();
|
$obj = new stdClass();
|
||||||
if (!User::canStream()) {
|
if (!User::canStream()) {
|
||||||
|
@ -1327,7 +1428,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}
|
||||||
* @return \ApiObject
|
* @return \ApiObject
|
||||||
*/
|
*/
|
||||||
public function get_api_livestreams($parameters) {
|
public function get_api_livestreams($parameters)
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
require_once $global['systemRootPath'] . 'plugin/Live/stats.json.php';
|
require_once $global['systemRootPath'] . 'plugin/Live/stats.json.php';
|
||||||
exit;
|
exit;
|
||||||
|
@ -1345,7 +1447,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&APISecret={APISecret}&users_id=1
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&APISecret={APISecret}&users_id=1
|
||||||
* @return \ApiObject
|
* @return \ApiObject
|
||||||
*/
|
*/
|
||||||
public function set_api_livestream_save($parameters) {
|
public function set_api_livestream_save($parameters)
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
require_once $global['systemRootPath'] . 'objects/video.php';
|
require_once $global['systemRootPath'] . 'objects/video.php';
|
||||||
$obj = $this->startResponseObject($parameters);
|
$obj = $this->startResponseObject($parameters);
|
||||||
|
@ -1391,7 +1494,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&APISecret={APISecret}&users_id=1
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&APISecret={APISecret}&users_id=1
|
||||||
* @return \ApiObject
|
* @return \ApiObject
|
||||||
*/
|
*/
|
||||||
public function get_api_user($parameters) {
|
public function get_api_user($parameters)
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
require_once $global['systemRootPath'] . 'objects/video.php';
|
require_once $global['systemRootPath'] . 'objects/video.php';
|
||||||
$obj = $this->startResponseObject($parameters);
|
$obj = $this->startResponseObject($parameters);
|
||||||
|
@ -1477,7 +1581,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&APISecret={APISecret}&status=a&rowCount=3&searchPhrase=test
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&APISecret={APISecret}&status=a&rowCount=3&searchPhrase=test
|
||||||
* @return \ApiObject
|
* @return \ApiObject
|
||||||
*/
|
*/
|
||||||
public function get_api_users_list($parameters) {
|
public function get_api_users_list($parameters)
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
$obj = $this->startResponseObject($parameters);
|
$obj = $this->startResponseObject($parameters);
|
||||||
if (self::isAPISecretValid()) {
|
if (self::isAPISecretValid()) {
|
||||||
|
@ -1513,7 +1618,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&APISecret={APISecret}
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&APISecret={APISecret}
|
||||||
* @return \ApiObject
|
* @return \ApiObject
|
||||||
*/
|
*/
|
||||||
public function get_api_videosViewsCount($parameters) {
|
public function get_api_videosViewsCount($parameters)
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
require_once $global['systemRootPath'] . 'objects/video.php';
|
require_once $global['systemRootPath'] . 'objects/video.php';
|
||||||
$obj = $this->startResponseObject($parameters);
|
$obj = $this->startResponseObject($parameters);
|
||||||
|
@ -1549,7 +1655,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}
|
||||||
* @return \ApiObject
|
* @return \ApiObject
|
||||||
*/
|
*/
|
||||||
public function get_api_channels($parameters) {
|
public function get_api_channels($parameters)
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
require_once $global['systemRootPath'] . 'objects/Channel.php';
|
require_once $global['systemRootPath'] . 'objects/Channel.php';
|
||||||
$channels = Channel::getChannels();
|
$channels = Channel::getChannels();
|
||||||
|
@ -1576,7 +1683,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&playlists_id=12
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&playlists_id=12
|
||||||
* @return \ApiObject
|
* @return \ApiObject
|
||||||
*/
|
*/
|
||||||
public function get_api_program($parameters) {
|
public function get_api_program($parameters)
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
if (!empty($parameters['videos_id'])) {
|
if (!empty($parameters['videos_id'])) {
|
||||||
$v = new Video('', '', $parameters['videos_id']);
|
$v = new Video('', '', $parameters['videos_id']);
|
||||||
|
@ -1614,7 +1722,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}
|
||||||
* @return \ApiObject
|
* @return \ApiObject
|
||||||
*/
|
*/
|
||||||
public function get_api_programs($parameters) {
|
public function get_api_programs($parameters)
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
require_once $global['systemRootPath'] . 'objects/playlist.php';
|
require_once $global['systemRootPath'] . 'objects/playlist.php';
|
||||||
|
|
||||||
|
@ -1657,7 +1766,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&name=NewPL&status=unlisted
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&name=NewPL&status=unlisted
|
||||||
* @return \ApiObject
|
* @return \ApiObject
|
||||||
*/
|
*/
|
||||||
public function set_api_create_programs($parameters) {
|
public function set_api_create_programs($parameters)
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
require_once $global['systemRootPath'] . 'objects/playlist.php';
|
require_once $global['systemRootPath'] . 'objects/playlist.php';
|
||||||
$users_id = User::getId();
|
$users_id = User::getId();
|
||||||
|
@ -1693,7 +1803,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&playlists_id=12
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&playlists_id=12
|
||||||
* @return \ApiObject
|
* @return \ApiObject
|
||||||
*/
|
*/
|
||||||
public function set_api_delete_programs($parameters) {
|
public function set_api_delete_programs($parameters)
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
require_once $global['systemRootPath'] . 'objects/playlist.php';
|
require_once $global['systemRootPath'] . 'objects/playlist.php';
|
||||||
$users_id = User::getId();
|
$users_id = User::getId();
|
||||||
|
@ -1732,7 +1843,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=11&playlists_id=10&add=1
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=11&playlists_id=10&add=1
|
||||||
* @return \ApiObject
|
* @return \ApiObject
|
||||||
*/
|
*/
|
||||||
public function set_api_programs($parameters) {
|
public function set_api_programs($parameters)
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
require_once $global['systemRootPath'] . 'objects/playlist.php';
|
require_once $global['systemRootPath'] . 'objects/playlist.php';
|
||||||
$users_id = User::getId();
|
$users_id = User::getId();
|
||||||
|
@ -1777,7 +1889,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?users_id=1&APIName={APIName}&APISecret={APISecret}
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?users_id=1&APIName={APIName}&APISecret={APISecret}
|
||||||
* @return \ApiObject
|
* @return \ApiObject
|
||||||
*/
|
*/
|
||||||
public function get_api_subscribers($parameters) {
|
public function get_api_subscribers($parameters)
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
|
|
||||||
$name = "get_api_subscribers" . json_encode($parameters);
|
$name = "get_api_subscribers" . json_encode($parameters);
|
||||||
|
@ -1803,7 +1916,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}
|
||||||
* @return \ApiObject
|
* @return \ApiObject
|
||||||
*/
|
*/
|
||||||
public function get_api_categories($parameters) {
|
public function get_api_categories($parameters)
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
require_once $global['systemRootPath'] . 'objects/category.php';
|
require_once $global['systemRootPath'] . 'objects/category.php';
|
||||||
$categories = Category::getAllCategories();
|
$categories = Category::getAllCategories();
|
||||||
|
@ -1829,7 +1943,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=1
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=1
|
||||||
* @return \ApiObject
|
* @return \ApiObject
|
||||||
*/
|
*/
|
||||||
public function get_api_likes($parameters) {
|
public function get_api_likes($parameters)
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
require_once $global['systemRootPath'] . 'objects/like.php';
|
require_once $global['systemRootPath'] . 'objects/like.php';
|
||||||
if (empty($parameters['videos_id'])) {
|
if (empty($parameters['videos_id'])) {
|
||||||
|
@ -1846,7 +1961,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=1&user=admin&pass=123
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=1&user=admin&pass=123
|
||||||
* @return \ApiObject
|
* @return \ApiObject
|
||||||
*/
|
*/
|
||||||
public function set_api_like($parameters) {
|
public function set_api_like($parameters)
|
||||||
|
{
|
||||||
return $this->like($parameters, 1);
|
return $this->like($parameters, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1858,7 +1974,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=1&user=admin&pass=123
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=1&user=admin&pass=123
|
||||||
* @return \ApiObject
|
* @return \ApiObject
|
||||||
*/
|
*/
|
||||||
public function set_api_dislike($parameters) {
|
public function set_api_dislike($parameters)
|
||||||
|
{
|
||||||
return $this->like($parameters, -1);
|
return $this->like($parameters, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1870,7 +1987,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=1&user=admin&pass=123
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=1&user=admin&pass=123
|
||||||
* @return \ApiObject
|
* @return \ApiObject
|
||||||
*/
|
*/
|
||||||
public function set_api_removelike($parameters) {
|
public function set_api_removelike($parameters)
|
||||||
|
{
|
||||||
return $this->like($parameters, 0);
|
return $this->like($parameters, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1883,7 +2001,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&user=admin&pass=f321d14cdeeb7cded7489f504fa8862b&encodedPass=true
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&user=admin&pass=f321d14cdeeb7cded7489f504fa8862b&encodedPass=true
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function get_api_signIn($parameters) {
|
public function get_api_signIn($parameters)
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
$this->getToPost();
|
$this->getToPost();
|
||||||
require_once $global['systemRootPath'] . 'objects/login.json.php';
|
require_once $global['systemRootPath'] . 'objects/login.json.php';
|
||||||
|
@ -1905,7 +2024,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&APISecret={APISecret}&user=admin&pass=123&email=me@mysite.com&name=Yeshua
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&APISecret={APISecret}&user=admin&pass=123&email=me@mysite.com&name=Yeshua
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function set_api_signUp($parameters) {
|
public function set_api_signUp($parameters)
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
$this->getToPost();
|
$this->getToPost();
|
||||||
$obj = $this->getDataObject();
|
$obj = $this->getDataObject();
|
||||||
|
@ -1929,7 +2049,8 @@ class API extends PluginAbstract {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function like($parameters, $like) {
|
private function like($parameters, $like)
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
require_once $global['systemRootPath'] . 'objects/like.php';
|
require_once $global['systemRootPath'] . 'objects/like.php';
|
||||||
if (empty($parameters['videos_id'])) {
|
if (empty($parameters['videos_id'])) {
|
||||||
|
@ -1954,7 +2075,8 @@ class API extends PluginAbstract {
|
||||||
* @example for JSON response: {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=3&user=admin&pass=f321d14cdeeb7cded7489f504fa8862b&encodedPass=true&optionalAdTagUrl=2&json=1
|
* @example for JSON response: {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=3&user=admin&pass=f321d14cdeeb7cded7489f504fa8862b&encodedPass=true&optionalAdTagUrl=2&json=1
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function get_api_vmap($parameters) {
|
public function get_api_vmap($parameters)
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
$this->getToPost();
|
$this->getToPost();
|
||||||
require_once $global['systemRootPath'] . 'plugin/GoogleAds_IMA/VMAP.php';
|
require_once $global['systemRootPath'] . 'plugin/GoogleAds_IMA/VMAP.php';
|
||||||
|
@ -1972,7 +2094,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=3&user=admin&pass=f321d14cdeeb7cded7489f504fa8862b&encodedPass=true&optionalAdTagUrl=2
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=3&user=admin&pass=f321d14cdeeb7cded7489f504fa8862b&encodedPass=true&optionalAdTagUrl=2
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function get_api_vast($parameters) {
|
public function get_api_vast($parameters)
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
$this->getToPost();
|
$this->getToPost();
|
||||||
$vastOnly = 1;
|
$vastOnly = 1;
|
||||||
|
@ -1988,7 +2111,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&APISecret={APISecret}&ip=2.20.147.123
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&APISecret={APISecret}&ip=2.20.147.123
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function get_api_IP2Location($parameters) {
|
public function get_api_IP2Location($parameters)
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
$this->getToPost();
|
$this->getToPost();
|
||||||
$obj = $this->getDataObject();
|
$obj = $this->getDataObject();
|
||||||
|
@ -2014,7 +2138,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&user=admin&pass=f321d14cdeeb7cded7489f504fa8862b&encodedPass=true
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&user=admin&pass=f321d14cdeeb7cded7489f504fa8862b&encodedPass=true
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function get_api_favorite($parameters) {
|
public function get_api_favorite($parameters)
|
||||||
|
{
|
||||||
$plugin = AVideoPlugin::loadPluginIfEnabled("PlayLists");
|
$plugin = AVideoPlugin::loadPluginIfEnabled("PlayLists");
|
||||||
if (empty($plugin)) {
|
if (empty($plugin)) {
|
||||||
return new ApiObject("Plugin disabled");
|
return new ApiObject("Plugin disabled");
|
||||||
|
@ -2048,7 +2173,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=3&user=admin&pass=f321d14cdeeb7cded7489f504fa8862b&encodedPass=true
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=3&user=admin&pass=f321d14cdeeb7cded7489f504fa8862b&encodedPass=true
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function set_api_favorite($parameters) {
|
public function set_api_favorite($parameters)
|
||||||
|
{
|
||||||
$this->favorite($parameters, true);
|
$this->favorite($parameters, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2061,11 +2187,13 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=3&user=admin&pass=f321d14cdeeb7cded7489f504fa8862b&encodedPass=true
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=3&user=admin&pass=f321d14cdeeb7cded7489f504fa8862b&encodedPass=true
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function set_api_removeFavorite($parameters) {
|
public function set_api_removeFavorite($parameters)
|
||||||
|
{
|
||||||
$this->favorite($parameters, false);
|
$this->favorite($parameters, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function favorite($parameters, $add) {
|
private function favorite($parameters, $add)
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
$plugin = AVideoPlugin::loadPluginIfEnabled("PlayLists");
|
$plugin = AVideoPlugin::loadPluginIfEnabled("PlayLists");
|
||||||
if (empty($plugin)) {
|
if (empty($plugin)) {
|
||||||
|
@ -2090,7 +2218,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&user=admin&pass=f321d14cdeeb7cded7489f504fa8862b&encodedPass=true
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&user=admin&pass=f321d14cdeeb7cded7489f504fa8862b&encodedPass=true
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function get_api_watch_later($parameters) {
|
public function get_api_watch_later($parameters)
|
||||||
|
{
|
||||||
$plugin = AVideoPlugin::loadPluginIfEnabled("PlayLists");
|
$plugin = AVideoPlugin::loadPluginIfEnabled("PlayLists");
|
||||||
if (empty($plugin)) {
|
if (empty($plugin)) {
|
||||||
return new ApiObject("Plugin disabled");
|
return new ApiObject("Plugin disabled");
|
||||||
|
@ -2129,7 +2258,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=3&user=admin&pass=f321d14cdeeb7cded7489f504fa8862b&encodedPass=true
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=3&user=admin&pass=f321d14cdeeb7cded7489f504fa8862b&encodedPass=true
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function set_api_watch_later($parameters) {
|
public function set_api_watch_later($parameters)
|
||||||
|
{
|
||||||
$this->watch_later($parameters, true);
|
$this->watch_later($parameters, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2142,11 +2272,13 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=3&user=admin&pass=f321d14cdeeb7cded7489f504fa8862b&encodedPass=true
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=3&user=admin&pass=f321d14cdeeb7cded7489f504fa8862b&encodedPass=true
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function set_api_removeWatch_later($parameters) {
|
public function set_api_removeWatch_later($parameters)
|
||||||
|
{
|
||||||
$this->watch_later($parameters, false);
|
$this->watch_later($parameters, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function watch_later($parameters, $add) {
|
private function watch_later($parameters, $add)
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
$plugin = AVideoPlugin::loadPluginIfEnabled("PlayLists");
|
$plugin = AVideoPlugin::loadPluginIfEnabled("PlayLists");
|
||||||
if (empty($plugin)) {
|
if (empty($plugin)) {
|
||||||
|
@ -2175,7 +2307,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&message=HelloWorld&users_id=2&room_users_id=4&user=admin&pass=f321d14cdeeb7cded7489f504fa8862b&encodedPass=true
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&message=HelloWorld&users_id=2&room_users_id=4&user=admin&pass=f321d14cdeeb7cded7489f504fa8862b&encodedPass=true
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function set_api_chat2_message($parameters) {
|
public function set_api_chat2_message($parameters)
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
$plugin = AVideoPlugin::loadPluginIfEnabled("Chat2");
|
$plugin = AVideoPlugin::loadPluginIfEnabled("Chat2");
|
||||||
if (empty($plugin)) {
|
if (empty($plugin)) {
|
||||||
|
@ -2205,7 +2338,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&greater_then_id=88&lower_then_id=98&to_users_id=2&user=admin&pass=f321d14cdeeb7cded7489f504fa8862b&encodedPass=true
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&greater_then_id=88&lower_then_id=98&to_users_id=2&user=admin&pass=f321d14cdeeb7cded7489f504fa8862b&encodedPass=true
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function get_api_chat2_chat($parameters) {
|
public function get_api_chat2_chat($parameters)
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
$plugin = AVideoPlugin::loadPluginIfEnabled("Chat2");
|
$plugin = AVideoPlugin::loadPluginIfEnabled("Chat2");
|
||||||
if (empty($plugin)) {
|
if (empty($plugin)) {
|
||||||
|
@ -2245,7 +2379,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&greater_then_id=88&lower_then_id=98&room_users_id=2&user=admin&pass=f321d14cdeeb7cded7489f504fa8862b&encodedPass=true
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&greater_then_id=88&lower_then_id=98&room_users_id=2&user=admin&pass=f321d14cdeeb7cded7489f504fa8862b&encodedPass=true
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function get_api_chat2_room($parameters) {
|
public function get_api_chat2_room($parameters)
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
$plugin = AVideoPlugin::loadPluginIfEnabled("Chat2");
|
$plugin = AVideoPlugin::loadPluginIfEnabled("Chat2");
|
||||||
if (empty($plugin)) {
|
if (empty($plugin)) {
|
||||||
|
@ -2271,7 +2406,8 @@ class API extends PluginAbstract {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getAPISecret() {
|
public static function getAPISecret()
|
||||||
|
{
|
||||||
$obj = AVideoPlugin::getDataObject("API");
|
$obj = AVideoPlugin::getDataObject("API");
|
||||||
return $obj->APISecret;
|
return $obj->APISecret;
|
||||||
}
|
}
|
||||||
|
@ -2282,7 +2418,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function get_api_locales($parameters) {
|
public function get_api_locales($parameters)
|
||||||
|
{
|
||||||
global $global, $config;
|
global $global, $config;
|
||||||
$langs = new stdClass();
|
$langs = new stdClass();
|
||||||
$langs->default = $config->getLanguage();
|
$langs->default = $config->getLanguage();
|
||||||
|
@ -2298,7 +2435,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&language=cn
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&language=cn
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function get_api_locale($parameters) {
|
public function get_api_locale($parameters)
|
||||||
|
{
|
||||||
global $global, $config;
|
global $global, $config;
|
||||||
$obj = $this->startResponseObject($parameters);
|
$obj = $this->startResponseObject($parameters);
|
||||||
|
|
||||||
|
@ -2327,7 +2465,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&APISecret={APISecret}&user=admin
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&APISecret={APISecret}&user=admin
|
||||||
* @return \ApiObject
|
* @return \ApiObject
|
||||||
*/
|
*/
|
||||||
public function set_api_userImages($parameters) {
|
public function set_api_userImages($parameters)
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
require_once $global['systemRootPath'] . 'objects/video.php';
|
require_once $global['systemRootPath'] . 'objects/video.php';
|
||||||
if (self::isAPISecretValid()) {
|
if (self::isAPISecretValid()) {
|
||||||
|
@ -2355,7 +2494,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&user=admin&pass=f321d14cdeeb7cded7489f504fa8862b&encodedPass=true
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&user=admin&pass=f321d14cdeeb7cded7489f504fa8862b&encodedPass=true
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function get_api_meet($parameters) {
|
public function get_api_meet($parameters)
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
$meet = AVideoPlugin::loadPluginIfEnabled('Meet');
|
$meet = AVideoPlugin::loadPluginIfEnabled('Meet');
|
||||||
if ($meet) {
|
if ($meet) {
|
||||||
|
@ -2405,7 +2545,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&user=admin&pass=f321d14cdeeb7cded7489f504fa8862b&encodedPass=true&RoomTopic=APITestMeet
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&user=admin&pass=f321d14cdeeb7cded7489f504fa8862b&encodedPass=true&RoomTopic=APITestMeet
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function set_api_meet($parameters) {
|
public function set_api_meet($parameters)
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
$meet = AVideoPlugin::loadPluginIfEnabled('Meet');
|
$meet = AVideoPlugin::loadPluginIfEnabled('Meet');
|
||||||
if ($meet) {
|
if ($meet) {
|
||||||
|
@ -2430,7 +2571,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&user=admin&pass=f321d14cdeeb7cded7489f504fa8862b&encodedPass=true
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&user=admin&pass=f321d14cdeeb7cded7489f504fa8862b&encodedPass=true
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function get_api_notifications($parameters) {
|
public function get_api_notifications($parameters)
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
$plugin = AVideoPlugin::loadPluginIfEnabled('UserNotifications');
|
$plugin = AVideoPlugin::loadPluginIfEnabled('UserNotifications');
|
||||||
if ($plugin) {
|
if ($plugin) {
|
||||||
|
@ -2454,7 +2596,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&APISecret={APISecret}
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&APISecret={APISecret}
|
||||||
* @return \ApiObject
|
* @return \ApiObject
|
||||||
*/
|
*/
|
||||||
public function get_api_app($parameters) {
|
public function get_api_app($parameters)
|
||||||
|
{
|
||||||
global $global, $config;
|
global $global, $config;
|
||||||
$name = "get_api_roku" . json_encode($parameters);
|
$name = "get_api_roku" . json_encode($parameters);
|
||||||
$roku = ObjectYPT::getCacheGlobal($name, 3600);
|
$roku = ObjectYPT::getCacheGlobal($name, 3600);
|
||||||
|
@ -2510,7 +2653,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&user=admin&pass=f321d14cdeeb7cded7489f504fa8862b
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&user=admin&pass=f321d14cdeeb7cded7489f504fa8862b
|
||||||
* @return \ApiObject Returns an ApiObject containing the encrypted user information, including the generated code.
|
* @return \ApiObject Returns an ApiObject containing the encrypted user information, including the generated code.
|
||||||
*/
|
*/
|
||||||
public function set_api_login_code($parameters) {
|
public function set_api_login_code($parameters)
|
||||||
|
{
|
||||||
$obj = getActivationCode();
|
$obj = getActivationCode();
|
||||||
return new ApiObject('', empty($obj['bytes']), $obj);
|
return new ApiObject('', empty($obj['bytes']), $obj);
|
||||||
}
|
}
|
||||||
|
@ -2526,7 +2670,8 @@ class API extends PluginAbstract {
|
||||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&code=XXXX-XXXX
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&code=XXXX-XXXX
|
||||||
* @return \ApiObject Returns an ApiObject containing the decrypted user information, or a message indicating the error.
|
* @return \ApiObject Returns an ApiObject containing the decrypted user information, or a message indicating the error.
|
||||||
*/
|
*/
|
||||||
public function get_api_login_code($parameters) {
|
public function get_api_login_code($parameters)
|
||||||
|
{
|
||||||
global $global, $config;
|
global $global, $config;
|
||||||
$msg = '';
|
$msg = '';
|
||||||
$obj = false;
|
$obj = false;
|
||||||
|
@ -2561,7 +2706,8 @@ class API extends PluginAbstract {
|
||||||
return new ApiObject($msg, empty($obj), $obj);
|
return new ApiObject($msg, empty($obj), $obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function isAPISecretValid() {
|
public static function isAPISecretValid()
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
if (!empty($_REQUEST['APISecret'])) {
|
if (!empty($_REQUEST['APISecret'])) {
|
||||||
$dataObj = AVideoPlugin::getDataObject('API');
|
$dataObj = AVideoPlugin::getDataObject('API');
|
||||||
|
@ -2572,10 +2718,10 @@ class API extends PluginAbstract {
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class ApiObject {
|
class ApiObject
|
||||||
|
{
|
||||||
|
|
||||||
public $error;
|
public $error;
|
||||||
public $message;
|
public $message;
|
||||||
|
@ -2584,7 +2730,8 @@ class ApiObject {
|
||||||
public $users_id;
|
public $users_id;
|
||||||
public $session_id;
|
public $session_id;
|
||||||
|
|
||||||
public function __construct($message = "api not started or not found", $error = true, $response = []) {
|
public function __construct($message = "api not started or not found", $error = true, $response = [])
|
||||||
|
{
|
||||||
$response = cleanUpRowFromDatabase($response);
|
$response = cleanUpRowFromDatabase($response);
|
||||||
|
|
||||||
$this->error = $error;
|
$this->error = $error;
|
||||||
|
@ -2594,10 +2741,10 @@ class ApiObject {
|
||||||
$this->users_id = User::getId();
|
$this->users_id = User::getId();
|
||||||
$this->session_id = session_id();
|
$this->session_id = session_id();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class SectionFirstPage {
|
class SectionFirstPage
|
||||||
|
{
|
||||||
|
|
||||||
public $type;
|
public $type;
|
||||||
public $title;
|
public $title;
|
||||||
|
@ -2610,7 +2757,8 @@ class SectionFirstPage {
|
||||||
public $executionTime;
|
public $executionTime;
|
||||||
|
|
||||||
// Add constructor, getter, and setter here
|
// Add constructor, getter, and setter here
|
||||||
public function __construct($type, $title, $endpoint, $rowCount, $childs = array()) {
|
public function __construct($type, $title, $endpoint, $rowCount, $childs = array())
|
||||||
|
{
|
||||||
global $global;
|
global $global;
|
||||||
$endpoint = addQueryStringParameter($endpoint, 'current', 1);
|
$endpoint = addQueryStringParameter($endpoint, 'current', 1);
|
||||||
$endpoint = addQueryStringParameter($endpoint, 'videoType', 'audio_and_video_and_serie');
|
$endpoint = addQueryStringParameter($endpoint, 'videoType', 'audio_and_video_and_serie');
|
||||||
|
@ -2655,5 +2803,4 @@ class SectionFirstPage {
|
||||||
}
|
}
|
||||||
$this->childs = $childs;
|
$this->childs = $childs;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
<?php
|
||||||
|
saveRequestVars();
|
||||||
|
?>
|
||||||
<div class="row mainArea">
|
<div class="row mainArea">
|
||||||
<?php
|
<?php
|
||||||
if (!empty($currentCat)) {
|
if (!empty($currentCat)) {
|
||||||
|
@ -163,3 +166,6 @@
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
<?php
|
||||||
|
restoreRequestVars();
|
||||||
|
?>
|
|
@ -2,22 +2,6 @@
|
||||||
if (empty($obj) || !isset($obj->categoriesTopButtonsFluid)) {
|
if (empty($obj) || !isset($obj->categoriesTopButtonsFluid)) {
|
||||||
$obj = AVideoPlugin::loadPlugin('Layout');
|
$obj = AVideoPlugin::loadPlugin('Layout');
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
<style>
|
|
||||||
.categoriesTobButtons{
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
.categoriesTobButtons li a{
|
|
||||||
border-radius:23px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row">
|
|
||||||
<div class="<?php echo empty($obj->categoriesTopButtonsFluid) ? '' : 'col-lg-10 col-lg-offset-1'; ?>">
|
|
||||||
|
|
||||||
<center>
|
|
||||||
<ul class="nav nav-tabs nav-tabs-horizontal categoriesTobButtons" >
|
|
||||||
<?php
|
|
||||||
global $advancedCustom;
|
global $advancedCustom;
|
||||||
$_rowCount = getRowCount();
|
$_rowCount = getRowCount();
|
||||||
$current = getCurrentPage();
|
$current = getCurrentPage();
|
||||||
|
@ -25,6 +9,9 @@ if(empty($obj) || !isset($obj->categoriesTopButtonsFluid)){
|
||||||
$_REQUEST['current'] = 1;
|
$_REQUEST['current'] = 1;
|
||||||
$parsed_cats = array();
|
$parsed_cats = array();
|
||||||
$categories = Category::getAllCategories();
|
$categories = Category::getAllCategories();
|
||||||
|
$_REQUEST['rowCount'] = $_rowCount;
|
||||||
|
$_REQUEST['current'] = $current;
|
||||||
|
$items = array();
|
||||||
foreach ($categories as $value) {
|
foreach ($categories as $value) {
|
||||||
if ($value['parentId']) {
|
if ($value['parentId']) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -40,33 +27,19 @@ if(empty($obj) || !isset($obj->categoriesTopButtonsFluid)){
|
||||||
if (in_array($value['id'], $parsed_cats)) {
|
if (in_array($value['id'], $parsed_cats)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
?>
|
$label = '<i class="' . (empty($value['iconClass']) ? "fa fa-folder" : $value['iconClass']) . '"></i> '
|
||||||
<li data-toggle="tooltip" title="<?php echo __($value['name']); ?>" data-placement="bottom"
|
|
||||||
class="<?php echo ($value['clean_name'] == @$_REQUEST['catName'] ? "active" : ""); ?>">
|
|
||||||
<a href="<?php echo Category::getCategoryLinkFromName($value['clean_name']); ?>" >
|
|
||||||
<?php
|
|
||||||
echo '<i class="' . (empty($value['iconClass']) ? "fa fa-folder" : $value['iconClass']) . '"></i> '
|
|
||||||
. '<span class="">' . __($value['name']) . '</span>';
|
. '<span class="">' . __($value['name']) . '</span>';
|
||||||
if (!empty($obj->categoriesTopButtonsShowVideosCount)) {
|
if (!empty($obj->categoriesTopButtonsShowVideosCount)) {
|
||||||
echo ' <span class="badge">' . $total . '</span>';
|
$label .= ' <span class="badge">' . $total . '</span>';
|
||||||
}
|
}
|
||||||
?>
|
$items[] = array(
|
||||||
</a>
|
'href' => Category::getCategoryLinkFromName($value['clean_name']),
|
||||||
</li>
|
'tooltip' => __($value['name']),
|
||||||
<?php
|
'onclick' => '',
|
||||||
|
'label' => $label,
|
||||||
|
'isActive' => $value['clean_name'] == @$_REQUEST['catName'],
|
||||||
|
'clean_name' => $value['clean_name']
|
||||||
|
);
|
||||||
}
|
}
|
||||||
$_REQUEST['rowCount'] = $_rowCount;
|
//var_dump($_REQUEST['catName'], $items);exit;
|
||||||
$_REQUEST['current'] = $current;
|
generateHorizontalFlickity($items);
|
||||||
/*
|
|
||||||
for ($i = 0; $i < 100; $i++) {
|
|
||||||
?> <li data-toggle="tooltip" title="<?php echo __($i); ?>" data-placement="bottom"> <a href="#"> <?php echo '<i class="fa fa-folder"></i> <span class="hidden-xs">' . $i . '</span>';
|
|
||||||
if (!empty($obj->categoriesTopButtonsShowVideosCount)) {
|
|
||||||
echo ' <span class="badge">' . $i . '</span>';
|
|
||||||
} ?> </a> </li> <?php }
|
|
||||||
*/
|
|
||||||
?>
|
|
||||||
</ul>
|
|
||||||
</center>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
|
@ -123,3 +123,69 @@ foreach ($rows as $key => $value) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
<?php
|
||||||
|
$videosData = [];
|
||||||
|
foreach ($data as $value) {
|
||||||
|
$videosId = $value['videos_id'];
|
||||||
|
$reward = $value['total_reward'];
|
||||||
|
$title = $value['title'];
|
||||||
|
|
||||||
|
// If this videos_id is already in the $videosData array, update its reward, otherwise add it as a new entry.
|
||||||
|
if (isset($videosData[$videosId])) {
|
||||||
|
$videosData[$videosId]['reward'] += $reward;
|
||||||
|
} else {
|
||||||
|
$videosData[$videosId] = [
|
||||||
|
'reward' => $reward,
|
||||||
|
'title' => $title,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$videosIds = [];
|
||||||
|
$rewards = [];
|
||||||
|
$titles = [];
|
||||||
|
foreach ($videosData as $videosId => $videoInfo) {
|
||||||
|
$videosIds[] = $videosId;
|
||||||
|
$rewards[] = $videoInfo['reward'];
|
||||||
|
$titles[] = $videoInfo['title'];
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<div class="panel">
|
||||||
|
<div class="panel-body">
|
||||||
|
<canvas id="rewardChart2" style="width:100%; height:400px;"></canvas>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
let videosIds = <?php echo json_encode($videosIds); ?>;
|
||||||
|
let rewards2 = <?php echo json_encode($rewards); ?>;
|
||||||
|
let titles = <?php echo json_encode($titles); ?>;
|
||||||
|
|
||||||
|
new Chart(document.getElementById("rewardChart2"), {
|
||||||
|
type: 'bar',
|
||||||
|
data: {
|
||||||
|
labels: titles, // Use the video titles as labels
|
||||||
|
datasets: [{
|
||||||
|
data: rewards2,
|
||||||
|
label: "Money Made",
|
||||||
|
backgroundColor: "#3e95cd",
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
options: {
|
||||||
|
title: {
|
||||||
|
display: true,
|
||||||
|
text: 'Money Made per Video'
|
||||||
|
},
|
||||||
|
scales: {
|
||||||
|
yAxes: [{
|
||||||
|
ticks: {
|
||||||
|
beginAtZero: true,
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
|
@ -169,7 +169,6 @@ class PlayerSkins extends PluginAbstract {
|
||||||
$htmlMediaTag .= '<video '.self::getPlaysinline().' id="mainVideo" style="display: none; height: 0;width: 0;" ></video>';
|
$htmlMediaTag .= '<video '.self::getPlaysinline().' id="mainVideo" style="display: none; height: 0;width: 0;" ></video>';
|
||||||
//$htmlMediaTag .= '<div id="main-video" class="embed-responsive-item">';
|
//$htmlMediaTag .= '<div id="main-video" class="embed-responsive-item">';
|
||||||
$htmlMediaTag .= '<iframe class="embed-responsive-item" scrolling="no" '.Video::$iframeAllowAttributes.' src="' . $url . '"></iframe>';
|
$htmlMediaTag .= '<iframe class="embed-responsive-item" scrolling="no" '.Video::$iframeAllowAttributes.' src="' . $url . '"></iframe>';
|
||||||
$htmlMediaTag .= '<script>$(document).ready(function () {addView(' . intval($video['id']) . ', 0);});</script>';
|
|
||||||
//$htmlMediaTag .= '</div>';
|
//$htmlMediaTag .= '</div>';
|
||||||
} else {
|
} else {
|
||||||
// youtube!
|
// youtube!
|
||||||
|
@ -650,18 +649,14 @@ class PlayerSkins extends PluginAbstract {
|
||||||
$url = Video::getURLFriendly($videos_id);
|
$url = Video::getURLFriendly($videos_id);
|
||||||
$js .= "
|
$js .= "
|
||||||
player.on('play', function () {
|
player.on('play', function () {
|
||||||
addView({$videos_id}, this.currentTime());
|
|
||||||
_addViewBeaconAdded = false;
|
|
||||||
sendAVideoMobileMessage('play', this.currentTime());
|
sendAVideoMobileMessage('play', this.currentTime());
|
||||||
});
|
});
|
||||||
player.on('ended', function () {
|
player.on('ended', function () {
|
||||||
var time = Math.round(this.currentTime());
|
var time = Math.round(this.currentTime());
|
||||||
addView({$videos_id}, time);
|
|
||||||
sendAVideoMobileMessage('ended', time);
|
sendAVideoMobileMessage('ended', time);
|
||||||
});
|
});
|
||||||
player.on('pause', function () {
|
player.on('pause', function () {
|
||||||
var time = Math.round(this.currentTime());
|
var time = Math.round(this.currentTime());
|
||||||
addView({$videos_id}, time);
|
|
||||||
sendAVideoMobileMessage('pause', time);
|
sendAVideoMobileMessage('pause', time);
|
||||||
});
|
});
|
||||||
player.on('volumechange', function () {
|
player.on('volumechange', function () {
|
||||||
|
@ -683,13 +678,6 @@ class PlayerSkins extends PluginAbstract {
|
||||||
|
|
||||||
$('#linkCurrentTime, .linkCurrentTime').val(url);
|
$('#linkCurrentTime, .linkCurrentTime').val(url);
|
||||||
|
|
||||||
if (time >= 5 && time % 1 === 0) {
|
|
||||||
addView({$videos_id}, time);
|
|
||||||
} else {
|
|
||||||
addViewFromCookie();
|
|
||||||
addViewSetCookie(PHPSESSID, {$videos_id}, time, seconds_watching_video);
|
|
||||||
}
|
|
||||||
|
|
||||||
sendAVideoMobileMessage('timeupdate', time);
|
sendAVideoMobileMessage('timeupdate', time);
|
||||||
});
|
});
|
||||||
;";
|
;";
|
||||||
|
|
|
@ -22,9 +22,6 @@ if ($removeAnimation || !empty($advancedCustom->disableAnimations)) {
|
||||||
cursor: move;
|
cursor: move;
|
||||||
}
|
}
|
||||||
|
|
||||||
.playingShorts .scrtabs-tab-container {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
body.playingShorts {
|
body.playingShorts {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
@ -162,6 +159,7 @@ if ($removeAnimation || !empty($advancedCustom->disableAnimations)) {
|
||||||
#buttonsCarousel {
|
#buttonsCarousel {
|
||||||
bottom: 50px;
|
bottom: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.circleCarouselBtn {
|
.circleCarouselBtn {
|
||||||
width: 35px;
|
width: 35px;
|
||||||
height: 35px;
|
height: 35px;
|
||||||
|
@ -336,6 +334,10 @@ if ($removeAnimation || !empty($advancedCustom->disableAnimations)) {
|
||||||
var iframe;
|
var iframe;
|
||||||
var currentShortsPlayerIndex = -1;
|
var currentShortsPlayerIndex = -1;
|
||||||
|
|
||||||
|
function playNextShorts() {
|
||||||
|
$('#ShortsPlayer').flickity('next');
|
||||||
|
}
|
||||||
|
|
||||||
function createShortsPlayerFlickity(initialIndex) {
|
function createShortsPlayerFlickity(initialIndex) {
|
||||||
var $carouselPlayer = $('#ShortsPlayer');
|
var $carouselPlayer = $('#ShortsPlayer');
|
||||||
|
|
||||||
|
@ -436,4 +438,14 @@ foreach ($totalFlickityCells as $key => $value) {
|
||||||
shortsClose();
|
shortsClose();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
// Event listener to receive messages from the iframe
|
||||||
|
window.addEventListener('message', function(event) {
|
||||||
|
if (event.data === 'playNextShorts') {
|
||||||
|
// Call the function
|
||||||
|
playNextShorts();
|
||||||
|
} else {
|
||||||
|
// Execute another code if the function doesn't exist
|
||||||
|
console.log("playNextShorts() does not exist in the parent page");
|
||||||
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
|
@ -1,65 +0,0 @@
|
||||||
/**
|
|
||||||
* jquery-bootstrap-scrolling-tabs
|
|
||||||
* @version v2.6.1
|
|
||||||
* @link https://github.com/mikejacobson/jquery-bootstrap-scrolling-tabs
|
|
||||||
* @author Mike Jacobson <michaeljjacobson1@gmail.com>
|
|
||||||
* @license MIT License, http://www.opensource.org/licenses/MIT
|
|
||||||
*/
|
|
||||||
.scrtabs-tab-container * {
|
|
||||||
box-sizing: border-box; }
|
|
||||||
|
|
||||||
.scrtabs-tab-container {
|
|
||||||
height: 42px; }
|
|
||||||
.scrtabs-tab-container .tab-content {
|
|
||||||
clear: left; }
|
|
||||||
|
|
||||||
.scrtabs-tab-container.scrtabs-bootstrap4 .scrtabs-tabs-movable-container > .navbar-nav {
|
|
||||||
-ms-flex-direction: row;
|
|
||||||
flex-direction: row; }
|
|
||||||
|
|
||||||
.scrtabs-tabs-fixed-container {
|
|
||||||
float: left;
|
|
||||||
height: 42px;
|
|
||||||
overflow: hidden;
|
|
||||||
width: 100%; }
|
|
||||||
|
|
||||||
.scrtabs-tabs-movable-container {
|
|
||||||
position: relative; }
|
|
||||||
.scrtabs-tabs-movable-container .tab-content {
|
|
||||||
display: none; }
|
|
||||||
|
|
||||||
.scrtabs-tab-container.scrtabs-rtl .scrtabs-tabs-movable-container > ul.nav-tabs {
|
|
||||||
padding-right: 0; }
|
|
||||||
|
|
||||||
.scrtabs-tab-scroll-arrow {
|
|
||||||
border: 1px solid #dddddd;
|
|
||||||
border-top: none;
|
|
||||||
color: #428bca;
|
|
||||||
display: none;
|
|
||||||
float: left;
|
|
||||||
font-size: 12px;
|
|
||||||
height: 42px;
|
|
||||||
margin-bottom: -1px;
|
|
||||||
padding-left: 2px;
|
|
||||||
padding-top: 13px;
|
|
||||||
width: 20px; }
|
|
||||||
.scrtabs-tab-scroll-arrow:hover {
|
|
||||||
background-color: #eeeeee; }
|
|
||||||
|
|
||||||
.scrtabs-tab-scroll-arrow,
|
|
||||||
.scrtabs-tab-scroll-arrow .scrtabs-click-target {
|
|
||||||
cursor: pointer; }
|
|
||||||
|
|
||||||
.scrtabs-tab-scroll-arrow.scrtabs-with-click-target {
|
|
||||||
cursor: default; }
|
|
||||||
|
|
||||||
.scrtabs-tab-scroll-arrow.scrtabs-disable,
|
|
||||||
.scrtabs-tab-scroll-arrow.scrtabs-disable .scrtabs-click-target {
|
|
||||||
color: #ddd;
|
|
||||||
cursor: default; }
|
|
||||||
|
|
||||||
.scrtabs-tab-scroll-arrow.scrtabs-disable:hover {
|
|
||||||
background-color: initial; }
|
|
||||||
|
|
||||||
.scrtabs-tabs-fixed-container ul.nav-tabs > li {
|
|
||||||
white-space: nowrap; }
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,8 +0,0 @@
|
||||||
/**
|
|
||||||
* jquery-bootstrap-scrolling-tabs
|
|
||||||
* @version v2.6.1
|
|
||||||
* @link https://github.com/mikejacobson/jquery-bootstrap-scrolling-tabs
|
|
||||||
* @author Mike Jacobson <michaeljjacobson1@gmail.com>
|
|
||||||
* @license MIT License, http://www.opensource.org/licenses/MIT
|
|
||||||
*/
|
|
||||||
.scrtabs-tab-container *{box-sizing:border-box}.scrtabs-tab-container{height:42px}.scrtabs-tab-container .tab-content{clear:left}.scrtabs-tab-container.scrtabs-bootstrap4 .scrtabs-tabs-movable-container>.navbar-nav{-ms-flex-direction:row;flex-direction:row}.scrtabs-tabs-fixed-container{float:left;height:42px;overflow:hidden;width:100%}.scrtabs-tabs-movable-container{position:relative}.scrtabs-tabs-movable-container .tab-content{display:none}.scrtabs-tab-container.scrtabs-rtl .scrtabs-tabs-movable-container>ul.nav-tabs{padding-right:0}.scrtabs-tab-scroll-arrow{border:1px solid #ddd;border-top:none;color:#428bca;display:none;float:left;font-size:12px;height:42px;margin-bottom:-1px;padding-left:2px;padding-top:13px;width:20px}.scrtabs-tab-scroll-arrow:hover{background-color:#eee}.scrtabs-tab-scroll-arrow,.scrtabs-tab-scroll-arrow .scrtabs-click-target{cursor:pointer}.scrtabs-tab-scroll-arrow.scrtabs-with-click-target{cursor:default}.scrtabs-tab-scroll-arrow.scrtabs-disable,.scrtabs-tab-scroll-arrow.scrtabs-disable .scrtabs-click-target{color:#ddd;cursor:default}.scrtabs-tab-scroll-arrow.scrtabs-disable:hover{background-color:initial}.scrtabs-tabs-fixed-container ul.nav-tabs>li{white-space:nowrap}
|
|
File diff suppressed because one or more lines are too long
|
@ -18,3 +18,7 @@ span.selection > span.select2-selection--single{
|
||||||
border-bottom-color: rgb(204, 204, 204);
|
border-bottom-color: rgb(204, 204, 204);
|
||||||
border-left-color: rgb(204, 204, 204);
|
border-left-color: rgb(204, 204, 204);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#filterDropdown label{
|
||||||
|
color: #333;
|
||||||
|
}
|
|
@ -1,6 +1,7 @@
|
||||||
html,
|
html,
|
||||||
body {
|
body {
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
|
transition: all 0.3s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
html {
|
html {
|
||||||
|
@ -21,6 +22,7 @@ body.fullscreen {
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
margin: 0 !important;
|
margin: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
.videoLink > .duration,
|
.videoLink > .duration,
|
||||||
time.duration{
|
time.duration{
|
||||||
|
@ -52,7 +54,8 @@ time.duration {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.thumbsImageContainer .thumbsImage, #channelLive .thumbsImage {
|
.thumbsImageContainer .thumbsImage,
|
||||||
|
#channelLive .thumbsImage {
|
||||||
border: none;
|
border: none;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
@ -172,14 +175,17 @@ footer ul.list-inline li {
|
||||||
/* Safari */
|
/* Safari */
|
||||||
transition: ease 1s;
|
transition: ease 1s;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* to fix the click on mobile */
|
/* to fix the click on mobile */
|
||||||
.rightBar div {
|
.rightBar div {
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
#videosList, #videosList div {
|
#videosList,
|
||||||
|
#videosList div {
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* end for main video */
|
/* end for main video */
|
||||||
.form-compact .form-control {
|
.form-compact .form-control {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -213,7 +219,10 @@ footer ul.list-inline li {
|
||||||
transition: width 0.3s, margin 0.3s;
|
transition: width 0.3s, margin 0.3s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.panel, #mainNavBar, #sidebar, .swal-modal {
|
.panel,
|
||||||
|
#mainNavBar,
|
||||||
|
#sidebar,
|
||||||
|
.swal-modal {
|
||||||
box-shadow: 0 1px 8px 0 rgb(0 0 0 / 8%);
|
box-shadow: 0 1px 8px 0 rgb(0 0 0 / 8%);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -227,19 +236,28 @@ footer ul.list-inline li {
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 767px) {
|
@media (max-width: 767px) {
|
||||||
.navbar-form, #modeYoutubeBottomContent, .principalContainer,
|
|
||||||
.nopaddingOnSmall,.container-fluid,.container, #yptRightBar,
|
.navbar-form,
|
||||||
|
#modeYoutubeBottomContent,
|
||||||
|
.principalContainer,
|
||||||
|
.nopaddingOnSmall,
|
||||||
|
.container-fluid,
|
||||||
|
.container,
|
||||||
|
#yptRightBar,
|
||||||
body>div.container-fluid.gallery>div {
|
body>div.container-fluid.gallery>div {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.panel-body, .tabbable-panel {
|
.panel-body,
|
||||||
|
.tabbable-panel {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 450px) {
|
@media (max-width: 450px) {
|
||||||
#captchaText, .captcha .input-group {
|
|
||||||
|
#captchaText,
|
||||||
|
.captcha .input-group {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -265,6 +283,7 @@ footer ul.list-inline li {
|
||||||
.commentDetails {
|
.commentDetails {
|
||||||
margin: 0 0 0 60px;
|
margin: 0 0 0 60px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* End Comments */
|
/* End Comments */
|
||||||
|
|
||||||
|
|
||||||
|
@ -356,6 +375,7 @@ footer ul.list-inline li {
|
||||||
.portlet .tabbable-line>.tab-content {
|
.portlet .tabbable-line>.tab-content {
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* END Tabs panel */
|
/* END Tabs panel */
|
||||||
|
|
||||||
.nowrapCell td {
|
.nowrapCell td {
|
||||||
|
@ -416,6 +436,7 @@ footer ul.list-inline li {
|
||||||
.myVote small {
|
.myVote small {
|
||||||
color: #167ac6;
|
color: #167ac6;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* fancy checkbox */
|
/* fancy checkbox */
|
||||||
.material-switch>input[type="checkbox"] {
|
.material-switch>input[type="checkbox"] {
|
||||||
display: none;
|
display: none;
|
||||||
|
@ -534,7 +555,8 @@ img.rotate-270 {
|
||||||
-webkit-transform: rotate(90deg);
|
-webkit-transform: rotate(90deg);
|
||||||
/* Safari and Chrome */
|
/* Safari and Chrome */
|
||||||
-o-transform: rotate(90deg);
|
-o-transform: rotate(90deg);
|
||||||
/* Opera */;
|
/* Opera */
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
img.rotate180,
|
img.rotate180,
|
||||||
|
@ -547,7 +569,8 @@ img.rotate-180 {
|
||||||
-webkit-transform: rotate(180deg);
|
-webkit-transform: rotate(180deg);
|
||||||
/* Safari and Chrome */
|
/* Safari and Chrome */
|
||||||
-o-transform: rotate(180deg);
|
-o-transform: rotate(180deg);
|
||||||
/* Opera */;
|
/* Opera */
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
img.rotate270,
|
img.rotate270,
|
||||||
|
@ -560,7 +583,8 @@ img.rotate-90 {
|
||||||
-webkit-transform: rotate(270deg);
|
-webkit-transform: rotate(270deg);
|
||||||
/* Safari and Chrome */
|
/* Safari and Chrome */
|
||||||
-o-transform: rotate(270deg);
|
-o-transform: rotate(270deg);
|
||||||
/* Opera */;
|
/* Opera */
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
.notificationButton button {
|
.notificationButton button {
|
||||||
|
@ -701,6 +725,7 @@ nav ul.items-container li ul.right-menus li li {
|
||||||
.navbar-left {
|
.navbar-left {
|
||||||
padding-right: 0;
|
padding-right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** header **/
|
/** header **/
|
||||||
|
|
||||||
.navbar .container {
|
.navbar .container {
|
||||||
|
@ -758,6 +783,7 @@ nav ul.items-container li ul.right-menus li li {
|
||||||
padding-top: 12px;
|
padding-top: 12px;
|
||||||
padding-bottom: 12px;
|
padding-bottom: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* End Play List */
|
/* End Play List */
|
||||||
|
|
||||||
#videoContainer {
|
#videoContainer {
|
||||||
|
@ -833,13 +859,15 @@ nav ul.items-container li ul.right-menus li li {
|
||||||
|
|
||||||
.navbar-collapse.in {
|
.navbar-collapse.in {
|
||||||
overflow-y: visible;
|
overflow-y: visible;
|
||||||
/* Bootstrap default is "auto" */;
|
/* Bootstrap default is "auto" */
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
.transparent {
|
.transparent {
|
||||||
opacity: 0.3;
|
opacity: 0.3;
|
||||||
filter: alpha(opacity=30);
|
filter: alpha(opacity=30);
|
||||||
/* For IE8 and earlier */;
|
/* For IE8 and earlier */
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
.principalContainer {
|
.principalContainer {
|
||||||
|
@ -850,7 +878,8 @@ nav ul.items-container li ul.right-menus li li {
|
||||||
font-size: 14px !important;
|
font-size: 14px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
a.h6 h2, a.h6 h1 {
|
a.h6 h2,
|
||||||
|
a.h6 h1 {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -858,7 +887,8 @@ img.blur {
|
||||||
filter: blur(5px);
|
filter: blur(5px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-default .navbar-default, .navbar-inverse .navbar-default {
|
.navbar-default .navbar-default,
|
||||||
|
.navbar-inverse .navbar-default {
|
||||||
border-width: 0;
|
border-width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -890,7 +920,8 @@ img.blur {
|
||||||
border-radius: 15px;
|
border-radius: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-circle:hover, .btn-group.open .btn-circle {
|
.btn-circle:hover,
|
||||||
|
.btn-group.open .btn-circle {
|
||||||
box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.05) inset, 0px 0px 8px rgba(82, 168, 236, 0.6);
|
box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.05) inset, 0px 0px 8px rgba(82, 168, 236, 0.6);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -956,11 +987,13 @@ img.blur {
|
||||||
opacity: 0.2;
|
opacity: 0.2;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-group.justified, .btn-group-justified {
|
.btn-group.justified,
|
||||||
|
.btn-group-justified {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-group-justified .btn, .justified .btn {
|
.btn-group-justified .btn,
|
||||||
|
.justified .btn {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -987,7 +1020,8 @@ img.blur {
|
||||||
max-height: 3.7em;
|
max-height: 3.7em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.vjs-menu-item, .vjs-menu-title {
|
.vjs-menu-item,
|
||||||
|
.vjs-menu-title {
|
||||||
margin: 0 !important;
|
margin: 0 !important;
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
border-radius: 0 !important;
|
border-radius: 0 !important;
|
||||||
|
@ -1032,7 +1066,9 @@ img.blur {
|
||||||
border-right-width: 1px;
|
border-right-width: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#modeYoutubeTop, #mvideo, #videoContainer {
|
#modeYoutubeTop,
|
||||||
|
#mvideo,
|
||||||
|
#videoContainer {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1093,7 +1129,8 @@ li.dropdown-submenu > ul > li > a {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.socket_connected .socket_loading_icon, .socket_disconnected .socket_loading_icon {
|
.socket_connected .socket_loading_icon,
|
||||||
|
.socket_disconnected .socket_loading_icon {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1336,6 +1373,7 @@ li.dropdown-submenu > ul > li > a {
|
||||||
|
|
||||||
/* sm */
|
/* sm */
|
||||||
@media (max-width: 992px) {
|
@media (max-width: 992px) {
|
||||||
|
|
||||||
.btn-group.justified.keepLabels span.hidden-sm,
|
.btn-group.justified.keepLabels span.hidden-sm,
|
||||||
.btn-group.justified.keepLabels span.hidden-xs {
|
.btn-group.justified.keepLabels span.hidden-xs {
|
||||||
display: block !important;
|
display: block !important;
|
||||||
|
@ -1390,7 +1428,9 @@ li.dropdown-submenu > ul > li > a {
|
||||||
background-color: #00000077;
|
background-color: #00000077;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pleaseWaitDialog>div, .pleaseWaitDialog .progress, .pleaseWaitDialog h2 {
|
.pleaseWaitDialog>div,
|
||||||
|
.pleaseWaitDialog .progress,
|
||||||
|
.pleaseWaitDialog h2 {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
|
@ -1403,7 +1443,8 @@ li.dropdown-submenu > ul > li > a {
|
||||||
left: 50%;
|
left: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pleaseWaitDialog .progress, .pleaseWaitDialog h2 {
|
.pleaseWaitDialog .progress,
|
||||||
|
.pleaseWaitDialog h2 {
|
||||||
margin: 0 0 0 -50%;
|
margin: 0 0 0 -50%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
|
@ -1422,23 +1463,40 @@ li.dropdown-submenu > ul > li > a {
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 1200px) {
|
@media (min-width: 1200px) {
|
||||||
.pleaseWaitDialog .progress, .pleaseWaitDialog h2 {
|
|
||||||
|
.pleaseWaitDialog .progress,
|
||||||
|
.pleaseWaitDialog h2 {
|
||||||
margin: 0 0 0 -200px;
|
margin: 0 0 0 -200px;
|
||||||
width: 400px;
|
width: 400px;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.playerFullHeight, .playerFullHeight video, .playerFullHeight audio, .playerFullHeight iframe, .playerFullHeight #mainVideo, .playerFullHeight #main-video {
|
.playerFullHeight,
|
||||||
|
.playerFullHeight video,
|
||||||
|
.playerFullHeight audio,
|
||||||
|
.playerFullHeight iframe,
|
||||||
|
.playerFullHeight #mainVideo,
|
||||||
|
.playerFullHeight #main-video {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ypt-is-expanded .playerFullHeight, .ypt-is-expanded .playerFullHeight video, .ypt-is-expanded .playerFullHeight audio, .ypt-is-expanded .playerFullHeight iframe,
|
.ypt-is-expanded .playerFullHeight,
|
||||||
.ypt-is-expanded .playerFullHeight #mainVideo, .ypt-is-expanded .playerFullHeight #main-video {
|
.ypt-is-expanded .playerFullHeight video,
|
||||||
|
.ypt-is-expanded .playerFullHeight audio,
|
||||||
|
.ypt-is-expanded .playerFullHeight iframe,
|
||||||
|
.ypt-is-expanded .playerFullHeight #mainVideo,
|
||||||
|
.ypt-is-expanded .playerFullHeight #main-video,
|
||||||
|
.ypt-is-compressed .playerFullHeight #videoContainer,
|
||||||
|
.ypt-is-compressed .playerFullHeight #main-video {
|
||||||
height: calc(100vh - 60px);
|
height: calc(100vh - 60px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.playerFullHeight .floatVideo video, .playerFullHeight .floatVideo audio, .playerFullHeight .floatVideo iframe, .playerFullHeight .floatVideo #mainVideo, .playerFullHeight .floatVideo #main-video {
|
.playerFullHeight .floatVideo video,
|
||||||
|
.playerFullHeight .floatVideo audio,
|
||||||
|
.playerFullHeight .floatVideo iframe,
|
||||||
|
.playerFullHeight .floatVideo #mainVideo,
|
||||||
|
.playerFullHeight .floatVideo #main-video {
|
||||||
height: 300px;
|
height: 300px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1451,19 +1509,6 @@ li.dropdown-submenu > ul > li > a {
|
||||||
overflow: auto !important;
|
overflow: auto !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-tabs-horizontal {
|
|
||||||
display: -webkit-box;
|
|
||||||
display: -webkit-inline-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
.scrtabs-tab-container {
|
|
||||||
margin: 5px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.scrtabs-tab-scroll-arrow {
|
|
||||||
border-top: 1px solid #ddd;
|
|
||||||
}
|
|
||||||
|
|
||||||
.videoCreator {
|
.videoCreator {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
@ -1484,7 +1529,8 @@ li.dropdown-submenu > ul > li > a {
|
||||||
margin: 2px 10px 2px 2px;
|
margin: 2px 10px 2px 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.videoCreator>img, .videoCreatorSmall img {
|
.videoCreator>img,
|
||||||
|
.videoCreatorSmall img {
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1811,7 +1857,8 @@ button.btn-sm.hamburger svg {
|
||||||
margin: 15px 0;
|
margin: 15px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.SeoTags h1, .SeoTags h2 {
|
.SeoTags h1,
|
||||||
|
.SeoTags h2 {
|
||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
@ -1868,8 +1915,10 @@ button.btn-sm.hamburger svg {
|
||||||
}
|
}
|
||||||
|
|
||||||
.live-icon::before {
|
.live-icon::before {
|
||||||
content: "\1f534"; /* insert the high voltage sign */
|
content: "\1f534";
|
||||||
animation: glow 1s ease-in-out infinite alternate, flash 1s infinite; /* animate the glow and flash */
|
/* insert the high voltage sign */
|
||||||
|
animation: glow 1s ease-in-out infinite alternate, flash 1s infinite;
|
||||||
|
/* animate the glow and flash */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1877,6 +1926,7 @@ button.btn-sm.hamburger svg {
|
||||||
from {
|
from {
|
||||||
text-shadow: 0 0 10px rgba(255, 0, 0, 0.096);
|
text-shadow: 0 0 10px rgba(255, 0, 0, 0.096);
|
||||||
}
|
}
|
||||||
|
|
||||||
to {
|
to {
|
||||||
text-shadow: 0 0 20px #f00;
|
text-shadow: 0 0 20px #f00;
|
||||||
}
|
}
|
||||||
|
@ -1886,10 +1936,22 @@ button.btn-sm.hamburger svg {
|
||||||
0% {
|
0% {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
50% {
|
50% {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
100% {
|
100% {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.HorizontalFlickity .btn {
|
||||||
|
border-radius: 32px;
|
||||||
|
margin: 5px 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.HorizontalFlickity .flickity-button {
|
||||||
|
width: 22px;
|
||||||
|
height: 22px;
|
||||||
|
}
|
|
@ -219,7 +219,7 @@ li.navsub-toggle a + ul {
|
||||||
|
|
||||||
@media screen and (min-width: 992px) {
|
@media screen and (min-width: 992px) {
|
||||||
|
|
||||||
body.youtube>div.container-fluid{
|
body.youtube{
|
||||||
margin-left: 300px;
|
margin-left: 300px;
|
||||||
}
|
}
|
||||||
body.youtube div.container-fluid .col-sm-10.col-sm-offset-1.list-group-item{
|
body.youtube div.container-fluid .col-sm-10.col-sm-offset-1.list-group-item{
|
||||||
|
|
|
@ -78,7 +78,6 @@ $jsFiles[] = "view/js/webui-popover/jquery.webui-popover.min.js";
|
||||||
$jsFiles[] = "view/js/bootstrap-list-filter/bootstrap-list-filter.min.js";
|
$jsFiles[] = "view/js/bootstrap-list-filter/bootstrap-list-filter.min.js";
|
||||||
$jsFiles[] = "node_modules/js-cookie/dist/js.cookie.js";
|
$jsFiles[] = "node_modules/js-cookie/dist/js.cookie.js";
|
||||||
$jsFiles[] = "node_modules/jquery-toast-plugin/dist/jquery.toast.min.js";
|
$jsFiles[] = "node_modules/jquery-toast-plugin/dist/jquery.toast.min.js";
|
||||||
$jsFiles[] = "view/bootstrap/jquery-bootstrap-scrolling-tabs/jquery.scrolling-tabs.min.js";
|
|
||||||
$jsFiles[] = "view/js/BootstrapMenu.min.js";
|
$jsFiles[] = "view/js/BootstrapMenu.min.js";
|
||||||
|
|
||||||
$jsFiles = array_merge($jsFiles, AVideoPlugin::getJSFiles());
|
$jsFiles = array_merge($jsFiles, AVideoPlugin::getJSFiles());
|
||||||
|
|
|
@ -94,7 +94,6 @@ if (!isBot()) {
|
||||||
?>
|
?>
|
||||||
<link href="<?php echo getURL('view/css/font-awesome-animation.min.css'); ?>" rel="stylesheet" type="text/css" onload="this.media = 'all'" />
|
<link href="<?php echo getURL('view/css/font-awesome-animation.min.css'); ?>" rel="stylesheet" type="text/css" onload="this.media = 'all'" />
|
||||||
<link href="<?php echo getURL('node_modules/jquery-toast-plugin/dist/jquery.toast.min.css'); ?>" rel="stylesheet" type="text/css" onload="this.media = 'all'" />
|
<link href="<?php echo getURL('node_modules/jquery-toast-plugin/dist/jquery.toast.min.css'); ?>" rel="stylesheet" type="text/css" onload="this.media = 'all'" />
|
||||||
<link href="<?php echo getURL('view/bootstrap/jquery-bootstrap-scrolling-tabs/jquery.scrolling-tabs.min.css'); ?>" rel="stylesheet" type="text/css" onload="this.media = 'all'" />
|
|
||||||
<link href="<?php echo getURL('view/js/webui-popover/jquery.webui-popover.min.css'); ?>" rel="stylesheet" type="text/css" onload="this.media = 'all'" />
|
<link href="<?php echo getURL('view/js/webui-popover/jquery.webui-popover.min.css'); ?>" rel="stylesheet" type="text/css" onload="this.media = 'all'" />
|
||||||
<link href="<?php echo getURL('view/js/bootgrid/jquery.bootgrid.css'); ?>" rel="stylesheet" type="text/css" onload="this.media = 'all'" />
|
<link href="<?php echo getURL('view/js/bootgrid/jquery.bootgrid.css'); ?>" rel="stylesheet" type="text/css" onload="this.media = 'all'" />
|
||||||
<link href="<?php echo getURL('node_modules/jquery-ui-dist/jquery-ui.min.css'); ?>" rel="stylesheet" type="text/css" media="print" onload="this.media = 'all'" />
|
<link href="<?php echo getURL('node_modules/jquery-ui-dist/jquery-ui.min.css'); ?>" rel="stylesheet" type="text/css" media="print" onload="this.media = 'all'" />
|
||||||
|
|
|
@ -1,11 +1,31 @@
|
||||||
var last_videos_id = 0;
|
var last_videos_id = 0;
|
||||||
var last_currentTime = -1;
|
var last_currentTime = -1;
|
||||||
var videoViewAdded = false;
|
var videoViewAdded = false;
|
||||||
var addViewBeaconTimeout;
|
|
||||||
var _addViewCheck = false;
|
var _addViewCheck = false;
|
||||||
|
var isVideoPlaying = false;
|
||||||
|
|
||||||
|
// Create an encapsulation for seconds_watching_video
|
||||||
|
var VideoWatchTime = (function () {
|
||||||
|
var seconds_watching_video = 0;
|
||||||
|
|
||||||
|
return {
|
||||||
|
increment: function() {
|
||||||
|
if (isVideoPlaying) {
|
||||||
|
seconds_watching_video++;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
reset: function() {
|
||||||
|
seconds_watching_video = 0;
|
||||||
|
},
|
||||||
|
getValue: function() {
|
||||||
|
return seconds_watching_video;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
})();
|
||||||
|
|
||||||
|
// Modify the addView function
|
||||||
function addView(videos_id, currentTime) {
|
function addView(videos_id, currentTime) {
|
||||||
addViewSetCookie(PHPSESSID, videos_id, currentTime, seconds_watching_video);
|
addViewSetCookie(PHPSESSID, videos_id, currentTime, VideoWatchTime.getValue());
|
||||||
|
|
||||||
if (_addViewCheck) {
|
if (_addViewCheck) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -15,15 +35,12 @@ function addView(videos_id, currentTime) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentTime > 5 && currentTime % 30 !== 0) { // only update each 30 seconds
|
// Removed the currentTime condition
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
_addViewCheck = true;
|
_addViewCheck = true;
|
||||||
last_videos_id = videos_id;
|
last_videos_id = videos_id;
|
||||||
last_currentTime = currentTime;
|
last_currentTime = currentTime;
|
||||||
|
|
||||||
_addView(videos_id, currentTime, seconds_watching_video);
|
_addView(videos_id, currentTime, VideoWatchTime.getValue());
|
||||||
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
_addViewCheck = false;
|
_addViewCheck = false;
|
||||||
|
@ -41,7 +58,6 @@ function _addView(videos_id, currentTime, seconds_watching_video) {
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('_addView 2', videos_id, currentTime, seconds_watching_video);
|
console.log('_addView 2', videos_id, currentTime, seconds_watching_video);
|
||||||
isVideoAddViewCount = true;
|
|
||||||
|
|
||||||
if (typeof PHPSESSID === 'undefined') {
|
if (typeof PHPSESSID === 'undefined') {
|
||||||
PHPSESSID = '';
|
PHPSESSID = '';
|
||||||
|
@ -53,22 +69,28 @@ function _addView(videos_id, currentTime, seconds_watching_video) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isVideoAddViewCount = true;
|
||||||
console.log('_addView 3', videos_id, currentTime, seconds_watching_video);
|
console.log('_addView 3', videos_id, currentTime, seconds_watching_video);
|
||||||
url = addGetParam(url, 'PHPSESSID', PHPSESSID);
|
url = addGetParam(url, 'PHPSESSID', PHPSESSID);
|
||||||
|
// reset seconds_watching_video
|
||||||
|
var seconds_watching_video_to_send = seconds_watching_video;
|
||||||
|
VideoWatchTime.reset();
|
||||||
|
//console.trace();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: url,
|
url: url,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: {
|
data: {
|
||||||
id: videos_id,
|
id: videos_id,
|
||||||
currentTime: currentTime,
|
currentTime: currentTime,
|
||||||
seconds_watching_video: seconds_watching_video
|
seconds_watching_video: seconds_watching_video_to_send
|
||||||
},
|
},
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
console.log('_addView 4', response);
|
console.log('_addView 4', response);
|
||||||
isVideoAddViewCount = false;
|
|
||||||
$('.view-count' + videos_id).text(response.countHTML);
|
$('.view-count' + videos_id).text(response.countHTML);
|
||||||
PHPSESSID = response.session_id;
|
PHPSESSID = response.session_id;
|
||||||
|
}, complete: function(response) {
|
||||||
|
console.log('_addView 5', response);
|
||||||
|
isVideoAddViewCount = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -122,6 +144,49 @@ async function addViewSetCookie(PHPSESSID, videos_id, playerCurrentTime, seconds
|
||||||
Cookies.set('addView_seconds_watching_video', seconds_watching_video, { path: '/', expires: 1 });
|
Cookies.set('addView_seconds_watching_video', seconds_watching_video, { path: '/', expires: 1 });
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function() {
|
async function startAddViewCountInPlayer(){
|
||||||
|
if(typeof player !== 'undefined' && typeof mediaId !== 'undefined'){
|
||||||
|
player.on('play', function () {
|
||||||
|
isVideoPlaying = true;
|
||||||
|
addView(mediaId, this.currentTime());
|
||||||
|
});
|
||||||
|
player.on('pause', function () {
|
||||||
|
isVideoPlaying = false;
|
||||||
|
var time = Math.round(this.currentTime());
|
||||||
|
addView(mediaId, time);
|
||||||
|
});
|
||||||
|
player.on('ended', function () {
|
||||||
|
isVideoPlaying = false;
|
||||||
|
var time = Math.round(this.currentTime());
|
||||||
|
addView(mediaId, time);
|
||||||
|
});
|
||||||
|
|
||||||
|
player.on('timeupdate', function() {
|
||||||
|
var time = Math.round(this.currentTime());
|
||||||
|
if (time === 0 || time % 30 === 0) {
|
||||||
|
addView(mediaId, time);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
setTimeout(function() {
|
||||||
|
startAddViewCountInPlayer();
|
||||||
|
}, 5000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add beforeunload event
|
||||||
|
window.addEventListener('beforeunload', (event) => {
|
||||||
addViewFromCookie();
|
addViewFromCookie();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
// Use setInterval to update seconds_watching_video every second
|
||||||
|
setInterval(function () {
|
||||||
|
VideoWatchTime.increment();
|
||||||
|
}, 1000);
|
||||||
|
|
||||||
|
// Call addViewFromCookie on the next page load
|
||||||
|
addViewFromCookie();
|
||||||
|
|
||||||
|
startAddViewCountInPlayer();
|
||||||
|
});
|
|
@ -125,8 +125,6 @@ async function openLeftMenu() {
|
||||||
closeRightMenu();
|
closeRightMenu();
|
||||||
closeSearchMenu();
|
closeSearchMenu();
|
||||||
}
|
}
|
||||||
var selector = '#buttonMenu svg';
|
|
||||||
$(selector).addClass('active');
|
|
||||||
YPTSidebarOpen();
|
YPTSidebarOpen();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -213,6 +211,8 @@ function YPTSidebarIsOpen() {
|
||||||
return $('body').hasClass('youtube');
|
return $('body').hasClass('youtube');
|
||||||
}
|
}
|
||||||
async function YPTSidebarOpen() {
|
async function YPTSidebarOpen() {
|
||||||
|
var selector = '#buttonMenu svg';
|
||||||
|
$(selector).addClass('active');
|
||||||
$("#sidebar").removeClass('animate__bounceOutLeft');
|
$("#sidebar").removeClass('animate__bounceOutLeft');
|
||||||
$("#sidebar").show();
|
$("#sidebar").show();
|
||||||
$("#sidebar").addClass('animate__animated animate__bounceInLeft');
|
$("#sidebar").addClass('animate__animated animate__bounceInLeft');
|
||||||
|
|
|
@ -266,8 +266,6 @@ async function lazyImage() {
|
||||||
}
|
}
|
||||||
|
|
||||||
var pauseIfIsPlayinAdsInterval;
|
var pauseIfIsPlayinAdsInterval;
|
||||||
var seconds_watching_video = 0;
|
|
||||||
var _startCountPlayingTime;
|
|
||||||
async function setPlayerListners() {
|
async function setPlayerListners() {
|
||||||
if (typeof player !== 'undefined') {
|
if (typeof player !== 'undefined') {
|
||||||
player.on('pause', function () {
|
player.on('pause', function () {
|
||||||
|
@ -275,7 +273,6 @@ async function setPlayerListners() {
|
||||||
//console.log("setPlayerListners: pause");
|
//console.log("setPlayerListners: pause");
|
||||||
//userIsControling = true;
|
//userIsControling = true;
|
||||||
clearInterval(pauseIfIsPlayinAdsInterval);
|
clearInterval(pauseIfIsPlayinAdsInterval);
|
||||||
clearInterval(_startCountPlayingTime);
|
|
||||||
});
|
});
|
||||||
player.on('play', function () {
|
player.on('play', function () {
|
||||||
isTryingToPlay = false;
|
isTryingToPlay = false;
|
||||||
|
@ -291,10 +288,6 @@ async function setPlayerListners() {
|
||||||
pauseIfIsPlayinAdsInterval = setInterval(function () {
|
pauseIfIsPlayinAdsInterval = setInterval(function () {
|
||||||
pauseIfIsPlayinAds();
|
pauseIfIsPlayinAds();
|
||||||
}, 500);
|
}, 500);
|
||||||
clearInterval(_startCountPlayingTime);
|
|
||||||
_startCountPlayingTime = setInterval(function () {
|
|
||||||
seconds_watching_video++;
|
|
||||||
}, 1000);
|
|
||||||
});
|
});
|
||||||
$("#mainVideo .vjs-mute-control").click(function () {
|
$("#mainVideo .vjs-mute-control").click(function () {
|
||||||
Cookies.set('muted', player.muted(), {
|
Cookies.set('muted', player.muted(), {
|
||||||
|
@ -849,7 +842,11 @@ function playNext(url) {
|
||||||
}, 1000);
|
}, 1000);
|
||||||
} else if (isPlayNextEnabled()) {
|
} else if (isPlayNextEnabled()) {
|
||||||
modal.showPleaseWait();
|
modal.showPleaseWait();
|
||||||
if (typeof autoPlayAjax == 'undefined' || !autoPlayAjax) {
|
if (window.parent && typeof window.parent.playNextShorts === 'function') {
|
||||||
|
// Function exists, send a message to call it
|
||||||
|
console.log(" window.parent.postMessage(playNextShorts ");
|
||||||
|
window.parent.postMessage('playNextShorts', '*');
|
||||||
|
} else if (typeof autoPlayAjax == 'undefined' || !autoPlayAjax) {
|
||||||
//console.log("playNext changing location " + url);
|
//console.log("playNext changing location " + url);
|
||||||
document.location = url;
|
document.location = url;
|
||||||
} else {
|
} else {
|
||||||
|
@ -2832,17 +2829,6 @@ $(document).ready(function () {
|
||||||
expires: 365
|
expires: 365
|
||||||
});
|
});
|
||||||
tabsCategoryDocumentHeight = $(document).height();
|
tabsCategoryDocumentHeight = $(document).height();
|
||||||
if (typeof $('.nav-tabs-horizontal').scrollingTabs == 'function') {
|
|
||||||
$('.nav-tabs-horizontal').scrollingTabs();
|
|
||||||
//$('.nav-tabs-horizontal').fadeIn();
|
|
||||||
}
|
|
||||||
setInterval(function () {
|
|
||||||
if (tabsCategoryDocumentHeightChanged()) {
|
|
||||||
if (typeof $('.nav-tabs-horizontal').scrollingTabs == 'function') {
|
|
||||||
$('.nav-tabs-horizontal').scrollingTabs('refresh');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, 2000);
|
|
||||||
modal = getPleaseWait();
|
modal = getPleaseWait();
|
||||||
try {
|
try {
|
||||||
$('[data-toggle="popover"]').popover();
|
$('[data-toggle="popover"]').popover();
|
||||||
|
|
|
@ -14,6 +14,8 @@ foreach ($userGroups as $value) {
|
||||||
$users_tabs[] = ['selector' => 'userGroupGrid' . $value['id'], 'queryString' => '?status=a&user_groups_id=' . $value['id'], 'icon' => 'fas fa-users', 'title' => $value['group_name'], 'active' => '', 'userGroupID' => $value['id']];
|
$users_tabs[] = ['selector' => 'userGroupGrid' . $value['id'], 'queryString' => '?status=a&user_groups_id=' . $value['id'], 'icon' => 'fas fa-users', 'title' => $value['group_name'], 'active' => '', 'userGroupID' => $value['id']];
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
<link href="<?php echo getURL('node_modules/flickity/dist/flickity.min.css'); ?>" rel="stylesheet" type="text/css" />
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading tabbable-line">
|
<div class="panel-heading tabbable-line">
|
||||||
<div class="btn-group pull-right">
|
<div class="btn-group pull-right">
|
||||||
|
@ -34,19 +36,16 @@ foreach ($userGroups as $value) {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
<ul class="nav nav-tabs nav-tabs-horizontal">
|
|
||||||
<?php
|
<?php
|
||||||
|
$_REQUEST['rowCount'] = $_rowCount;
|
||||||
|
$_REQUEST['current'] = $current;
|
||||||
|
$items = array();
|
||||||
foreach ($users_tabs as $value) {
|
foreach ($users_tabs as $value) {
|
||||||
?>
|
$label = "<i class=\"{$value['icon']}\"></i> " . __($value['title']);
|
||||||
<li class="<?php echo $value['active']; ?>">
|
$items[] = array('href' => "#{$value['selector']}Tab", 'tooltip' => __($value['title']), 'onclick' => "startUserGrid('#{$value['selector']}', '{$value['queryString']}', " . intval($value['userGroupID']) . ");", 'label' => $label);
|
||||||
<a data-toggle="tab" href="#<?php echo $value['selector']; ?>Tab" onclick="startUserGrid('#<?php echo $value['selector']; ?>', '<?php echo $value['queryString']; ?>', <?php echo intval($value['userGroupID']); ?>);">
|
|
||||||
<i class="<?php echo $value['icon']; ?>"></i> <?php echo __($value['title']); ?>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<?php
|
|
||||||
}
|
}
|
||||||
|
generateHorizontalFlickity($items);
|
||||||
?>
|
?>
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
|
@ -317,6 +316,8 @@ foreach ($userGroups as $value) {
|
||||||
</div><!-- /.modal-dialog -->
|
</div><!-- /.modal-dialog -->
|
||||||
</div><!-- /.modal -->
|
</div><!-- /.modal -->
|
||||||
|
|
||||||
|
<script src="<?php echo getURL('node_modules/flickity/dist/flickity.pkgd.min.js'); ?>" type="text/javascript"></script>
|
||||||
|
<script src="<?php echo getURL('node_modules/flickity-bg-lazyload/bg-lazyload.js'); ?>" type="text/javascript"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function isAnalytics() {
|
function isAnalytics() {
|
||||||
|
@ -372,8 +373,7 @@ print AVideoPlugin::addUserBtnJS();
|
||||||
data: {
|
data: {
|
||||||
<?php
|
<?php
|
||||||
print AVideoPlugin::updateUserFormJS();
|
print AVideoPlugin::updateUserFormJS();
|
||||||
?>
|
?> "id": $('#inputUserId').val(),
|
||||||
"id": $('#inputUserId').val(),
|
|
||||||
"user": $('#inputUser').val(),
|
"user": $('#inputUser').val(),
|
||||||
"pass": $('#inputPassword').val(),
|
"pass": $('#inputPassword').val(),
|
||||||
"email": $('#inputEmail').val(),
|
"email": $('#inputEmail').val(),
|
||||||
|
@ -405,12 +405,12 @@ print AVideoPlugin::updateUserFormJS();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
});
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
var userGroupShowOnly = '';
|
var userGroupShowOnly = '';
|
||||||
var userGroupQueryString = '';
|
var userGroupQueryString = '';
|
||||||
|
|
||||||
function userGroupFilter(user_groups_id, value) {
|
function userGroupFilter(user_groups_id, value) {
|
||||||
console.log('Filter usergroup', user_groups_id, value);
|
console.log('Filter usergroup', user_groups_id, value);
|
||||||
userGroupShowOnly = value;
|
userGroupShowOnly = value;
|
||||||
|
@ -427,6 +427,7 @@ print AVideoPlugin::updateUserFormJS();
|
||||||
url = addGetParam(url, 'userGroupShowOnly', userGroupShowOnly);
|
url = addGetParam(url, 'userGroupShowOnly', userGroupShowOnly);
|
||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|
||||||
function startUserGrid(selector, queryString, user_groups_id) {
|
function startUserGrid(selector, queryString, user_groups_id) {
|
||||||
userGroupQueryString = queryString;
|
userGroupQueryString = queryString;
|
||||||
if (user_groups_id) {
|
if (user_groups_id) {
|
||||||
|
@ -473,8 +474,7 @@ print AVideoPlugin::updateUserFormJS();
|
||||||
return row.user + photo;
|
return row.user + photo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).on("loaded.rs.jquery.bootgrid", function ()
|
}).on("loaded.rs.jquery.bootgrid", function() {
|
||||||
{
|
|
||||||
/* Executes after data is loaded and rendered */
|
/* Executes after data is loaded and rendered */
|
||||||
grid.find(".command-edit").on("click", function(e) {
|
grid.find(".command-edit").on("click", function(e) {
|
||||||
var row_index = $(this).closest('tr').index();
|
var row_index = $(this).closest('tr').index();
|
||||||
|
@ -531,5 +531,4 @@ print AVideoPlugin::loadUsersFormJS();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
|
@ -13,7 +13,11 @@
|
||||||
<?php
|
<?php
|
||||||
echo $getAdsLeaderBoardTop;
|
echo $getAdsLeaderBoardTop;
|
||||||
}else{
|
}else{
|
||||||
echo "<!-- getAdsLeaderBoardTop is empty -->";
|
echo "<!-- ";
|
||||||
|
echo "getAdsLeaderBoardTop is empty ";
|
||||||
|
echo implode(', ', ADs::getAdsCodeReason('leaderBoardTop'));
|
||||||
|
echo " -->";
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</center>
|
</center>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue