Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
W
WordPress_SexHackMe_Plugin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SexHackMe
WordPress_SexHackMe_Plugin
Commits
9df169e9
Commit
9df169e9
authored
May 11, 2024
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add woocommerce Chaturbate tokens payment gateway
parent
e110388b
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
268 additions
and
22 deletions
+268
-22
chaturbate_ico.png
img/chaturbate_ico.png
+0
-0
class-shortcodes.php
includes/class-shortcodes.php
+11
-2
class-video-players.php
includes/class-video-players.php
+2
-2
class-woocommerce-support.php
includes/class-woocommerce-support.php
+243
-12
functions-core.php
includes/functions-core.php
+5
-3
sexhls.js
js/sexhls.js
+6
-2
cropped-sexhack_members-300x99.jpg
templates/img/cropped-sexhack_members-300x99.jpg
+0
-0
hls.php
templates/videoplayer/hls.php
+1
-1
No files found.
img/chaturbate_ico.png
0 → 100644
View file @
9df169e9
8.15 KB
includes/class-shortcodes.php
View file @
9df169e9
...
...
@@ -70,8 +70,13 @@ if(!class_exists('SH_Shortcodes')) {
extract
(
shortcode_atts
(
array
(
"url"
=>
''
,
"posters"
=>
''
,
"autoplay"
=>
false
),
$attr
));
return
"<div class='sexhls_video'>"
.
sh_hls_player
(
$url
,
$posters
)
.
"</div>"
;
ob_start
();
sh_hls_player
(
$url
,
$posters
,
$autoplay
);
$player
=
ob_get_contents
();
ob_end_clean
();
return
"<div class='sexhls_video'>"
.
$player
.
"</div>"
;
}
public
static
function
video_xr
(
$attr
,
$cont
)
...
...
@@ -80,7 +85,11 @@ if(!class_exists('SH_Shortcodes')) {
"url"
=>
''
,
"posters"
=>
''
,
),
$attr
));
return
"<div class='sexvideo_videojs'>"
.
sh_xr_player
(
$url
,
$posters
)
.
"</div>"
;
ob_start
();
sh_xr_player
(
$url
,
$posters
);
$player
=
ob_get_contents
();
ob_end_clean
();
return
"<div class='sexvideo_videojs'>"
.
$player
.
"</div>"
;
}
public
static
function
xframe_bypass
(
$attr
,
$cont
)
...
...
includes/class-video-players.php
View file @
9df169e9
...
...
@@ -29,13 +29,13 @@ if(!class_exists('SH_VideoPlayer')) {
class
SH_VideoPlayer
{
public
static
function
addPlayer
(
$player_type
=
'hls'
,
$vurl
=
''
,
$posters
=
""
,
$projection
=
'180_LR'
)
public
static
function
addPlayer
(
$player_type
=
'hls'
,
$vurl
=
''
,
$posters
=
""
,
$projection
=
'180_LR'
,
$autoplay
=
false
)
{
$html
=
false
;
switch
(
$player_type
)
{
case
'hls'
:
$html
=
sh_get_template
(
"videoplayer/hls.php"
,
array
(
'vurl'
=>
$vurl
,
'posters'
=>
$posters
));
$html
=
sh_get_template
(
"videoplayer/hls.php"
,
array
(
'vurl'
=>
$vurl
,
'posters'
=>
$posters
,
'autoplay'
=>
strval
(
$autoplay
)
));
break
;
case
'xr'
:
...
...
includes/class-woocommerce-support.php
View file @
9df169e9
This diff is collapsed.
Click to expand it.
includes/functions-core.php
View file @
9df169e9
...
...
@@ -28,7 +28,9 @@ function sh_get_template($tmpl, $args=array())
{
foreach
(
$args
as
$var
=>
$data
)
$$var
=
$data
;
if
(
file_exists
(
SH_PLUGIN_DIR_PATH
.
'templates/'
.
$tmpl
))
return
include_once
SH_PLUGIN_DIR_PATH
.
'templates/'
.
$tmpl
;
{
return
include
SH_PLUGIN_DIR_PATH
.
'templates/'
.
$tmpl
;
}
return
false
;
}
...
...
@@ -75,9 +77,9 @@ function sh_genpass_register_form()
}
function
sh_hls_player
(
$video_url
,
$posters
=
''
)
function
sh_hls_player
(
$video_url
,
$posters
=
''
,
$autoplay
=
false
)
{
SH_VideoPlayer
::
addPlayer
(
'hls'
,
$video_url
,
$posters
);
SH_VideoPlayer
::
addPlayer
(
'hls'
,
$video_url
,
$posters
,
''
,
$autoplay
);
}
function
sh_xr_player
(
$video_url
,
$posters
=
''
,
$projection
=
'180_LR'
)
...
...
js/sexhls.js
View file @
9df169e9
...
...
@@ -20,7 +20,7 @@
//var vtag = document.getElementById('vtag');
function
SexHLSPlayer
(
url
,
vuid
){
function
SexHLSPlayer
(
url
,
vuid
,
autoplay
=
false
){
var
vtag
=
document
.
getElementById
(
vuid
);
if
(
Hls
.
isSupported
())
{
vtag
.
volume
=
0.3
;
...
...
@@ -28,10 +28,14 @@ function SexHLSPlayer(url, vuid){
var
m3u8Url
=
decodeURIComponent
(
url
)
hls
.
loadSource
(
m3u8Url
);
hls
.
attachMedia
(
vtag
);
hls
.
on
(
Hls
.
Events
.
MANIFEST_PARSED
,
function
()
{
hls
.
on
(
Hls
.
Events
.
MANIFEST_PARSED
,
function
(
autoplay
)
{
hls
.
autoLevelEnabled
=
true
;
//hls.loadLevel = 4;
hls
.
startLoad
();
if
(
autoplay
==
true
)
{
vtag
.
mute
=
true
;
}
vtag
.
play
();
// XXX Autoplay doesn't work apparently atm
});
//document.title = url
...
...
templates/img/cropped-sexhack_members-300x99.jpg
0 → 100644
View file @
9df169e9
8.49 KB
templates/videoplayer/hls.php
View file @
9df169e9
...
...
@@ -27,7 +27,7 @@ $uid = uniqid('sexhls_');
<video
id=
"
<?php
echo
$uid
;
?>
"
style=
"width: 100%; height: 100%;"
controls
poster=
"
<?php
echo
$posters
;
?>
"
></video>
<script
language=
"javascript"
>
$
(
window
).
on
(
'load'
,
function
()
{
SexHLSPlayer
(
'
<?php
echo
$vurl
;
?>
'
,
'
<?php
echo
$uid
;
?>
'
);
SexHLSPlayer
(
'
<?php
echo
$vurl
;
?>
'
,
'
<?php
echo
$uid
;
?>
'
,
<?php
echo
$autoplay
;
?>
);
$
(
'#
<?php
echo
$uid
;
?>
'
).
on
(
'click'
,
function
(){
this
.
paused
?
this
.
play
():
this
.
pause
();});
Mousetrap
(
document
.
getElementById
(
'
<?php
echo
$uid
;
?>
'
)).
bind
(
'space'
,
function
(
e
,
combo
)
{
SexHLSplayPause
(
'
<?php
echo
$uid
;
?>
'
);
});
Mousetrap
(
document
.
getElementById
(
'
<?php
echo
$uid
;
?>
'
)).
bind
(
'up'
,
function
(
e
,
combo
)
{
SexHLSvolumeUp
(
'
<?php
echo
$uid
;
?>
'
);
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment