I'm trying to understand how the new data api from google works, more specifically the youtube (v3) one, but haven't been able to follow any of the google documentation successfully. If anybody could give me a quick example of how to get the title or any other metadata from a you tube video either using the video id or the video url, I will really appreciate it.
I have tried https://developers.google.com/apis-explorer/#p/youtube/v3/youtube.videos.list but none of the requests seem to work for me.
Also tried following this https://developers.google.com/api-client-library/javascript/dev/dev_jscript
but as soon as I try gapi.client.setApiKey(YOUR API KEY); it starts giving me can't apply setApiKey to undefined etc etc
Thanks for your help in advance.
Register your app first and get a developer key, so you will your key there.
Related
im trying to embed a twitch player to my local html-file.
The Code can be seen here: https://www.w3schools.com/code/tryit.asp?filename=GACZWRWOSZ9M. If i create my file locally with the same exact code, the buttons and the event listeners are not working.
I red that this might be happening because the first script hasnt finished loading by the time the twitch player is instantiated and tried something like this: https://www.w3schools.com/code/tryit.asp?filename=GAD1GO4LW13C. But this wasnt working either.
I will add two pictures to compare the console output.
The first picture is the output from the first link: https://ibb.co/dGv7j9v
The second picture is the output of my local html-file: https://ibb.co/NtLwZKK
You can see on the second picture that the "ready" and "play" events are not being fired and that the underline channel properties are empty.
It would be really cool if someone could tell me why this isnt working locally. Thank you
I know this isn't a perfect answer but it looks like what's happening is when you open it from a file, the URL starts with "file://" and doesn't set some things that would otherwise be set if you used a regular web protocol like "http://"
It seems the library you're using can't handle that situation. I tried it on a local webserver and it did work just fine there so I think your code is fine, just needs to be accessed over http or https.
I integrated the Skype web control for our website, chat feature is working very well.
But when I click on the the voice or video call.
It open a new tab where It try to load the url https://swc.cdn.skype.com/v/0.80.47/calling-popup.html
Which will give the error 404 (not found)
I have search the doc and other resourced available but no luck.
any help would be appreciated.
Note: If you know how to hide these icon without CSS. It will also help.
Thanks.
Resources:
Browser: Chrome (68.0.3440.106)
SKD url: https://swc.cdn.skype.com/sdk/v1/sdk.min.js
Doc: https://dev.skype.com/webcontrol
Issue: https://github.com/Microsoft/BotBuilder/issues/3882
The error you have there has nothing to do with Skype , it just a question of the path to the HTML that is supposed to trigger your link, check path, or if the file is there where the url points to.
I am working on a project, and a key point of it, is to display links as embeded content. After looking around I found iframely.
One of their methods is to use embed.js, like this:
iframely.load(containerElement, 'http://yoururl.here');
or like this:
<a href="http://yoururl.here" data-iframely-url>yoururl.here</a>
Doing both like this, I get a "Preview not available. No embeds API Access" error.
Here is a jsfiddle of the code
You will need an iframely API-Key.
See API Documentation
Get an API-Key here
I have used sharethis plugin in my website. When I shared a particular page it does not crawl the correct image in the share popup window. But after sharing it to the facebook, I can see the correct image. It happens for a particular page only.
I have checked the og:image property and the image meets all its requirement. The dimension of the image is 362x550. I have no idea why it doesn't crawl the image.
Please anyone assist me to get resolve this issue.
Here is the link I shared via sharethis.
Page Link:
https://www.getcensored.com/m/photocontest/view/Kassie-Tocko
I can't give you exactly solution, but will try to give you at least some direction.
So what I observed with FB debug tool: https://developers.facebook.com/tools/debug/og/object/
Put initial link https://www.getcensored.com/m/photocontest/view/Kassie-Tocko#st_refDomain=&st_refQuery= and you will see that FB will see your og:image tag
Put some other anchor https://www.getcensored.com/m/photocontest/view/Kassie-Tocko#test1 and click "Fetch new scrape information", you will see a message about parsing error, then try to fetch again and you will see og:image
Try repeat 2. several times with different anchors
I had a similar issue, but the problem was 301 redirect, but you don't have it. May be try disable https and test FB sharing via http, just for test. May be problem is with your SSL negotiation time. Some info related FB and SSL here http://www.webpagetest.org/forums/showthread.php?tid=11788
For facebook to get to your image it needs the total url to your image and not the relative url..
Example of tht url that facebook expects to be in its og:image tag content :
http://www.exmaple.com/images/img1.png
I hope this helps you.
I'm developping a Google Chrome extension, using content script. I want to interact with pages embedding a YouTube video player. I have include the www-widgetapi-vfljlXsRD.js as a JavaScript file, and YouTube namespace is correctly initialize inside the extension sandbox.
I'm trying to retrieve a reference to an existing iFrame player. To achieve that, I tried this:
var ytplayer = new YT.Player('ytplayer');
ytplayer.pauseVideo();
where div#ytplayeris the iFrame embedding the actual player.
I'm getting this error, telling that the method does not exist:
TypeError: Object # has no method 'pauseVideo'
What is the correct way to retrieve a reference to an existing player?
I was using YouTube player API before and it was working properly. Today I have issues like you, and I did not change anything in my code. It might mean that the www-widgetapi-vfljlXsRD.js has been changed and encounters bugs... I cannot help any further.
Ok, I found my way to talk to an existing player. I have not actually managed to get a working reference to it.
I was inspired by the amazing work of Rob (cf. YouTube iframe API: how do I control a iframe player that's already in the HTML?), I remarked that the Youtube player is sending message to the main window, like this:
{"event":"infoDelivery","info":{"currentTime":3.3950459957122803,"videoBytesLoaded":244,"videoLoadedFraction":0.24482703466872344},"id":1}
You can observe it by listening to the "message" event window.addEventListener('message', function (event) {console.log(event.data)}, false); in a window containing a playing player.
This infoDelivery event contains the current player's time and is sent while the video is playing. Listening to this event I am now able to know the current player time.
I have not found a proper solution so far so this one will make the job for the moment.