Created
December 9, 2014 09:25
-
-
Save Sitebase/e68497ef7c4bad436385 to your computer and use it in GitHub Desktop.
Snippet for implementing video attach to a form with BuboBox
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="bbbx-widget" data-widget="11"></div> | |
<script type="text/javascript"> | |
var bbbx_widget_id = 11; | |
var bbbx_visual = false; | |
var bbbx_share_enabled = false; | |
function bbbx_config() { | |
this.subscribe('published', function(e) { | |
BBBX.$('.bubobox_result').html('<a href="javascript:mybb.openPlayer(\'' + e.entryId + '\')">Video bekijken</a> | <a href="javascript:mybb.openRecorder()">Video opnieuw opnemen</a>'); | |
BBBX.$('#video_id').val(e.entryId); | |
}); | |
this.subscribe('recorder.show', function() { | |
mybb.settings.meta = {'name': BBBX.$('#naam').val() + ' ' + BBBX.$('#voornaam').val()}; | |
}); | |
} | |
(function() { | |
var bbbx = document.createElement('script'); bbbx.type = 'text/javascript'; bbbx.async = true; | |
bbbx.src = '//my.bubobox.com/widget.js?id=' + bbbx_widget_id; | |
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(bbbx); | |
})(); | |
</script> | |
<input type="hidden" id="video_id" name="video_id" /><span class="bubobox_result"><a href="javascript:mybb.openRecorder()">Video opnemen</a></span> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment