From f652ae2be38e74796ed63ba72e23fcb632818118 Mon Sep 17 00:00:00 2001 From: MaZderMind Date: Sun, 19 Oct 2014 12:12:20 +0200 Subject: restructure room site to produce a unique room/player/formats page --- assets/js/lustiges-script.js | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 assets/js/lustiges-script.js (limited to 'assets/js/lustiges-script.js') diff --git a/assets/js/lustiges-script.js b/assets/js/lustiges-script.js new file mode 100644 index 0000000..a01e510 --- /dev/null +++ b/assets/js/lustiges-script.js @@ -0,0 +1,39 @@ +$(function() { + + $('video').mediaelementplayer({ + usePluginFullScreen: true, + + pluginPath: '/assets/js/lib/', + enableAutosize: true, + + success: function (mediaElement) { + /* + mediaElement.addEventListener('playing', function () { + $.post("http://api.media.ccc.de/public/recordings/count", {event_id: 1609,src: mediaElement.src}); + }, false); + */ + } + }); + $('audio').mediaelementplayer(); + +/* + // activate tab via hash and default to video + function setTabToHash() { + var activeTab = $('.nav-tabs a[href=' + window.location.hash + ']').tab('show'); + + if (activeTab.length === 0) { + window.location.hash = '#video'; + } + } + setTabToHash(); + + + // change hash on tab change + $('.nav-tabs').on('shown.bs.tab', 'a', function (e) { + window.location.hash = e.target.hash; + }); + + // adjust tabs when hash changes + $(window).on('hashchange', setTabToHash); +*/ +}); -- cgit v1.2.3