Big Buck Bunny?
-
Okay, I’m stumped… setting up video player with shortcodes ultimate, have a link to my video and instead it plays a trailer for “Big Buck Bunny”… cute vid, but… any help would be much appreciated!
-
Same here – whether inserted via Add Media or Shortcodes Ult, it inserts Big Buck Bunny. I already made a post about this and nobody has replied. I’m just going to find where in the code it’s broken and try, with my meager php skills, to fix it.
Found it, class.shortcodes.php:
public static function video( $atts = null, $content = null ) { $atts = shortcode_atts( array( 'url' => 'https://www.jplayer.org/video/m4v/Big_Buck_Bunny_Trailer.m4v', 'poster' => 'https://www.jplayer.org/video/poster/Big_Buck_Bunny_Trailer_480x270.png', 'title' => '', 'width' => 600, 'height' => 300, 'controls' => 'yes', 'autoplay' => 'no', 'loop' => 'no', 'class' => '' ), $atts );
I tried setting hte urls to”” but that just broke it. I’ll contact shortcodes ult and let them know.
Just comment out the entire definition of “video()” and it’ll work.
/* public static function video( $atts = null, $content = null ) {
...
}
*/
This should be reported upstream to the plugin developers.
Well, that DOES get rid of Buck Bunny, but then nothing else will play. The php is not strong in this one (me) but I’ll try my hand at hacking away at the code as well ??
the route to the php is:
wp-content/plugins/shortcodes-ultimate/inc/core/class.shortcodes.phpand the code must be like this:
/* public static function video( $atts = null, $content = null ) { $atts = shortcode_atts( array( 'url' => 'https://www.jplayer.org/video/m4v/Big_Buck_Bunny_Trailer.m4v', 'poster' => 'https://www.jplayer.org/video/poster/Big_Buck_Bunny_Trailer_480x270.png', 'title' => '', 'width' => 600, 'height' => 300, 'controls' => 'yes', 'autoplay' => 'no', 'loop' => 'no', 'class' => '' ), $atts ); $atts['url'] = su_scattr( $atts['url'] ); // Generate unique ID $id = uniqid( 'su_video_player_' ); // Check that url is specified if ( !$atts['url'] ) return '<p class="su-error">Video: ' . __( 'please specify correct url', 'su' ) . '</p>'; // Prepare title $title = ( $atts['title'] ) ? '<div class="jp-title">' . $atts['title'] . '</div>' : ''; Shortcodes_Ultimate_Assets::add( 'css', 'su-players-shortcodes' ); Shortcodes_Ultimate_Assets::add( 'js', 'jquery' ); Shortcodes_Ultimate_Assets::add( 'js', 'jplayer' ); Shortcodes_Ultimate_Assets::add( 'js', 'su-players-shortcodes' ); // Create player return '<div style="width:' . $atts['width'] . 'px"><div id="' . $id . '" class="su-video jp-video su-video-controls-' . $atts['controls'] . su_ecssc( $atts ) . '" data-id="' . $id . '" data-video="' . $atts['url'] . '" data-swf="' . plugins_url( 'assets/other/Jplayer.swf', SU_PLUGIN_FILE ) . '" data-autoplay="' . $atts['autoplay'] . '" data-loop="' . $atts['loop'] . '" data-poster="' . $atts['poster'] . '"><div id="' . $id . '_player" class="jp-jplayer" style="width:' . $atts['width'] . 'px;height:' . $atts['height'] . 'px"></div>' . $title . '<div class="jp-start jp-play"></div><div class="jp-gui"><div class="jp-interface"><div class="jp-progress"><div class="jp-seek-bar"><div class="jp-play-bar"></div></div></div><div class="jp-current-time"></div><div class="jp-duration"></div><div class="jp-controls-holder"><span class="jp-play"></span><span class="jp-pause"></span><span class="jp-mute"></span><span class="jp-unmute"></span><span class="jp-full-screen"></span><span class="jp-restore-screen"></span><div class="jp-volume-bar"><div class="jp-volume-bar-value"></div></div></div></div></div></div></div>'; } */
just like jblanco says (thanks jblanco!)
if you uninstall shortcodes ultimate also works, but you lost all this functions.
i put the comments /* */ and it works for meIf you want to disable some shortcodes, you can use this code.
As for non-working videos, I think that problem is in file names. Try to use file names/url with only a-z symbols. For example:
[video url="https://example.com/wp-content/uploads/my-custom-video-url.mp4"]
Hi, Vladimir. The url for big buck bunny is hardcoded into class.shortcodes.php, and I’m not sure why this is only a problem for me. The text of my edited post is :
How about adding some video? I have a 30 second clip of some craziness happening with one of my songs. To add it I can do one of two things (just like with adding audio!). Add Media or Insert Shortcode. The main difference is that Add Media lets you select something that you already uploaded, and Insert Shortcode makes you upload a new file. sloggoth - dancing corpses excerpt [video width="320" height="240" wmv="https://blogs.iddeaarts.org/postmarkj/wp-content/uploads/sites/5/2013/09/sloggoth-dancing-corpses.wmv"][/video]
So you see the URL is fine. But after posting the page looks like this:
I really don’t want to deactivate Shortcodes Ultimate, but I might need to because the video is wonky.
Thanks mate!
MarkHi,
I can see that your syntax is wrong. Please use Insert Shortcode button in next time. Correct syntax is
[video url="..."]
. Also, you need to know that supported video formats is mp4 and flv. Please make sure that you’re using one of them.Hard-coded Url is a default value for cases like yours, when syntax is not correct. It used to prevent more complex errors.
I too am having the same issue with big buck bunny.
I have a theme that is for Churches that has it own video and audio plugin functionality. When I add a video upload and audio upload I get the big buck bunny and a song. I read that if I go into settings and enalble compatibility mode the video and audio work but all other places that I used any SU shortcode now does not work.
I have used 10 or so other shortcodes and all have worked fine until this. Do I have to go back and change all my short codes that I have already used to the new format.
Enable this option if you have some problems with other plugins that uses similar shortcode names
[button] => [su_button] etc.Hi,
you can remove some shortcodes from my plugin. Please use this code to do that.
- The topic ‘Big Buck Bunny?’ is closed to new replies.