Thread Starter
ZainB
(@zainb)
Quick Hack for anyone interested in making the inserted videos work with a Responsive theme.
- Open the “sublimeVideo-official” plugin folder
- find the “class-sublimevideo-shortcodes.php” file to edit
- on line 38, add the
data-settings='autoresize:fit' part to the video tag.
- save the file
That works for me for the moment and makes the videos fit to the size of the content area.
It would be nice to see this as a dropdown option in the plugin in future! 😉
Thread Starter
ZainB
(@zainb)
Skip the hack. There’s another way, although it’s not obvious and isn’t properly outlined in the documentation!
Basically, it’s possible to add any “data-setting” attributes (e.g. data-settings="initial-overlay-enable:false; volume-enable:false; autoresize:fit"), but you have to drop the "data-" part off and add it to the shortcode.
So basically, in the shortcode, just add settings="autoresize:fit" to the shortcode.
e.g. [sublimevideo poster="image.jpg" src1="videoSD.mp4" src2="(hd)videoHD.mp4" width="640" height="360" settings="autoresize:fit"]
Important: If you also notice, additional settings can be added into the “data-settings” but you must separate them using semi-colons.
Hope that clears up some confusion for other plugin users. Also hope the documentation is updated slighty. 🙂
This was a big help to me. I looked at the documentation on Sublime’s website but it doesn’t say anything about the WordPress plugin and shortcodes. Thank you.