aboutsummaryrefslogtreecommitdiff
path: root/assets/js
diff options
context:
space:
mode:
authorMaZderMind2015-04-06 00:28:03 +0200
committerMaZderMind2015-04-06 00:28:03 +0200
commit8f14dd9084b10c223508bc9948c5724fc2c9eb63 (patch)
tree9ff0ef30da4a08b7a6f50a3d91afee83ea01479a /assets/js
parentac263c7672d78151ffdf2990dd98127cee572717 (diff)
Audio & Video-Player Embeding
Diffstat (limited to 'assets/js')
-rw-r--r--assets/js/lustiges-script.js22
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();
+ });
+});