latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

s2Member video shortcodes

Home Forums Community Forum s2Member video shortcodes

This topic contains 37 replies, has 8 voices. Last updated by  RossGrant 4 years, 3 months ago.

Topic Author Topic
Posted: Sunday Jul 29th, 2012 at 5:52 pm #20629

Here is a test beta s2Member video ShortCode add on plugin thing.

(use at own risk)

https://dl.dropbox.com/u/40574414/s2videos-shotcodes.zip
Edit: new version in below post

If anyone would like it extended to suit your needs please let me know, and if you use it please tell if it works for you.

Features:

HD support
Playlist Support
HTML5 fallback
Download keys
works with/without s3 and/or cloudfront

Usage:

[s2videos]
Required parameters:
[s2videos size="1" width="630" height="335"]

size = number of videos(always 1 unless using playlist(HD versions do not count)),
width = width of player,
height = height of player.

Examples:

ShortCode for 1 video with html5 fallback then download fallback:

[s2videos html5="true" download="true" size="1" width="630" height="335" video1="video.mp4" image1="http://www.site.com/wp-content/thumb.jpg"]

htm5 = use if you want that fall back
download = use if you want that fall back
video1 = file relative to /s2member-files/ or your amazon s3 bucket,
image1 = full-path-to-video-thumbnail.

ShortCode for 1 video with HD option:

[s2videos hd="true" size="1" width="630" height="335" video1="video.mp4" hdvideo1="hdvideo.mp4" image1="http://www.site.com/wp-content/thumb.jpg"]

hd = use if you want to allow HD mode
hdvideo1 = the HD version file relative to /s2member-files/ or your amazon s3 bucket.

ShortCode for playlist with 3 videos:

Required parameters for playlist:
[s2videos size="3" playlistsize="250" playlistthumbs="true" playlistposition="right" width="630" height="335"]

playlistsize = size of playlist in pixels,
playlistthumbs = if you want video thumbnails on the playlist,
playlistposition= postion of playlist in player.

Example:

[s2videos html5="true" download="true" size="3" width="630" height="335" 
video1="video.mp4" image1="http://www.site.com/wp-content/thumb.jpg" title1="Title One" desc1="Description one" 
video2="video2.mp4" image2="http://www.site.com/wp-content/thumb2.jpg" title2="Title Two" desc2="Description Two" 
video3="video3.mp4" image3="http://www.site.com/wp-content/thumb3.jpg" title3="Title Three" desc3="Description Three" ]

size = number of videos in the playlist
title1 = Title of the first video
desc1 = Description of the first Video

Playlist with HD

For each video add the:

hdvideo1="hdvideo.mp4" hdvideo2="hdvideo2.mp4" etc etc

For larger playlist you can see the pattern video1, video2, video3, video4, title1, title2, title3, title4, etc etc. It just has to be sequential eg: 1,2,3,4,5,6 not 1,3,7,9 or it won’t work.

Assumes jwplayer.js is located yoursite.com/jwplayer/jwplayer.js
and player.swf is located yoursite.com/jwplayer/player.swf

I hope I explained how to use it good enough :/ let me know if you get stuck.

  • This topic was modified 4 years, 5 months ago by  Philly. Reason: New version available, don't use this one

List Of Topic Replies

Viewing 25 replies - 1 through 25 (of 37 total)
Author Replies
Author Replies
Posted: Sunday Jul 29th, 2012 at 8:31 pm #20634
Core Love
Username: corelove

This is so great!! I will try it out tonight and let you know how it works.

Posted: Sunday Jul 29th, 2012 at 11:33 pm #20641

That’s awesome, Philly! Thanks for much for sharing with the community and helping so much all the time. You rock! :)

Posted: Monday Jul 30th, 2012 at 7:27 pm #20719
RossGrant
Username: RossGrant

Philly, this looks great!

Can I use these shortcodes to stream audio with S2, and is there anyway to serve the media to people who aren’t members?

I often sell single page access to people with S2 when they are not members.

I just need to embed the videos securely and on some pages place them in simple S2 conditionals to tell them whether to display or not.

