Tagged: video
-
AuthorPosts
-
April 15, 2015 at 10:33 am #428780
Hi,
We are using the color section with a self hosted video background.
It worked for a while but after an update the video stopped working.It says there’s a problem in the shortcode.js:
_html5_loop: function( ) { this.player.options.loop = true; },*Uncaught TypeError: Cannot read property ‘options’ of undefined*
What could be the problem and what have we done wrong?
April 16, 2015 at 4:31 pm #429720Hi PageroAB!
It works fine when Enfold is activated instead of your child theme. The problem is most likely in the customized copy of the avia.js file your using in the child theme. Create a new child theme and add your customizations in piece by piece to figure out what’s going on.
Cheers!
ElliottApril 17, 2015 at 8:46 am #430167I’ve added an unmodified version of avia.js to my child theme to check if it’s the code, and enqueues it like Josue is describing in post #360250,
// Replace avia.js function change_aviajs() { wp_dequeue_script( 'avia-default' ); wp_enqueue_script( 'avia-default-child', get_stylesheet_directory_uri().'/js/avia.js', array('jquery'), 2, true ); } add_action( 'wp_enqueue_scripts', 'change_aviajs', 100 );but still no luck. I’m wondering if it’s loading in the wrong sequence?
Other functions are working correctly though, so this is abit of a headache.Cheers
April 17, 2015 at 8:55 am #430170I actually managed to solve this right now!
I changed the “$in_footer” to false, as I was saying earlier that it might be loading in the wrong sequence.wp_enqueue_script( 'avia-default-child', get_stylesheet_directory_uri().'/js/avia.js', array('jquery'), 2, false); }Is there any reason that I wouldn’t want to load this in the header?
Cheers
April 17, 2015 at 8:56 pm #430612Hey!
There may be some other scripts that depend on it. You could try moving all of the other scripts around but it could get messy. I would just leave it in the header.
Best regards,
Elliott -
AuthorPosts
- You must be logged in to reply to this topic.
