You need to sign in to do that
Don't have an account?
Embeding Video into a Visualforce page
Hi,
I have read a few posts on this but I have found that it isn't working:
I have a custom object with a field called Video_or_Image_link__c. The contents of this are posted onto a VF page on a Spotlights area. The Spotlights are built inside a component.
Page:
<body> <div class="h-base"> <div class="b-content"> <div class="b-columns"> <c:Spotlights />
Component:
<apex:component controller="Spotlight_Controller" access="global"> <div class="b-spotlight"> <div class="b-spotlight-title">Learning Spotlights <div class="m-toggler"><span>Hide</span><span class="m-last">Show</span></div></div> <div class="b-spotlight-body"> <div class="b-spotlight-content"> <div class="b-spotlight-tabs"> <apex:repeat value="{!Spotlinks}" var="link"> <div class="b-spotlight-tab"> {!link.Link_Text__c} <span class="m-arrow"></span></div> </apex:repeat> <p> </p> <p> </p> </div> <div class="b-spotlight-tab-bodies"> <apex:repeat value="{!Spotlights}" var="spot"> <div class="b-spotlight-tab-body"> <p class="m-title">{!spot.Title__c}</p> <!-- COMMENTED OUT VIDEO VALUE <apex:iframe id="vids" width="640" height="360" src="//{!spot.Video_or_Image_link__c}"></apex:iframe> --> <apex:outputText value="{!spot.Message_Content__c}" escape="false"/> </div> </apex:repeat> </div> </div> </div> </div> </apex:component>
The problem have is that, when uncommented, the space is taken up by pane that says URL NO LONGER EXISTS "You have attempted to reach a URL that no longer exists on salesforce.com.". The same happens in Firefox, Chrome and IE.
The link on the object is www.youtube.com/embed/9D8X82sbewQ .
What do I need to do? What have I missed?
The Controller just for holistic purposes - I know that the data is there...
public with sharing class Spotlight_Controller { public list<Spotlight__c> Spotlights; public list<Spotlight__c> Spotlinks; public date dtToday; public Spotlight_Controller() { dtToday = date.today(); system.debug('\n ----------------> opening controller'); } public List<Spotlight__c> getSpotlights() { Spotlights = [select Title__c, Message_Content__c, Video_or_Image_link__c from Spotlight__c where Active__c = TRUE and Publish_Date__c <= :dtToday and End_by__c >= :dtToday order by order__c asc Limit 6]; system.debug('\n ----------------> opening Spotlights = ' + Spotlights); return Spotlights; }
See the below articles,
http://help.salesforce.com/apex/HTViewSolution?id=000176669&language=en_US
http://help.salesforce.com/apex/HTViewHelpDoc?id=knowledge_admin_tricks_examples_videos.htm&language=en_US
Regards,
Ashish