How does Hangouts get desktop capture on Safari? - safari

So if we have a look at: https://developer.mozilla.org/en-US/docs/Web/API/Screen_Capture_API
The state of the getDisplayMedia - the function used to get desktop stream - shows that its currently not supported in safari 12. And its evident from the fact that calling getDisplayMedia in the console on Safari tells us that its not available.
Then how is it that Google Hangouts is able to get the desktop share in safari? Since hangouts is running inside the browser and according to my knowledge it has to use JS APIs to get screen.
Any hint or help would be highly appreciated.
Thanks

getDisplayMedia is supported in Safari 13. The MDN page you link to even says so.
This is what Hangouts uses. You can try it out here (click the "User gesture" button).
Safari only offers to share the entire desktop at the moment.

Related

Agora SDK compatibility with Safari - both macos and ios

I am building a PWA with Agora broadcasting API. I managed to get the video stream playing on desktop Chrome, but not on Safari. The documentation says Safari is supported on both MacOS and iOS, but it doesn't seem like the case.
When I opened the client page on Safari, instead of playing the video stream, it just create a video player without content. I don't see any data being streamed in the inspector view, or there isn't any activity going on at all.
Do I need to do something different with Safari?
Agora.io provided an auto-diagnostic page for their Web SDK, which may be useful for you:
agora_webrtc_troubleshooting

Spotify Play Button is not working - playing only previews in recent Chrome

I was going back and forth with Spotify Cares Twitter for over four days. Finally they directed me here, so I hope one of the devs from Spotify will answer.
I am trying to put Spotify Play Button on the website. I was following the instructions from the documentation. Then I also found on the Spotify blog, that some details had changed in July 2018. So I have tried this code as well.
Whatever I did, the Play Button embed player plays only preview (30 seconds) when accessing website in the Chrome (version 68 and 69).
The code is simple and straight taken from the documentation/blog:
<iframe src="https://open.spotify.com/embed?uri=spotify:album:1DFixLWuPkv3KT3TnV35m3" width="300" height="380" frameborder="0" allowtransparency="true" allow="encrypted-media"></iframe>
This code I have put into the empty HTML, so completely no other code interfering. You can check it in the example on Codepen.
I have tried to isolate the issue and here's what I have found:
In Chrome it never works: neither when I am logged into Spotify nor when I am not and log in with the button that shows up in the player
In Chrome with/without SSL - in both cases it didn't work
In Firefox it works properly. When I log into Spotify on the browser, go to the page, it plays full tracks
Also asked my friends to go to the page with this code and - being logged into Spotify - it didn't work for them as well
The play button works properly in the examples on blog and documentation of Spotify - which is in their domain, so it is the same domain as the iframe content - this is a hint I think.
I have checked also recent changes in Chrome, but only one concerning iframe was adding allow on microphone and camera. Even using this one didn't help (but this should not be related actually).
I have also checked on recent Safari / MacOS - the issue is there as well (but not on Firefox/MacOS)
What can be the reason for the issue? How to solve this? Or maybe Spotify devs team need to fix it?
So the answer is quite obvious if you know where to look.
Under chrome://settings/content/cookies Google Chrome has this option Block third-party cookies. I had it enabled and that was the cause of the issue.
But why I didn't think of it before? It's because Google Chrome in such case adds to all non-white-listed (see below) sites a cookie icon with red X to the right side of the Address Bar. When one clicks it, it shows two options:
Always allow [url of the site] site to save cookies
Keep blocking the cookies
And since I had the first one selected it looked good to me back then.
But this option is not the same as "allow use of the third-party cookies", which is not available in the popup options window.
In fact to allow sites to use cookies from Spotify, you have to either:
Disable the option Block third-party cookies in the Chrome Settings in general
or add [*.]spotify.com to your white-list (I recommend this one)
And that way, any site can access spotify.com cookies to check if user is logged in to properly play music (full tracks or just previews).
And one final note: the site with the embed play button code must be accessed with SSL, so via https.
I didn't check how to change that for Safari on MacOS, but probably the solution is similar to this one.

Whatsapp share link does not work in safari

I'm using this approach: https://stackoverflow.com/a/25796908/3437433
It works like a charm, but when I'm trying to use it in Safari (both desktop and mobile), then quite strange things happen.
On desktop, origin link https://wa.me/?text=123 is somehow replaced with whatsapp://send?text=123. And then Safari displays error page about wrong protocol.
On mobile, correct page is opened by origin link, but also alert appears saying "can't open page because url is wrong". I can close that alert, can click on "send" button, but then https://whatsapp.com/download/ page is opened, instead of prompting to login to whatsapp and redirecting to chat.
Does anybody know what's going on here and whether it can be fixed?
We usually differ link at desktop view and mobile view to offer support for safari and other browser.
for desktop view we use
https://web.whatsapp.com/send?phone=6200000000&text=Hello%20Moxqitto
for mobile, we follow whatsapp best practice https://faq.whatsapp.com/en/android/26000030/
https://wa.me/6200000000
Tested on
Chrome for mac
safari for mac
android chrome
Ps: not tested when mac have whatsapp desktop app, but it will still work in the safari itself. so it should be ok
Official Sharing Documentation For WhatsApp. They say to use their wa.me/... URL. Okay! So let's try it out! http://wa.me/?text=mytest For me, I get an error message...
PAGE NOT FOUND
However, these seem to work great for me!
https://api.whatsapp.com/send?text=YourShareTextHere
https://api.whatsapp.com/send?text=YourShareTextHere&phone=123
If you are interested in watching a project that keeps track of these URLs, then check us out!: https://github.com/bradvin/social-share-urls#whatsapp

Is there Web Speech API Limitation?

I'm using W3C Browser Web Speech Api. I search everywhere but i cant find it answer. Is there any limitation for usage ?
Demostration: https://www.google.com/intl/en/chrome/demos/speech.html
Yes, with a bit of a catch. I finally hit a limit recently after a lot of experimentation; as soon as a request starts, it's cut short.
On a desktop web browser (Chrome), there's a limit for each user (Primiano Tucci works at Google, so I'd trust him!), and you can't buy more time with the API.
However, as you could see from the first link, the exception appears to be Chrome on Android, which apparently has no limitations because it accesses an internal API for speech recognition when visiting web pages that use the Web Speech API.
For desktop browsers, you're out of luck unless you can assume users don't mind a limit. Even Annyang and voice dictation in Google Docs aren't working for me at the moment, while online voice recognition services that don't go through Google are working.
From my testing with Chrome Version 87.0.4280.141 (Official Build) (64-bit), it appears to stop after 5 minutes on Windows 10 Pro.

Unable to share a link on whatsapp from Safari

I am trying to share a link from html on whatsapp using
SHARE
This works fine for all browsers except safari.
In safari , When the share link is present on www.example.com(I am trying to share the link of the page I am standing on) page,if I try to share the link, only title text is shared, the link is not shared.
The whats app message generated is
title
despite of title http://www.example.com
Try encoding the text parameter using encodeURIComponent.
In your case that would be:
SHARE
We usually differ link at desktop view and mobile view to offer better support for safari and other browser.
for desktop view we use
https://web.whatsapp.com/send?phone=6200000000&text=Hello%20Moxqitto
for mobile, we follow whatsapp best practice https://faq.whatsapp.com/en/android/26000030/
https://wa.me/6200000000
Tested on
Chrome for mac
safari for mac
android chrome
Ps: not tested when mac have whatsapp desktop app, but it will still work in the safari itself. so it should be ok