You need to sign in to do that
Don't have an account?

How to integrate youtube search engine in a visualforce page?
Hi,
I need to Integrate youtube search engine in my visualforce page. So that whenener the user searches the video in search bar, he should get a list of videos present in youtube (same as in youtube website). After that when he clicks one of the video of the list, he should be redirected to that video in youtube.
I have tried an example given in https://developers.google.com/youtube/v3/code_samples/javascript but I'm not able to make it workable.
Any help would be highly appriciated.
Please treat it as urgent.
Thanks in advance! :)
Regards,
R_Shri
I need to Integrate youtube search engine in my visualforce page. So that whenener the user searches the video in search bar, he should get a list of videos present in youtube (same as in youtube website). After that when he clicks one of the video of the list, he should be redirected to that video in youtube.
I have tried an example given in https://developers.google.com/youtube/v3/code_samples/javascript but I'm not able to make it workable.
Any help would be highly appriciated.
Please treat it as urgent.
Thanks in advance! :)
Regards,
R_Shri
Part I - Visualforce Page
Part II - Apex Controller
The Visualforce page can of course be modified. Moving forward, I might use embed an <iframe /> into the page for a quick preview. But we'll see :)
All Answers
<apex:page standardController="Contact">
<div align = "right">
<form action="http://www.youtube.com/results" method="get" target="_blank">
<input name="search_query" type="text" maxlength="128" />
<select name="search_type">
<option value="">Videos</option>
<option value="search_users">Channels</option>
</select>
<input type="submit" value="Search" />
</form>
</div>
<apex:form >
<apex:pageBlock >
<apex:pageBlockButtons >
<apex:commandButton value="Save" action="{!save}"/>
<apex:commandButton value="Cancel" action="{!cancel}"/>
</apex:pageBlockButtons>
<apex:pageBlockSection title="Information">
<apex:inputField value="{!Contact.FirstName}"/>
<apex:inputField value="{!Contact.LastName}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
I mean to say that like the list we are getting in youtube can we get that on our visualforce page? (without using iframe kind of thing, just a simple list)
I might try to do a controller-based solution using Apex callouts. The main issue being the lack of client-templating support and questionable upgradability using JavaScript in an Visualforce page. But if you are in a pinch, this should work.
Part I - Visualforce Page
Part II - Apex Controller
The Visualforce page can of course be modified. Moving forward, I might use embed an <iframe /> into the page for a quick preview. But we'll see :)
This is exactly what I was lloking for.
I have even embedded iframe in it, but the only problem I am facing is I am unbale to make the video fullscreen. I have also added the attribute allowfullscreen="allowfullscreen", but stil I am unable to play the video in fullscreen.
But once again thanks!!!
Thanks and Regards,
Ritik