Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Moodle Filter Opencast
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elc
Moodle Filter Opencast
Commits
36447286
Commit
36447286
authored
3 years ago
by
Tamara Gunkel
Browse files
Options
Downloads
Patches
Plain Diff
use moodle url for path to mod oc player
parent
ef9ef911
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
filter.php
+3
-2
3 additions, 2 deletions
filter.php
templates/player.mustache
+2
-1
2 additions, 1 deletion
templates/player.mustache
with
5 additions
and
3 deletions
filter.php
+
3
−
2
View file @
36447286
...
...
@@ -47,7 +47,7 @@ class filter_opencast extends moodle_text_filter
* @throws dml_exception
*/
public
function
filter
(
$text
,
array
$options
=
array
())
{
global
$PAGE
;
global
$CFG
,
$PAGE
;
$i
=
0
;
if
(
stripos
(
$text
,
'</video>'
)
===
false
)
{
...
...
@@ -122,6 +122,7 @@ class filter_opencast extends moodle_text_filter
$mustachedata
->
data
=
json_encode
(
$data
);
$mustachedata
->
width
=
$width
;
$mustachedata
->
height
=
$height
;
$mustachedata
->
modplayerpath
=
(
new
moodle_url
(
'/mod/opencast/player.html'
))
->
out
();
if
(
count
(
$data
[
'streams'
])
===
1
)
{
$sources
=
$data
[
'streams'
][
0
][
'sources'
];
...
...
This diff is collapsed.
Click to expand it.
templates/player.mustache
+
2
−
1
View file @
36447286
...
...
@@ -27,6 +27,7 @@
"height"
:
"250"
,
"playerid"
:
"ocplayer_0"
,
"configurl"
:
"/filter/opencast/config.json"
,
"modplayerpath"
:
"/mod/opencast/player.html"
,
"data"
:
"{"metadata":{"title": "Test video", "etc": "..."}"
}
}}
...
...
@@ -37,7 +38,7 @@
{{^
resolution
}}
<div
class=
"filter-opencast player-wrapper"
>
{{/
resolution
}}
<iframe
src=
"
/
mod
/opencast/player.html
"
class=
"filter-player-iframe"
id=
"
{{
playerid
}}
"
allowfullscreen
></iframe>
<iframe
src=
"
{{
mod
playerpath
}}
"
class=
"filter-player-iframe"
id=
"
{{
playerid
}}
"
allowfullscreen
></iframe>
</div>
<script>
...
...
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