function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
MANATTWebMANATTWeb 

Video from external CDN (Limelight)

Has anyone had success displaying video on a VF page by using the embed code from a CDN like Limelight? Here's the code they provide:

 

<span class="LimelightEmbeddedPlayer"><script src="http://assets.delvenetworks.com/player/embed.js"></script><object type="application/x-shockwave-flash" id="limelight_player_393753" name="limelight_player_393753" class="LimelightEmbeddedPlayerFlash" width="800" height="360" data="http://assets.delvenetworks.com/player/loader.swf"><param name="movie" value="http://assets.delvenetworks.com/player/loader.swf"/><param name="wmode" value="window"/><param name="allowScriptAccess" value="always"/><param name="allowFullScreen" value="true"/><param name="flashVars" value="deepLink=true&amp;playerForm=LVPPlayerHorizontalPlaylist&amp;channelId=59affe0988334bbb82412775fd75c62c"/></object><script>LimelightPlayerUtil.initEmbed('limelight_player_393753');</script></span>

 

The player shows up, but it doesn't play and the play button does nothing.

 

I'm sure I'm missing something and any bit of help would be appreciated.

Best Answer chosen by Admin (Salesforce Developers) 
S91084S91084

Store the video as a static resource and call it in an apex:iframe tag in the visualforce page.

 

In a note pad file copy the below code:

 

<html>

<body>

<span class="LimelightEmbeddedPlayer"><script src="http://assets.delvenetworks.com/player/embed.js"></script><object type="application/x-shockwave-flash" id="limelight_player_393753" name="limelight_player_393753" class="LimelightEmbeddedPlayerFlash" width="800" height="360" data="http://assets.delvenetworks.com/player/loader.swf"><param name="movie" value="http://assets.delvenetworks.com/player/loader.swf"/><param name="wmode" value="window"/><param name="allowScriptAccess" value="always"/><param name="allowFullScreen" value="true"/><param name="flashVars" value="deepLink=true&amp;playerForm=LVPPlayerHorizontalPlaylist&amp;channelId=59affe0988334bbb82412775fd75c62c"/></object><script>LimelightPlayerUtil.initEmbed('limelight_player_393753');</script></span>

</body>

</html>

 Save the file with some name.html (For example, video.html). Then create a static resource, video and make it as public. Then in your visualforce page use the below tag where you want to display the video:

 

<apex:iframe src="{!$Resource.Video}"/>

 

Let me know if you face any issues.

 

All Answers

S91084S91084

Do you have adobe shockwave player installed on your machine. Probably that could be the reason why the video is not played.

MANATTWebMANATTWeb

Yes - If I embed this code in a page on my normal web server, it works fine. Do I need to use the apex:flash tag?

S91084S91084

Store the video as a static resource and call it in an apex:iframe tag in the visualforce page.

 

In a note pad file copy the below code:

 

<html>

<body>

<span class="LimelightEmbeddedPlayer"><script src="http://assets.delvenetworks.com/player/embed.js"></script><object type="application/x-shockwave-flash" id="limelight_player_393753" name="limelight_player_393753" class="LimelightEmbeddedPlayerFlash" width="800" height="360" data="http://assets.delvenetworks.com/player/loader.swf"><param name="movie" value="http://assets.delvenetworks.com/player/loader.swf"/><param name="wmode" value="window"/><param name="allowScriptAccess" value="always"/><param name="allowFullScreen" value="true"/><param name="flashVars" value="deepLink=true&amp;playerForm=LVPPlayerHorizontalPlaylist&amp;channelId=59affe0988334bbb82412775fd75c62c"/></object><script>LimelightPlayerUtil.initEmbed('limelight_player_393753');</script></span>

</body>

</html>

 Save the file with some name.html (For example, video.html). Then create a static resource, video and make it as public. Then in your visualforce page use the below tag where you want to display the video:

 

<apex:iframe src="{!$Resource.Video}"/>

 

Let me know if you face any issues.

 

This was selected as the best answer
MANATTWebMANATTWeb

This works great - now trying to figure out how to make that embed code dynamic by passing a URL parameter to the source file. I had to use a regular HTML iframe and not an apex:iframe, but that's OK.

 

Thanks again for your help.

Mediaframes360Mediaframes360

Please see our new app at the AppExchange:

 

Video, images and audio integration for Salesforce -

 

http://appexchange.salesforce.com/listingDetail?listingId=a0N30000008abcBEAQ

 

 

Coming soon - Streaming videos embedded in articles!!

 

chris_centrachris_centra
Hello -

Has anyone tried this recently?  I'm wondering if sfdc adjusted things to prevent adding an iframe which points to a Static Resource.  When I tried this using the multimedia pop-up from the editor (custom rich-text field on a Knowledge article), I get:

Invalid <iframe> element. Please use valid code from the approved sites.

Or if i switch to source-edit mode and paste the iframe code (<iframe src="{!$Resource.CommunityVideo_cmTest_1}"/>), this is stripped out when I save it.

Please let me know if you have any info on this.
thanks for your time.
chris
danparadisodanparadiso

Hi MANATTWeb,

Did you find any way to make the embeded code dynamic. I am facing similar issue, in VF page player shows up, but it doesn't play and the play button does nothing.

Thanks
 
MANATTWebMANATTWeb

This was a long time ago, but it seems like I ended up creating a video object that had a field called "LimelightID" as almost all of the embed code is the same from one video to the next except for the ID of the video coming from Limelight. That was just added as an apex variable and the rest was hard coded into the page.

I also seem to remember having another field (non-HTML text area) where I could paste in the entire embed code should the video not come from Limelight and doing a check to see if there was a Limelight ID and if not, use that field's value instead.

Again, this was a long time ago and I no longer work for that company, so I can't get back in and see the souce code. Keep at it - there's a way to do it. I hope this helps.