Skip to content

Instantly share code, notes, and snippets.

@dimsemenov
Created July 1, 2022 16:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dimsemenov/5166b4e1dd9f0794a1d6be1d607dc11c to your computer and use it in GitHub Desktop.
Save dimsemenov/5166b4e1dd9f0794a1d6be1d607dc11c to your computer and use it in GitHub Desktop.
function rs_use_video_tag() {
?>
var slider = $('.royalSlider').data('royalSlider');
slider.ev.on('rsOnCreateVideoElement', function(e, url) {
slider.videoObj = $('<video src="' + url + '" autoplay></video');
});
<?php
}
add_action('new_rs_after_js_init_code', 'rs_use_video_tag');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment