Video Shortcodes

Shortcodes are easy to add with S3 Media Maestro. There is a shortcode generator button just above the "kitchen sink" in the page and post editor. When you fill out the short code generator form, it will dynamically create the shortcode for you.

There are two ways to add video. You can add video securely when video is hosted by Amazon S3 using the [s3video s3url"myS3video.mp4"] shortcode, or you can add video hosted anywhere using the [s3video url="http://mydomain.com/myvideo.mp4"] shortcode. The difference is that with the secure Amazon video, you only need the file name, or folders and file name. The un-secure video requires a full URL.

Here are some shortcode examples

Example 1 - As long as you have your Access Key, Secret Key, Bucket and Default Expiry defined in the settings then all you need is the following. This also assumes that the files exist in the bucket you have defined in the settings.

[s3video s3url="your_video_file.mp4" /] This is secure video hosted on Amazon S3

Example 2 - You don't have to use S3 for the player. You can use any URL for the player using the url parameter rather than s3url, however it will not be protected.

[s3video url="http://yourwebsite.com/your_video_file.mp4" /] This is un-secure video hosted anywhere

Example 3 - This example uses the sample authentication settings for Amazon S3, but uses a different bucket and enables autoplay.

[s3video s3url="another_video_file.mp4" s3bucket="another-bucket" autoplay="yes" /] This is a secure video hosted on Amazon that is located in a bucket other than the default bucket specified.

Example 4 - This example shows you how to use completely different S3 settings. The expiry is set to 60 minutes.

[s3video s3accesskey="access_key" s3secretkey="secret_key" s3expiry="60"   s3url="another_video_file.mp4" s3bucket="another-bucket" autoplay="yes" /] This is a secure video from another Amazon user because the default access keys are overwritten by the defined access keys. The default expiry time is also overwritten since it is specified. Also the video will play upon page load.

Example 5 - This example shows you how to use playlists along with setting titles for the various videos in the playlist. Separate each video with a comma. Also be sure to use the same file type for all video's in a playlist.

[s3video s3url="video1.mp4,video2.mp4,video3.mp4" titles="Title for Video 1,Title for Video 2,Title for Video 3" /]This a playlist of secured videos hosted on AWS S3. You can use videos hosted elsewhere including YouTube in a playlist. You can mix audio and video, however, you can't mix YouTube with other audio/video files in a playlist.

Example 6 - This example shows most of the available options being used at once.

[s3video s3accesskey="access_key" s3secretkey="secret_key" s3expiry="60"   s3url="another_video_file.mp4" s3bucket="another-bucket" autoplay="yes"   height="360" width="480" preload="auto" loop="yes" volume="0.7"   splash="http://www.example.com/poster.jpg" skin="ted" /] This video has a height and width defined, as well as default volume. The video will also preload but not play. The "Ted" skin is also used for the video player.

Here are all the parameters possible.

s3url The path of the file in your S3 bucket to create a link to. This does not include 'http://'. Just a filename, and maybe a folder or two.

s3bucket The name of the bucket that your files belong to. This overrides what you have in the settings, allowing you to access files in many different buckets.

s3accesskey Your S3 access key, overrides what's in the settings.

s3secretkey Your S3 secret key, overrides what's in the settings.

s3expiry The expiry time of the link, in minutes. If not specified, the expiry time in the settings is used.

url The full URL (including HTTP://) of a non-S3 resource to show in the player.

titles When using playlists, you can specify titles for your videos. Simply separate each video by using a comma.
preload Uses the HTML5 preload values of either  autometadata or none. The default is to auto preload the media.

autoplay Automatically plays the media as soon as the page is loaded. Set value to  yes to enable.

loop Automatically plays the media again once it's finished (i.e. loop the playing). Set value to  yes to enable.

volume Allows you to set the volume before the media plays. Set the value to a decimal value between 0 and 1, e.g.  0.5 for 50%, 0.75 for 75%, 1 for 100%.
  
hidepoweredby If you are showing the  Powered By S3 Media Maestro links, this hides the link just for this player. Set value toyes to hide the link, regardless of what's in the settings.

width The width, in pixels, of the media player. You just need a number, there's no need to add a unit.
  
height The height, in pixels, of the video player. You just need a number, there's no need to add a unit. (Not applicable for audio players)

splash The URL of an image to be displayed before playback of the video starts. To get the best from this, use an image the same size as the video player.

skin Shows a custom skin for the media player. Set the value to  ted for a TED-talks style player, set to wmp for a Windows Media Player style player. Not using this parameter shows the default player.