YouTube iframe API official example gives errors - ajax

As of 2013-04-16 WEST, the official getting started example of the YouTube iframe API results in error messages when run in Chrome 25 on WinXP/SP3:
I am accessing the example hosted on a web server, i.e. not via the local file system.
Am I doing something wrong? Is the example / the API broken? Can you reproduce the issue?

This error message has been around for quite a while -- as this Google Group post explains, it's due to an unresolved (4-year unresolved!) bug in WebKit:
https://groups.google.com/forum/?fromgroups=#!topic/youtube-api-gdata/VKGl4ahBGyk
It shouldn't affect anything -- it certainly hasn't for our projects, and in visiting the demo URL you posted, it looks like it isn't affecting the API functionality there (i.e. in that demo, the video still stops after 6 seconds per what the code states). There was an SO question a while back that thought it might be affecting analytics:
youtube "Unable to post message to..." causing video analytics to not be tracked
But it was never confirmed as being relevant.
It will be interesting to see if Chrome's move to the new Blink fork of WebKit leads to the bug itself being resolved.

Related

Microsoft Teams Deep Linking failing for Video and Audio calls

I'm writing a react webapp that exposes AD-Online contacts and provides the ability to deep link chat, audio, and video calls in the Teams application. I have written the following function (based on the MS documentation) to provide the url for the deep link.
const teamsDeepLink = (user, type) =>
`https://teams.microsoft.com/l/${type === "chat" ? "chat" : "call"}/0/0?users=${user}${type === "video" ? "&withvideo=true" : ""}`;
The output of this looks something like this:
Chat
https://teams.microsoft.com/l/chat/0/0?users=<user's email>
Audio
https://teams.microsoft.com/l/call/0/0?users=<user's email>
Video
https://teams.microsoft.com/l/call/0/0?users=<user's email>&withvideo=true
This works ok for chat, but fails with a There is a problem with the link message for audio and video links. Has anyone got this working and how?
I have researched this as thoroughly as I can. I have found a related but different SO question relating to bots, but I'm a step further on from that -- I have the URL from the documentation but I'm getting an unexpected error.
When we tried to repro this at our end, it worked fine on Microsoft Teams desktop but faced an issue on the Teams web application (as you mentioned).
For that, we have raised a bug and the concerned team is looking into it. We will get back to you once we have an update.

Firefox seems to fail on registering a ServiceWorker for Push Notifications?

Firefox seems to fail on registering a ServiceWorker for Push Notifications, with an error "InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable", but the code works in Chrome and Edge, and appears to be compliant with the examples online and the spec.
I've thrown an example up on one of my test sites, https://wiegandtech.net/ - visiting it in Chrome will prompt for permission and then opt-in successfully, sending the info to the server. But Firefox prompts, doesn't complete the registration, and doesn't fire any error or throw anything into the console. When I try to debug, it seems to never return from navigator.serviceWorker.ready.then call - I debug in and reg is undefined, even though the promise says it shouldn't be. I can find no reason why this is failing. I do see in Fiddler that FF gets the worker file, so it appears to be starting the call, but never finishing? The worker is valid JavaScript, as far as I can tell. Does anyone have any documentation on how Firefox's implementation is different from Chrome's/the spec?
Firefox requires the ServiceWorker's URL to end in .js - I was using an ASP.Net site and returning javascript but through my own controller. When I just give it the URL for the .js file itself, it now works. Would file a bug, but too non-trivial to setup a site given that ServiceWorkers require a real life site to troubleshoot, and their source code doesn't appear to be on github.

Google picker does not work without filter being applied for some users

