Skip to content
Snippets Groups Projects
Commit 80bd1c13 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms Committed by David Siegfried
Browse files

remove remains of flash player, fixes #4643

Closes #4643

Merge request studip/studip!3463
parent 9e139990
No related branches found
No related tags found
No related merge requests found
......@@ -45,11 +45,5 @@ $(document).on('click', '.opengraph-area .switcher button', function (event) {
buttons.right.attr('disabled', current.next('.opengraph').length === 0);
}
event.preventDefault();
}).on('click', '.opengraph a.flash-embedder', function (event) {
let url = $(this).attr('href');
let template = _.template('<iframe width="100%" height="200px" frameborder="0" src="<%= url %>" allowfullscreen></iframe>');
$(this).replaceWith(template({ url: url }));
event.preventDefault();
});
......@@ -62,29 +62,6 @@
padding: $padding;
min-height: $height;
.flash-embedder {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100px;
background-position: center center;
background-repeat: no-repeat;
background-size: 100% auto;
.play {
border-radius: 100px;
transition: background-color var(--transition-duration);
background-color: rgba(0, 0, 0, 0.7);
padding: 10px;
}
&:hover .play {
background-color: rgba(0, 0, 0, 1);
}
}
.video .flash-embedder {
height: 200px;
}
a.info {
box-sizing: border-box;
color: var(--black);
......
<?php
/**
* @var OpenGraphURL $og
*/
?>
<?php
$videofiles = $og->getVideoFiles();
$audiofiles = $og->getAudioFiles();
$og['image'] = filter_var($og['image'], FILTER_VALIDATE_URL) ? $og['image'] : '';
......@@ -32,38 +37,20 @@ if (Config::get()->LOAD_EXTERNAL_MEDIA === "proxy" && Seminar_Session::is_curren
</a>
<? if (count($videofiles)) : ?>
<div class="video">
<? if (in_array($videofiles[0][1], ["text/html", "application/x-shockwave-flash"])) : ?>
<a href="<?= htmlReady($videofiles[0][0]) ?>"
class="flash-embedder"
style="background-image: url('<?= htmlReady($media_url_func($og['image'])) ?>');"
title="<?= _("Video abspielen") ?>">
<?= Icon::create('play', 'clickable')->asImg(80, ["class" => "play"])?>
</a>
<? else : ?>
<video width="100%" height="200px" controls>
<? foreach ($videofiles as $file) : ?>
<source src="<?= htmlReady($media_url_func($file[0])) ?>"<?= $file[1] ? ' type="'.htmlReady($file[1]).'"' : "" ?>></source>
<source src="<?= htmlReady($media_url_func($file[0])) ?>"<?= $file[1] ? ' type="'.htmlReady($file[1]).'"' : "" ?>>
<? endforeach ?>
</video>
<? endif ?>
</div>
<? endif ?>
<? if (count($audiofiles)) : ?>
<div class="audio">
<? if (in_array($audiofiles[0][1], ["text/html", "application/x-shockwave-flash"])) : ?>
<a href="<?= htmlReady($audiofiles[0][0]) ?>"
class="flash-embedder"
style="background-image: url('<?= htmlReady($media_url_func($og['image'])) ?>');"
title="<?= _("Audio abspielen") ?>">
<?= Icon::create('play', 'clickable')->asImg(100)?>
</a>
<? else : ?>
<audio width="100%" height="50px" controls>
<? foreach ($audiofiles as $file) : ?>
<source src="<?= htmlReady($media_url_func($file[0])) ?>"<?= $file[1] ? ' type="'.htmlReady($file[1]).'"' : "" ?>></source>
<source src="<?= htmlReady($media_url_func($file[0])) ?>"<?= $file[1] ? ' type="'.htmlReady($file[1]).'"' : "" ?>>
<? endforeach ?>
</audio>
<? endif ?>
</div>
<? endif ?>
</div>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment