diff --git a/resources/assets/javascripts/bootstrap/opengraph.js b/resources/assets/javascripts/bootstrap/opengraph.js index 9b4ce3caa10296c046eda875c01c5fdea1ff0068..a72e2c231b9d0451b9025160cc937cf320894bd3 100644 --- a/resources/assets/javascripts/bootstrap/opengraph.js +++ b/resources/assets/javascripts/bootstrap/opengraph.js @@ -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(); }); diff --git a/resources/assets/stylesheets/scss/opengraph.scss b/resources/assets/stylesheets/scss/opengraph.scss index 2e529df86ba65a1de8dd6de86f2a9d31fd20ba38..727f6dac5247cacc35b7852899993469ec18472d 100644 --- a/resources/assets/stylesheets/scss/opengraph.scss +++ b/resources/assets/stylesheets/scss/opengraph.scss @@ -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); diff --git a/templates/shared/opengraphinfo_wide.php b/templates/shared/opengraphinfo_wide.php index 44ce918a7c24232a036210d1ec0e21390ca52886..0637232808ee343e530532ee52bbc1169708aae6 100644 --- a/templates/shared/opengraphinfo_wide.php +++ b/templates/shared/opengraphinfo_wide.php @@ -1,4 +1,9 @@ <?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>