Posted: Monday Jul 30th, 2012 at 7:40 pm #20721
Posted: Monday Jul 30th, 2012 at 7:58 pm #20724
RossGrant
Username: RossGrant

One last question Phily. Can we display more than one video on a page at a time?

Posted: Tuesday Jul 31st, 2012 at 7:03 am #20767

Ok some big changes based on the requests.

Please test with the old one disabled. Nearly ready for a final realise I think.

https://dl.dropbox.com/u/40574414/s2Member-Video-Shortcodes-v0.0.4.zip

Its now 2 shortcodes, 1 for a single video(with multi videos per page support) and 1 for playlists

support added for download key to allow non-member the option to view and music only support.

[s2video] 

[s2playlist]

attributes for playlist remain the same but with the addition of a download key to allow non-member the option to view

[s2video downloadkey="true"] 

[s2playlist downloadkey="true"] 

To use for music set the height to 24 and just replace the video file with an appropriate format eg mp3

[s2video height="24"] 

[s2playlist height="24"]

Has been simplified to use for single videos(removed size option and numbers)

[s2video width="" height="" image="" video="" ]
[s2video hd="true" width="" height="" image="" video="" hdvideo="" ]
[s2video html5="true" download="true" hd="true" width="" height="" image="" video="" hdvideo="" ]

To use to embed multiple players in one page set the “id” value to be unique for every shortcode

[s2video id="2"]

[s2video width="" height="" image="" video="" ]
[s2video id="2" width="" height="" image="" video="" ]
[s2video id="3"  width="" height="" image="" video="" ]

An important not with multi embeds:

Each player has to have a unique ID I’m using ‘videoplayer’, when embedding multi players the ID’s will change videoplayer1, videoplayer2, videoplayer3 etc etc, so I have added the class ‘videoplayer’ to every player to make it easy to apply your CSS rules.

  • This reply was modified 4 years, 5 months ago by  Philly.
Posted: Tuesday Jul 31st, 2012 at 9:27 am #20798
RossGrant
Username: RossGrant

Hi Philly!

I’ve just installed the latest version but am only seeing the shortcodes on the page and not seeing the videos.

I must be implementing the codes incorrectly.

I have used the following:

[s2video downloadkey=”true” width=”640″ height=”360″ video=”video1.mp4″ ]

[s2video downloadkey=”true” start=”2″ width=”640″ height=”360″ video=”video2.mp4″ ]

Will the download key allow for non-logged in users to stream the files embedded on the page?

I don’t want them to be able to download them that’s all?

Thanks so much for your help so far! :)

Posted: Tuesday Jul 31st, 2012 at 9:33 am #20799

Hi Ross,

codes are correct have you activated the plugin?

Will the download key allow for non-logged in users to stream the files embedded on the page?

yes it will

Posted: Tuesday Jul 31st, 2012 at 9:37 am #20800
RossGrant
Username: RossGrant

Hi Philly, yeah the plugin is installed and activated. The previous version worked just fine, i deleted it, and then uploaded this new version.

Only shortcodes showing in the page though, no media.

Very strange?

Posted: Tuesday Jul 31st, 2012 at 9:40 am #20801
RossGrant
Username: RossGrant

My fault Philly, for some reason I had re-uploaded the old version! Hahaha, SORRY!

Will test now! :)

Posted: Tuesday Jul 31st, 2012 at 9:56 am #20803
RossGrant
Username: RossGrant

Phily, THIS IS GENIUS!

Seriously, it’s nice and solid, and works great for logged in and logged out users!

Jason needs to incorporate this into the core for sure now!

I’ve tested it pretty thoroughly with S2 conditionals too and it seems to cover all bases. Works great with just mp3, also plays .mov in a h.264 wrapper, .mp4.

Exactly what I needed at the exact right time, I can’t thank you enough!

So Cristian and Jason, is this going to be part of S2 moving forward?

:)

Posted: Tuesday Jul 31st, 2012 at 10:04 am #20804
RossGrant
Username: RossGrant

The only little thing that I notice Philly, and it might just be a browser thing is that if you load the video page up, then switch tabs in Chrome or Safari (I’m on Mac), when you switch back to the tab with the videos on, some of them disappear until you refresh the page.

It could be a JW player issue though and not the plugin?

Posted: Tuesday Jul 31st, 2012 at 10:17 am #20805
RossGrant
Username: RossGrant

The bug with disappearing videos is JW Player, it happens on their official site in Chrome and Safari too.

Your plugin isn’t to blame :)

Posted: Thursday Aug 2nd, 2012 at 3:32 am #20975
Core Love
Username: corelove

Video player is looking great. I’ve been trying to get the hdvideo working. Do I need to purchase the plugin for it to work?

Posted: Thursday Aug 2nd, 2012 at 4:56 am #20979

Hi Core,

You don’t need to purchase to get it to work its bundled, but you may need to purchase a licence depending on your situation.

To get the HD switcher to work you need to reference both version videos

[s2video video="video.mp4" hdvideo="hdvideo.mp4" ]

and if you only want a HD video just reference it like

[s2video video="hdvideo.mp4" ]

What shortcode are you currently using and what response do you get in the browser?

Posted: Thursday Aug 2nd, 2012 at 5:01 am #20980
Core Love
Username: corelove

[s2video html5=”true” hd=”true” width=”720″ height=”429″ image=”http://loveinnerversity.com/images/loveinnerversitylogo550x326.png” video=”truth/f4tsciencefinal560.mp4″ hdvideo=”truth/f4tsciencefinal.mp4″ ]

The video plays, but there is no option to switch.

Posted: Thursday Aug 2nd, 2012 at 5:16 am #20984

Thank you for reporting that Core,

There was a small bug preventing HD switching.

It fixed here

https://dl.dropbox.com/u/40574414/s2Member-Video-Shortcodes-v0.0.4.zip

Posted: Thursday Aug 2nd, 2012 at 7:42 am #20999
Core Love
Username: corelove

Thank you Philly, I have spent a lot of hours trying to get these type of video players to work with no success. I appreciate what you have built.

SD / HD Video works great. I am going to set up my pages now with multiple players, multiple playlists and each with SD/HD. I will let you know how it works.

Posted: Thursday Aug 2nd, 2012 at 8:23 am #21003
Core Love
Username: corelove

Playlist with sd/hd not working. Here is the code:

[s2playlist html5=”true” hd=”true” size=”3″ playlistsize=”250″ playlistposition=”bottom” width=”720″ height=”679″video1=”truth/f4tsciencefinal560.mp4″ hdvideo1=”truth/f4tsciencefinal.mp4″ image1=”http://loveinnerversity.com/images/loveinnerversitylogo550x326.png” title1=”Science” desc1=”Description one” video2=”truth/f4tsuccessfinal560.mp4″ hdvideo2=”truth/f4tsuccessfinal.mp4″ image2=”http://loveinnerversity.com/images/loveinnerversitylogo550x326.png” title2=”Success” desc2=”Description Two” video3=”truth/f4tfriendshipfinal560.mp4″ hdvideo3=”truth/f4tfriendshipfinalredone.mp4″ image3=”http://loveinnerversity.com/images/loveinnerversitylogo550x326.png” title3=”Formula 4 Truth – Friendships” desc3=”Description Three”]

Posted: Thursday Aug 2nd, 2012 at 9:29 am #21009

Thanks Core,

Was missing a ” on the class=”videoplayer

fixed now

https://dl.dropbox.com/u/40574414/s2Member-Video-Shortcodes-v0.0.4.zip

Posted: Thursday Aug 2nd, 2012 at 11:25 am #21020
Core Love
Username: corelove

I have the player working great with 5 sd/hd videos. The playlist looks great and everything is lining up correctly.

I duplicated my code and added a start=”2″ tag to the player, but there is only one player showing up on the screen. The code is the same for both of them. I tried adding a start=”1″ to the first video player. The first player still shows up, but no second player. Here is the code:

[s2playlist start=”1″ html5=”true” hd=”true” size=”5″ playlistsize=”200″ playlistposition=”bottom” width=”720″ height=”629″ video1=”truth/f4tsciencefinal560.mp4″ hdvideo1=”truth/f4tsciencefinal.mp4″ image1=”http://loveinnerversity.com/images/loveinnerversitylogo550x326.png” title1=”Science” desc1=”Description one” video2=”truth/f4tsuccessfinal560.mp4″ hdvideo2=”truth/f4tsuccessfinal.mp4″ image2=”http://loveinnerversity.com/images/loveinnerversitylogo550x326.png” title2=”Success” desc2=”Description Two” video3=”truth/f4tfriendshipfinal560.mp4″ hdvideo3=”truth/f4tfriendshipfinalredone.mp4″ image3=”http://loveinnerversity.com/images/loveinnerversitylogo550x326.png” title3=”Formula 4 Truth – Friendships” desc3=”Description Three” video4=”truth/f4trelationshipfinal560.mp4″ hdvideo4=”truth/f4trelationshipfinal.mp4″ image4=”http://loveinnerversity.com/images/loveinnerversitylogo550x326.png” title4=”Formula 4 Truth – Relationships” desc4=”Description Four” video5=”truth/f4thealthfinal560.mp4″ hdvideo5=”truth/f4thealthfinal.mp4″ image5=”http://loveinnerversity.com/images/loveinnerversitylogo550x326.png” title5=”Formula 4 Truth – Health” desc5=”Description Five”]

[s2playlist start=”2″ html5=”true” hd=”true” size=”5″ playlistsize=”200″ playlistposition=”bottom” width=”720″ height=”629″ video1=”truth/f4tsciencefinal560.mp4″ hdvideo1=”truth/f4tsciencefinal.mp4″ image1=”http://loveinnerversity.com/images/loveinnerversitylogo550x326.png” title1=”Science” desc1=”Description one” video2=”truth/f4tsuccessfinal560.mp4″ hdvideo2=”truth/f4tsuccessfinal.mp4″ image2=”http://loveinnerversity.com/images/loveinnerversitylogo550x326.png” title2=”Success” desc2=”Description Two” video3=”truth/f4tfriendshipfinal560.mp4″ hdvideo3=”truth/f4tfriendshipfinalredone.mp4″ image3=”http://loveinnerversity.com/images/loveinnerversitylogo550x326.png” title3=”Formula 4 Truth – Friendships” desc3=”Description Three” video4=”truth/f4trelationshipfinal560.mp4″ hdvideo4=”truth/f4trelationshipfinal.mp4″ image4=”http://loveinnerversity.com/images/loveinnerversitylogo550x326.png” title4=”Formula 4 Truth – Relationships” desc4=”Description Four” video5=”truth/f4thealthfinal560.mp4″ hdvideo5=”truth/f4thealthfinal.mp4″ image5=”http://loveinnerversity.com/images/loveinnerversitylogo550x326.png” title5=”Formula 4 Truth – Health” desc5=”Description Five”]

Posted: Thursday Aug 2nd, 2012 at 11:29 am #21021

Hi Core,

Thats expected behaviour, I had added support for multiple single videos but not multiple playlists.

Do you need multiple playlists on the same page? Or are you testing possibilities? If you need it I can add it

Posted: Thursday Aug 2nd, 2012 at 11:36 am #21023
Core Love
Username: corelove

Multiple playlists on the same page would be great. We separate the courses we offer using tabs, but the video players read it as 1 page.

Posted: Thursday Aug 2nd, 2012 at 1:07 pm #21037

Added support for multiple playlist players

changed attribute “start” to “id”, id makes much more sense as every player must have a unique id.

https://dl.dropbox.com/u/40574414/s2Member-Video-Shortcodes-v0.0.5.zip

Please test and let me know if its working.

Posted: Thursday Aug 2nd, 2012 at 2:13 pm #21040
Core Love
Username: corelove

This player works amazing Philly.

Have you thought of adding support for display plugins.

http://www.longtailvideo.com/addons/plugins/251/The-Dabber-DNA
http://www.longtailvideo.com/addons/plugins/121/Flow?q=playlist%20effects

I figure these two would be your top plugins for displaying a playlist.

Viewing 25 replies - 1 through 25 (of 37 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.