we have an integrated with google picker(read-only scope,Docs view) it use to work fine but recently some users are getting blank screens as soon as the pop up shows but when they select some filter everything starts working fine after that no problems.
using developer tools i see all apis returning 200 for that first request
but there were no docs in response(i believe this is the api responsible for bringing docs in picker 'https://docs.google.com/picker/pvr')
when there are no docs returned in above api google is calling another api i assume it is to log error's probably(//docs.google.com/picker/ohnoes)
this api has following error params in it
&error=Cached and requested query mismatch
&line=Not available
&viewToken=["all",null,{"query":null}]
&ms=97
&transferDocs=false
&numErrors=1
has anybody else faced the similar problem
what do error "Cached and requested query mismatch" means in context of drive docs
Fyi - most accounts facing this problem seems like are of company domain for ex "jondoe#company.org"(this is a google account with company domain)
Filters Image
Thanks for your help.
not sure but looks like issue was may be related to google bug
https://issuetracker.google.com/issues/64825685
for me the code that was not working was:
addView(google.picker.ViewId.DOCS)
replaced this code with below code which works as expected
var view = new google.picker.DocsView();
view.setIncludeFolders(true).setOwnedByMe(true).setParent('root');
addView(view).

Google Sheets API V4 Code 503 "UNAVAILABLE"

So I have been using Google Sheets API v4 and today I got this message https://cloud.google.com/storage/docs/xml-api/reference-status#503service-unavailable regardless of what I do. Is this an error with something internally at google or is this something to do with my settings? All commands were working previously and nothing seems to have changed.
Yes, that is an internal error, though it's possible it's caused by something on your end too.
(If you can describe in more detail what you're doing, that would be helpful.)

Chromecast sample sender application CastHelloText-chrome ends with error when trying to get session

I have problem with launching Google-Cast application similar to sample CastHelloText-chrome. I slightly modified example code for my specific purposes. The goal for creating this application is to send and show image data directly in Chromecast device.
Particularly the difference between official sample and my code is in message format and its content, sent by sender application. Sender application took png image coded by base64 and send through message bus with custom namespace. Receiver application get this message and use this as data source for html object <img>.
Error appears when I do this steps:
Reload sender page, checking console if any device found.
Send the form by just pushing enter on input box (text is ignored).
Now a popup from Chromecast extension shows. Next there are two scenarios:
3a) I confirm casting to device by choosing one from the list, then I get this error message in console:
onError: {"code":"channel_error","description":"Error: Timeout","details":null}
3b) I just click somewhere else, I get this error:
onError: {"code":"cancel","description":"User closed popup menu","details":null}
Both of errors are caused by calling function chrome.cast.requestSession in chromehellotext.html at line 161, but what's really wrong I don't know.
When I step sender script I realize that function sessionListener is never called. I know that something go wrong when code try to call chrome.cast.requestSession, where described error raises. So I need help if I missed about right way to use Google-Cast API or If this problem has something to do with networking issues.
Receiver application is registered on Google Cast SDK Developer Console and I'm testing on registered device with some serial number. I'm using Google Chrome in version 42.0.2300.2 canary (64-bit) and Chrome version 40.0.2214.111 (current stable I suppose). For testing I also tried to turn off Windows Firewall entirely but with no luck.
Edit:
There were some syntactic errors that caused error message described above.
It seems like you are trying to use the data/control channel to send an image; please don't do that; that channel is not meant to be used for large data communications; in fact it cannot send anything which approaches or exceeds 64k. If your goal is to send images from your local machine, you would need to run a local web server on your local machine and serve images through the web server.
For and easiest tutorial you can have a look to this tutorial.
It is well explained in this tutorial.
Chromecast Sender application
There is no need to maintain session by yourself.
just add button and enjoy casting
mCastManager.addMediaRouterButton(mediaRoutebtn);
I found a source of my problem. There was something wrong in receiver code - syntactic and runtime errors, so I must admit that my code wasn't functional. Now its working in terms of launching application and getting session.
Unfortunate thing is that the error message generated by Chromecast extension didn't match the actual error - at least it was a bit confusing when I didn't know what's really happening on receiver side without ability to debug the code.

Resources