We are using Spotify Web SDK in our system, with the intention of playing the music within our web application. The player itself is opened in a different browser tab, and we need to control it through the API.
We create a playback device in the browser tab, then use its ID to control it. In the web playback, there’s an event ‘ready’, and through the event handler we get the new media device ID.
Then, when we want to activate the player, we are using ‘Transfer Playback’ call with the received device ID. However in many cases the call returns 404 (device not found) or 502 (bad gateway) errors instead of starting the playback. The success seems completely unpredictable – sometimes it works OK, and sometimes it does not. Repeating the call multiple times may help, but in many cases the errors persist, even though the player exists and is ready.
Running ‘Get Available Devices’ returns the device in question, is_active is true, is_private_session is false and is_restricted is false.
Any advise would be greatly appreciated!
Related
I have a question regarding executeJs function.
page.executeJs("$0.click();", downloadAnchor.getElement());
This line of code is not working in real iPhone Safari browser, though it works in mobile responsive mode from desktop safari. Appreciate your help on this
Browsers will be "suspicious" of anything starting a download that isn't a direct reaction to interaction by the user. This is done as a security precaution since starting to download files without the user's explicit consent can be dangerous in specific cases. Different browsers and configurations have different policies for exactly where to draw the line.
In your case, the download isn't started as a direct consequence of user interaction but instead as direct consequence of receiving a message from the server. This kind of pattern will simply not work reliably no matter what you do.
Instead, you need to design the interaction so that the download is directly triggered by the user. The easiest way of doing that is by having the user directly click on the actual download link. If you want to have some indirection, then you still need to make the action work directly in the browser without going through the server.
I have a problem with the YouTube Livestreaming API, and it is only causing a problem on one single account.
The CMS I support has a live to YouTube function that automatically schedules and delivers a livestream from our studios to YouTube as a parallel channel to our website. We support multiple teams who all authenticate their accounts against our application to do this.
About 6 weeks ago we had a single group report that they are no longer seeing their content streaming live to YouTube. All the other accounts, as well as our test channels, are working fine.
With the account in question we can see the livestream get created, the broadcast is created, and they are bound together. Once the encoders are started we are able to successfully transition the stream to "TESTING" without problem approximately 10 minutes prior to the scheduled start time. Where we are seeing the problem is in the final step where we transition the stream from "TESTING" to "LIVE" at the starting time of the broadcast. We get a response with "(#100) Status transition not allowed" when we attempt to transition to live. Prior to this step we retrieve the lifeCycleStatus value, and it shows as "TESTING".
If a user logs into YouTube Studio at this point, they are able to manually transition the stream to live.
The fact that this is working with multiple other accounts, and all are using a common code base and app, I am concerned that there is something about the account itself that is causing this issue. I have not been able to see any significant differences in the account settings when comparing with our test account.
Is there any way I can get further information about why the transition is failing, or something I should be specifically looking for as a potential problem?
I am not a coder and having a web platform built with PHP that includes a series of 1-1 video chats in a scheduled networking "event". The problem that the developer is not able to solve with the video plug in that they are using (https://www.magnoliyan.com/video-chat-pro/) is that the user needs to give camera permisson before each chat. I need this permisson to happen one time only at the beginning of the event and not need there to be any further permission giving throughout the event. Of course I would like this to work on all platforms. I'm exploring agora.io as an option to solve this and replace the current plug in with agora. Does anyone know if agora would be the right fit for this or which video chat platform I should use to accomplish this? And if there is specific developer kind of language or code - please speak in as if I was a developer and I will pass on what you say to him directly. You don't need to worry about whether I will understand it.
Thanks!
Jon
Agora.io like any other WebRTC provider requests device camera permission only once. And all subsequent Videocall won't need any special permission (provided that they are on the same domain)
More specifically, Agora.io requests browser permission when stream.init method is invoked. This also turns on the camera light. stream.close turns off the camera light and deallocates the resources.
However, the subsequent stream.init function calls do not require permissions. (Camera light will just turn on)
References:
stream.init: https://docs.agora.io/en/Video/API%20Reference/web/interfaces/agorartc.stream.html#init
stream.close: https://docs.agora.io/en/Video/API%20Reference/web/interfaces/agorartc.stream.html#close
I have developed a simple webapp of video calling using WebRTC Api.
The app is hosted at https://54.161.109.227 .
Problem is at a time, only single pair of browsers can make a video call. As soon as third person opens this webapp and click on video call button, the video calling session which is already going on between the previous pair of browsers get discontinued.
I want that on the same URL, multiple pair of browsers make video call with each other without disturbing any other pair.
I am looking to send hits to our Google Analytics account from our server-side REST application. It seems this is possible by constructing a POST request based on the format at https://ga-dev-tools.appspot.com/hit-builder/
However, multiple attempts at sending test hits have failed. I have tried sending tests from within Hit Builder as well as via cURL. I've confirmed our TID (Tracking ID) is correct and the URL and parameters validate properly in Hit Builder.
Any tips appreciated!
Don't know if this information helps concerning the Google Analytics Measurement Protocol (validating hits)
https://developers.google.com/analytics/devguides/collection/protocol/v1/validating-hits
I remain a little confused by this bit:
"Important: hits sent to the Measurement Protocol Validation Server will not show up in reports. They are for debugging only."
I guess besides the Reports, you can still see the Events getting fired off in real-time, they don't get reported/recorded, that's all.
Just some example usage for a Google Analytics account that I set up, (for a mobile app). I first constructed an example Event-type hit. Checked that it liked it. And then fired it off to Google Analytics:
And then over in the Google Analytics account, navigate to Real-time > Events and take a look:
This is probably quite late for your purpose given that the OP was made in 2016, but I'm posting so that it could help anyone else with the same question. Here's one likely scenario (happened to me):
You are sending hits to GA from a location that you set IP filtering for under GA property >> View Settings. In that case GA will not show these hits. If you are indeed firing the hits from a blocked IP, then for testing purposes, either try using a VPN, or else create a new Test-View with no IP filter and check if the event shows up in that GA view.
A little late but I encountered with this issue and I had two elements blocking the event from the Master view. Events registered good on All data view so I had to check filter by flter on my Master view. I had Carlos SEO's filters implemented and turns out the ISP Provider Bots 2 filter leaves out your event hits.
The second thing blocking my event was the "Exclude all hits from known bots and spiders" checkbox on the view settings; I had it checked.
Hope this helps anyone who has the same issue :)