Popular Searches:
Uploading, APIs, Creating Players, BEML
Problem: You’d like the URL that users grab using the “Get Link” button to match the URL of the page.
Solution: Override the current link in the player by calling the setLink() function of the Social Module.
By default, the Brightcove player’s “Get Link” functionality will give a user a URL that lives on Brightcove’s servers. It will look something like this:
http://link.brightcove.com/services/player/bcpid1234567?bctid=1234567890
That can be useful to assure that your users are always able to see your video, but when the page the user sees is hosted by Brightcove, the user loses a lot of context when they view that page. It can be helpful for the user, and your business, if they're able to see navigation to other related content as well as advertising on the page.
You can always set up your player so that the link.brightcove.com URL redirects to your site, but it may not direct exactly where you want it to, especially if your site is set up in a way that you have one video player per page (i.e. each video gets its own page). Also, when using that method, you likely lose some of the SEO benefits you’d gain by using a fully-formed URL. If you’re already being diligent enough to make sure you have SEO-centric URLs for each of your pages, it would be a shame to not take advantage of that for your video as well.
The zip file associated with this article contains a Flex Builder project called LinkSetter. You can examine and modify the code, or you can just take the compiled custom SWF file from the zip file and include it in your player. If you do decide to modify the code, or even just to look at it for educational purposes, keep in mind that you'll need to update the Library Path to the BrightcoveAPI.swc, which you an download and read about here.
The typical way that custom SWF files get included is by use of the SWFLoader component through BEML. However, you may also use the Module element in BEML. Either method will work, but the major difference between the two is that when using the SWFLoader component, the player typically loads first and then loads your custom SWF files, while the opposite is true when using the Module element. Since the order of loading is less of an issue in this case, it’s generally recommended that you use the SWFLoader component instead.
Once the custom SWF is included with your player, you’ll see that when you click the “Get Links” button, the URL presented for copying is the same as it is in the address bar of your browser. Now when your users take that URL, it will be the same URL that others are using to link to that page. Since the URLs are now the same, and now on other sites besides yours, you’ll get a search engine relevancy boost.