Add video support with special tag
This commit is contained in:
parent
dd717e331c
commit
b0d16ccfe7
|
@ -1,3 +1,9 @@
|
||||||
|
.video-js-style {
|
||||||
|
position: relative !important;
|
||||||
|
width: 100% !important;
|
||||||
|
height: auto !important;
|
||||||
|
}
|
||||||
|
|
||||||
.navbar-custom {
|
.navbar-custom {
|
||||||
background-color: #ff5500;
|
background-color: #ff5500;
|
||||||
}
|
}
|
||||||
|
|
|
@ -253,9 +253,14 @@ else
|
||||||
<link rel="stylesheet" type="text/css" href="/css/emoji.css" />
|
<link rel="stylesheet" type="text/css" href="/css/emoji.css" />
|
||||||
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css" />
|
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css" />
|
||||||
<link rel="stylesheet" type="text/css" href="/css/style.css" />
|
<link rel="stylesheet" type="text/css" href="/css/style.css" />
|
||||||
|
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/vlitejs@4.0.5/dist/plugins/subtitle.min.css" />
|
||||||
|
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/vlitejs@4.0.5/dist/vlite.min.css" />
|
||||||
<?php print(($_SESSION['md_admin'] == true)?'<link rel="stylesheet" href="/css/codemirror.min.css" />':''); ?>
|
<?php print(($_SESSION['md_admin'] == true)?'<link rel="stylesheet" href="/css/codemirror.min.css" />':''); ?>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/vlitejs@4.0.5/dist/plugins/subtitle.min.js"></script>
|
||||||
|
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/vlitejs@4.0.5/dist/plugins/pip.min.js"></script>
|
||||||
|
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/vlitejs@4.0.5/dist/vlite.min.js"></script>
|
||||||
<script type="text/javascript" src="/js/jquery.min.js"></script>
|
<script type="text/javascript" src="/js/jquery.min.js"></script>
|
||||||
<script type="text/javascript" src="/js/popper.min.js"></script>
|
<script type="text/javascript" src="/js/popper.min.js"></script>
|
||||||
<script type="text/javascript" src="/js/bootstrap.min.js"></script>
|
<script type="text/javascript" src="/js/bootstrap.min.js"></script>
|
||||||
|
|
|
@ -115,6 +115,8 @@ class ParsedownExtraplus extends ParsedownExtra
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($Link['element']['text']!="video")
|
||||||
|
{
|
||||||
$Inline = array(
|
$Inline = array(
|
||||||
'extent' => $Link['extent'] + 1,
|
'extent' => $Link['extent'] + 1,
|
||||||
'element' => array(
|
'element' => array(
|
||||||
|
@ -142,7 +144,23 @@ class ParsedownExtraplus extends ParsedownExtra
|
||||||
$Inline['element']['attributes'] += $Link['element']['attributes'];
|
$Inline['element']['attributes'] += $Link['element']['attributes'];
|
||||||
|
|
||||||
unset($Inline['element']['attributes']['href']);
|
unset($Inline['element']['attributes']['href']);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$Inline = array(
|
||||||
|
'extent' => $Link['extent'] + 1,
|
||||||
|
'element' => array(
|
||||||
|
'name' => 'video',
|
||||||
|
'attributes' => array(
|
||||||
|
'src' => $Link['element']['attributes']['href'],
|
||||||
|
'id' => 'player',
|
||||||
|
'controls' => '',
|
||||||
|
'class' => 'v-vlite video-js-style',
|
||||||
|
'playsinline' => ''
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
return $Inline;
|
return $Inline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue