Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pitube
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TO
pitube
Commits
df2ff1f2
Verified
Commit
df2ff1f2
authored
4 years ago
by
Andrej Ramašeuski
Browse files
Options
Downloads
Patches
Plain Diff
Nebude automaticke zapnuti nahravani
parent
aa5e4cda
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/PiTube/Controller/Nginx.pm
+0
-15
0 additions, 15 deletions
lib/PiTube/Controller/Nginx.pm
with
0 additions
and
15 deletions
lib/PiTube/Controller/Nginx.pm
+
0
−
15
View file @
df2ff1f2
package
PiTube::Controller::
Nginx
;
package
PiTube::Controller::
Nginx
;
use
Mojo::
Base
'
Mojolicious::Controller
';
use
Mojo::
Base
'
Mojolicious::Controller
';
use
Mojo::
UserAgent
;
use
Mojo::
IOLoop
;
use
constant
HLS
=>
qr/^\/
hls
\
/([a-z0-9\-]+)(_\w+)?(\/\w+)?\.(m3u8|ts)$/i
;
use
constant
HLS
=>
qr/^\/
hls
\
/([a-z0-9\-]+)(_\w+)?(\/\w+)?\.(m3u8|ts)$/i
;
...
@@ -36,23 +34,10 @@ sub callback_rtmp {
...
@@ -36,23 +34,10 @@ sub callback_rtmp {
publish_time
=>
(
$c
->
param
('
time
')
//
0
),
publish_time
=>
(
$c
->
param
('
time
')
//
0
),
});
});
# zapnuti nahravani
if
(
$c
->
param
('
record
')
&&
$c
->
param
('
record
')
=~
/(all|audio)/
)
{
my
$record
=
$
1
;
my
$ua
=
Mojo::
UserAgent
->
new
;
Mojo::
IOLoop
->
timer
(
1
=>
sub
($loop) {
my
$res
=
$ua
->
get
(
$c
->
config
->
{
nginx
}{
base_url
}
.
"
/control/record/start?app=stream&name=
$name
&rec=
$record
"
);
});
}
}
}
$c
->
render
(
status
=>
204
,
text
=>
''
);
$c
->
render
(
status
=>
204
,
text
=>
''
);
}
}
sub
callback_hls
{
sub
callback_hls
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment