The gigya shortcode 1 – inserting videos

WP.com supports javascript and flash, but doesn’t allow you to use those types of code directly, for security reasons – see Support doc on code. To insert objects that would normally require such a code, you use various WP-specific formulas – see Support doc on shortcodes.

Strangely, the gigya shortcode is missing from that doc (perhaps because it’s not as easy to use as, say, the youtube shortcode). Gigya is the shortcode that will show up in your html editor when you use the auto-post-to-WP button that some sites with videos or other flash objects provide. I first got acquainted with it when I experimented with the Mixpod audio players.

Using this shortcode, you can insert any video that provides a flash embed code (not directly allowed in wp.com). You copy the URL and the dimensions of the video from the embed code, and you transform them into a working shortcode this way:

@Tess: WOW THANKS FOR FINDING THIS! Yes, makes for a great quizz! (And, sorry, I changed the URL to the pdf version – the other one was way too long.)

@Dave: The parameters in the version I’m giving in this post are for videos, but the gigya shortcode in general is for flash objects in general, not just videos (which is why I’m going to do at least one more post on it). As for Flickr slideshows in particular, Tess beat me to it: OP in that forum thread found that you just paste the slideshow URL in the html editor.

@Tess: But this won’t work in the sidebar. For the sidebar you need gigya again. OP’s example transformed:

@Tess Thanks for the tip. I went and tried it out, and couldn’t get a Flickr slideshow to play. But I did get Vimeo and YouTube videos to play by the same method, just inserting the url, no shortcode. The oEmbed-ennabled easy embedding feature introduced with WordPress 2.9 seems to work at WordPress.com as well. (I suppose this was already brought up somewhere else in the forums — sorry I’m so out of the loop.)

Well, I use the Vodpod button so it automatically grabs the videos for me. I like having all the videos I wanted to embed collected there. But I’ll use your method for when the Vodpod button doesn’t work or when I don’t need the vid in my collection.

I don’t know. Maybe they haven’t updated the docs yet. Maybe it’s a new development, still in progress (it had started with been able to post youtubes in comments that way, and it’s a mess at the moment: youtube URLs work in posts as well as comments, dailymotion URLs work in posts but not in comments, the URL of the video I put in this post doesn’t work in posts or in comments…). Or maybe because without the shortcode you cannot add options…

Or maybe they’re too busy giving out new themes before they’ve fully tested them; or too busy trying to think of other silly ways to increase traffic.

Sorry, can’t find a workaround. I even tried Vodpod, via which you can supposedly embed just about any video to WP, but WP doesn’t understand this type of flash variables. As far as I can tell, the only thing you can do is link to the URL of the MPEG4 the page provides.

@HI: The page you linked to provides an iframe code, which cannot be used. So you can view the sourcecode of the page and copy the embed code of the video to turn it into the appropriate shortcode. Result:

Hi. That video says it’s licensed for streaming in US and Canada only, so I can’t access the embed code, and I won’t be able to check the end result. The only thing I can do is give you the correct shortcode if you paste the embed code. To make sure the code will show up, paste it this way:

Panos! Thanks for deleting those two attempts. You, my friend, are a true professional!! Thank you again. It works beautifully!! Apologize for the lateness in your time zone, but I appreciate you looking into this for me! -Eddie in NYC! :)

Hi. I’ve tried to embed a YouTube video in the sidebar using the gigya in the text widget (WordPress.com); I used the YouTube embed URL, not the web page URL. Didn’t work. I I used a width of 200 to make it fit in the Twenty Ten sidebar. No luck. Will the shortcode embed videos in the sidebar using the WordPress.com text widget? If so, what am I doing wrong?

Yes, many users don’t know it’s possible – even WP staff still claim it isn’t. And it isn’t easy for anyone except the few who have become accustomed to this sort of trick. So kudos for making it. And kudos for searching the forum: many members don’t bother do do that.

Kickstarter was particularly tricky, as it wouldn’t work the way I’m describing in this post, and I had to dig deeper to find the right URL (as I explained in the forum). So thanks for the suggestion, I might do a post on Kickstarter.

@bevtrayner: You’re welcome! (I guess what you liked is the ability to display a video in the sidebar.)

@missmh2k: I’m not seeing anything VEVO-specific – it’s standard Youtube. And it’s just that Youtube changes things all the time. When I wrote the post, the shortcode you pasted above would have worked. Now you need to use a different URL: replace “embed” with “v”.

You’re welcome, but… sorry, that blog is self-hosted.* So the info or the advice you can find here doesn’t apply.

* One way I can tell is the theme: wp.com blogs are limited to the themes you can load from your dashboard. Another way I can tell is the absence of the grey admin bar all logged-in wp.com users share. And there are ways you can tell: for instance you can add plugins (which aren’t supported in wp.com blogs).

Thank you for all this great info. My older blog was wordpress.org-blog, and the new one is in wordpress.com. I was getting depressed with all the limited options (no youtube playlists, no flash, etc.), but with your info I can overcome these limitations. Thanks!

You can’t make it work, because the embed code the page provides is iframe, not flash. Kickstarter videos are tricky, and I’m going to do a separate post for them. To spare us the details in the meantime, here’s the shortcode you need:

You’re missing the closing quote at the end (between the 0 and the bracket).
But if I use this corrected code, the viewer says I’m forbidden to view the Prezi. Is it yours? If so, maybe you’ve made your Prezi account private?

Thank you Panos. It works now! It was de closing quote and I have the prezi private. But the presentation has a video from youtube and the video doesn’t start, the screen is in black. Could you help me, please?

thanks a mill Panos.. you probably helped wordpress.com keep a customer. I’ve bought extra videopress space as an add-on … and youtube give me an unlimited account… wp.com are too restricted.. I understand security concerns but – a verified account with Livestream simply means we’ve gone through the verification process and surely wp.com can consider Livestream a trusted embed. Anyway, thanks a million again, now, if livestream will deliver to native android we’ll have the perfect storm. (the is a hack btw – use the skyfire browser on Android) little buggy.. but works.

That won’t work, because of various wrong details, but most important: that URL isn’t the URL of a video player, it’s the URL of a webpage. You need to get the embedding code of the video (by clicking on the “integrer” button), isolate this:

@ Panos…….Your knowledge is amazing and really do appreciate the help with how to make widgets work here on wordpress.com…………… im trying to install my reverbnation widget for my music using your gigya shortcode tutorial but still having configuration issues…..what would be the correct html code using your “panos method” with this widget html code that they provided me……

Hi, I hope you can help me with this, I know this script is for wordpress but I wondering if there is a way to embed vevo videos in a regular web site, i did it with the embed feature the problem is that I cant watch the video in my web site because it redirect me to youtube vevo web page, if you guys have any ideas of how to resolve this please let me know.

That won’t work because you’re using the wrong URL. To get the right URL, you need to copy the code that starts with “object”, not the one that starts with “iframe”, so uncheck the little box at the bottom left corner. The right URL in this case is this:

But there’s another way too. Instead of clicking Embed, you can click Share, then click Blogs and click the W button. Fill in your data and it will create a post in your blog.

Was struggling to embed a video from WSJ.com. After reading this thread I got it to work as follows:
[gigya src="VIDEO URL HERE" width="WIDTH NUMBER HERE" height="HEIGHT NUMBER HERE" quality="high" wmode="transparent" allowFullScreen="true" flashVars="INSERT HERE"]

But this just puts the video box on my page, with the play button and all, but when you click the play button, the video doesn’t play. The video box just goes to its black background (whole box black) without playing the video. He seems to have a few errors in the code, like writing quality=”high” twice, and some spaces between between the slash marks and “embed.swf” however when I corrected these it still did not work. Something is missing from the code, the whole video actually playing part lol. I was hoping you could help, it would be very much appreciated. Thank you.

So I see, and I’ve added this one to my collection of embed examples for future reference. I’ve spent the last 1/2 hour or so trying to figure out how to scale the size up, the way I’ve been able to do with some others. Unfortunately, changing just the “width” and “height” parameters causes it to display incorrectly, and changing the numbers in the “src=” part as well causes it not to display anything at all.

As is is okay though, since the “full screen” button works just fine. Thanks again!

@SC:
The “plain link” is not the URL of the video, it’s the URL of that webpage of the site (with the video embedded in it). If there’s a problem on their side with that set of videos, I can’t do anything about it. Compare with an example that does work (shortcode created exactly as explained in my previous reply):http://textsnip.com/8121c5
Where did you start from to locate the video or the page (google, mainpage of the site, other)?

@IM:
And you can’t do anything about it either: some SWFs are resizeable, some aren’t.

Thanks again. I’m not sure what you mean by where I started. I typed NHL Videocenter into google even though my browser probably has the exact address memorized. Just a habit I type web addresses in google. The address probably is just nhlvideocenter.com or something but in case it’s NHL.Videocenter.Com or some different variation like that I just googled it. So I googled it, NHL Videocenter was the first resulted, I clicked that to get to the videocenter, which starts playing the latest video automatically, which is highlights from the last hockey game of last season. There’s a built in search engine in videocenter, so I put the players name I want in the search engine, then a bunch of featured videos show up like “player x at a charity golf tournament” or whatever, because there are two buttons where you can choose “videos” or “highlights,” and it starts out on videos. So with that player’s name in the search engine, the results showing the “videos” by default, I click the highlight box instead, and then it takes me from featured videos of the player to his actual game highlights (the video playing, the last hockey game, it doesnt affect that. That just plays continuously). All clicking on “highlights” does is change the info of the right bar, so the various highlights selection shows up. Then once you click the highlight you want to play in the right bar, that’s when the last game default video will stop and yours will start. So basically you can search stuff and look through which highlight video you want to select without stopping the main video, sort of like a DVD pop-up menu that lets you toggle through things while the DVD still plays. So then I click on the highlight I want, and it plays. I pause it in the middle, or click “share” which pauses it automatically, and then I copy the embed code. I’ve tried clicking the embed code, doing select-all using my keyboard, and then copying and pasting that. I’ve also tried just clicking the “copy” button with my mouse that videocenter has next to the embed code, and then copying it into a document. Ive tried manually toggling my mouse over the whole code until all of it is selected and then copying and pasting that way. I’ve been copying it into textedit. Works for everything else I copy so I don’t think it’s altering anything here.

But that’s basically it. If my description doesn’t make sense you could go to videocenter and just watch a quick highlight or two if you have time so you can see how it works. It also has auto ad videos with the 15 second countdown where you can’t pause them or play any highlights until the video counts down to 0 and finishes. But I dont think thats the issue with the embedding.

Hope this helps you pull of a Jerry Mcguire (as in, hope this helps you help me). Thanks for trying anyhow.

That was a tricky one, because the embed code includes URL character codes, and those have to be converted to the actual characters they represent. Click here for version A:http://textsnip.com/4fe7e3
And here for version B:http://textsnip.com/c53619
Paste A in your HTML post editor if you want the complete thing as originally styled, paste B if you prefer the plain video without the extra black bar and the links at the bottom.

@SC:

Yes, that’s what I asked for, to see if there were alternative ways of finding the same video. But there’s nothing I can do after all. I tried several videos, and this particular bunch of highlights won’t load – while I have no trouble embedding others. Example here:http://textsnip.com/bcb2b2

I am trying to embed an apple video into wordpress.com but it won’t let me obviously. I found this thread and tried the gigya code. It got me a step closer and there’s at least a box showing now, but no video.

b) I’m not seeing a video on that page. If that’s because I don’t have Microsoft’s Silverlight, I’m not going to install it. I can tell you if and how the video code can be converted if you show me the code – see point 4 here first:https://wpbtips.wordpress.com/comment-guidelines/

c) No, WP can’t make it easier. If you ask them, their reply continues to be that you cannot embed flash, javascript or iframe based objects except the ones they officially support. The gigya shortcode was never meant for public use: it’s what you automatically get in your editor when sites provide a post-to-wp.com button. So my gigya workarounds are in essence hacks that WP doesn’t endorse.

I’d like to embed a flashfile with streaming sound (URLRequest) and the sound is working if I just upload the swf and the mp3 to a random server but when I put it in gigya on my wordpress site the sound won’t work. Do you have any idea why that is and how I can solve it?

I can convert any flash embed code, no matter how complicated, into a working gigya shortcode. And flash embed codes don’t have an attribute for sound or no sound. So, your shortcode isn’t exactly correct, but the issue isn’t the shortcode, it’s probably the SWF itself. Unfortunately I only know how to convert the codes I find: I have no experience whatsoever with creating SWFs, so I cannot tell what the problem might be.

I don’t know. What I know is that I tried it again now and it’s working. Did you change anything in the meantime? If not, then maybe WP did. Or maybe there was some problem with the site where the file is stored.

It doesn’t say anything about flashvars because you probably don’t have variables: a flash embed code generally includes flashvars if it offers customization options or if the source URL is the URL of a player into which you feed the file URL. But your source URL is the URL of the file itself.

And the code you pasted doesn’t contain anything useful I haven’t already included in the working shortcode I gave you here:http://textsnip.com/8930f7
(Did you see that reply or did you miss it?)

I finally solved my problem. If i put my swf in another htmlpage or viewed it directly in a browser everything was peachy but to get my external soundfile to work i WordPress i had to remove my dynamic URLRequest adresses and change them to static ones (http://…) eventhough the swf and my mp3 was placed in the same place in the same domain. I hope that this solution can help some other person as new to flash in gigya shortcodes as myself. ;-)

And thank you Panos for giving this blog so much of your time and effort.

Thanks – that’s rare: I’ve got tired of having to link to my guidelines! Textsnip is better, to avoid this (among other reasons):

So. Your BBC example is converted like the second example in my post. To make it easier, just keep this part:
<embed ETC ETC ETC ETC /></object>
And turn it to this:
[gigya ETC ETC ETC ETC ]
Dimensions can be changed.

Thanks for the quick response Panos.
I’ve adjusted the shortcode using your instructions but still no joy.
Here’s the modified code I’m using: http://textsnip.com/fdc248
From reading your Blog, it should work by just using the Gigya shortcode right? Or am I being totally stupid (more probable) and need to install a Plugin first?
Sorry to be a pain. If I get this one right, then I should be OK for any future attempts!

I’m afraid that doesn’t really answer my question: question was in which blog you want to embed the video. So, assuming you want to embed it in a wp.COM blog, the right shortcode is this:http://textsnip.com/906fc5
(The order of the attributes inside the brackets doesn’t matter, but you mustn’t omit allowScriptAccess and you mustn’t convert URL character codes like %2F to the actual characters they represent.)

Hi again Panos, sorry for the misunderstanding.
My Blog is http://www.ideal-country-property.com/blog but I’ve been searching the Internet and it seems that Gigya only works for WordPress.COM hosted blogs rather than the WordPress.ORG self-hosted ones.
Thanks for trying though and for the correct shortcode. I will just have to do some more searching and find a plugin that will let me do a similar thing.
Enjoy the December break.
Cheers.
Stoffer.

As my comment guidelines (and my tagline) say, my blog is exclusively about wp.com blogs: wp.org blogs don’t work the same way. And yes, the gigya shortcode is for wp.com blogs. But I don’t understand: shouldn’t the original embed code work in your blog?

That’s exactly what I thought Panos.
UPDATE: After reading your comment, I thought I’d try publishing it anyway and guess what? It works! Obviously it doesn’t work in preview mode, even in a new window. Sorry for giving you that headache over nothing but I got there in the end thanks to your help.
You can see the finsihed result here: http://www.ideal-country-property.com/blog/2011/12/doctor-who-christmas-special-trailer/
You have a great blog here so keep up the good work and thanks again.
Stoffer.

See? The gigya shortcode doesn’t work in wp.org blogs because you don’t need it: in wp.com blogs we’re not allowed to use flash, javascript and iframe codes, while in a self-hosted blog you don’t have such a restriction.

I still can not get this right to save my life. I’m trying to put a “ESPN NBA Power Ranking Widget” on my right sidebar. What am I not doing the code is blow what do i need to do to post this? Everytime i try i just get a link and im using “Text Widget”……HELP HELP!!!!!! PLEASE!!!!!

It appears to work in part. It leaves a big space (which is blank), the editor doesn’t touch it, and my Ad-Block treats it as something I could block. Yet it still is unplayable because there is only a space for the video, but no video. I have disabled/enabled Ad-Block, and disabled/enabled other possible add-ons which may block the video. I have also tested this in both Firefox and Google Chrome. In addition, you first example only shows an empty space.

I’m tempted to think it is a problem on my end. But I have tested it on two computers, with and without filters. Any help you can offer would be greatly appreciated.

I spoke too soon. The gigya short code worked for a day, then the video changed to something entirely different (and irrelevant). I doubled-checked the URL for the video (from the source) and that hadn’t changed. Tips? Thanks.

Ah, ha! I was missing the Flash part of the short code. Wonder how it even worked the first night? Now, I have learned something new, thanks to you. Sorry again for initially directing you to the wrong site. I set up my profile so long ago I’d forgotten my primary site was our web site, not our blog. Cheers!

Author

Recent Posts

Subject Index

Subject Index

Search for:

Announcement 22/03/2012:
After WP's latest move, this blog will no longer offer active support and assistance. The blog will remain online but commenting on older posts has been disabled.
✶ All theme-related posts are updated up to and including theme 189 in this list, but will not continue to be updated.

Stats

3,258,409 views

Views per month:

Note: if you see ads on this site, they are placed by WordPress, not me.

Mostly on themes, formatting, coding, tweaks and workarounds.
Based on or springing from my contributing in the wp.com forum.