diff options
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(); + }); +}); |