diff options
author | MaZderMind | 2015-04-06 00:28:03 +0200 |
---|---|---|
committer | MaZderMind | 2015-04-06 00:28:03 +0200 |
commit | 8f14dd9084b10c223508bc9948c5724fc2c9eb63 (patch) | |
tree | 9ff0ef30da4a08b7a6f50a3d91afee83ea01479a /assets/js | |
parent | ac263c7672d78151ffdf2990dd98127cee572717 (diff) |
Audio & Video-Player Embeding
Diffstat (limited to 'assets/js')
-rw-r--r-- | assets/js/lustiges-script.js | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/assets/js/lustiges-script.js b/assets/js/lustiges-script.js index 417b234..09d4ef1 100644 --- a/assets/js/lustiges-script.js +++ b/assets/js/lustiges-script.js @@ -151,12 +151,12 @@ $(function() { } })(mejs.i18n.locale.strings); - $('body.room video').mediaelementplayer({ + $('body.room video, body.embed video').mediaelementplayer({ pluginPath: 'assets/mejs/', features: ['playpause', 'volume', 'fullscreen'], enableAutosize: true }); - $('body.room audio').mediaelementplayer({ + $('body.room audio, body.embed audio').mediaelementplayer({ features: ['playpause', 'volume', 'current'] }); @@ -522,3 +522,21 @@ $(function() { renderFrame(); }); }); + +// embed-form +$(function() { + $('.embed-form #size').on('click', function() { + var + $size = $(this), + selected = $size.val().split(','), + $codefield = $('#embed-code') + $iframe = $( $codefield.val() ), + $iframe.attr({width: selected[0], height: selected[1]}); + + $codefield.val( $iframe.prop('outerHTML') ); + }).trigger('click'); + + $('.embed-form').on('click', 'input[type=text]', function() { + $(this).select(); + }); +}); |