BigVideo.js
BigVideo.js copied to clipboard
Need explanation : BigVideo.js and Grunt...
Hi there,
I'm trying to use BigVideo.js in a workflow with grunt...
But, and I don't know exactly why, I just have some error (eg. "Uncaught TypeError: undefined is not a function")...
Here the Gruntfile.js uglify section :
video: {
files: {
'js/video.min.js': [
'packages/jquery-ui/ui/jquery-ui/minified/jquery-ui.min.js',
'packages/imagesloaded/imagesloaded.js',
'packages/video.js/video.js',
'packages/BigVideo.js/lib/bigvideo.js',
]
}
}, // video
The main script :
$('div.background')
.each(function () {
var $el = $(this), data = $el.data();
if (data.src) {
var BV = new $.BigVideo();
BV.init();
BV.show(data.src);
}
});
Did I miss something ?
Thank's for your help!
Br, Mk
Same here.
Error similar to @monkeymonk.
uglify: {
dist: {
files: {
'js/video.min.js': [
'bower_components/video.js/video.js',
'bower_components/BigVideo.js/lib/bigvideo.js',
'bower_components/jquery-ui/ui/jquery-ui.js',
'bower_components/jquery-ui/ui/jquery.ui.slider.js',
'bower_components/imagesloaded/imagesloaded.js',
'bower_components/eventErmitter/EventErmitter.js',
'bower_components/eventie/eventie.js',
],
'js/bowercomps.min.js': [
'bower_components/jquery-backstretch/jquery.backstretch.js',
'bower_components/jquery-mousewheel/jquery.mousewheel.js'
],
'js/all.min.js': [
'js/vendor/bootstrap.min.js',
'js/fancybox/fancybox.pack.js',
'js/plugins.js',
'js/main.js'
]
}
}
}
did you find a solution?
Did you try breaking BigVideo js files/dependencies out of grunt and into just linked scripts?
I was have a similar issue and I ignored them from grunt/uglify and they seemed to work fine once i linked them.
My origin thought is that uglify is doing something weird.
@knynkwl Actually i did not. My solution in this case was to completely abandon VideoJS and build my own Wrapper for the Video. I'd provide you with the code if you'd like.
@jeremyzahner Very much so! :)
@jeremyzahner would love to see what you got!
I am not using Bower, but I had this exact same issue. I solved it by downloading EventEmitter.js from https://github.com/Wolfy87/EventEmitter and including it in my project.