How do I retrieve the "Audio in" from the api (For example, stereo 2.0, Dolby Digital Plus 5.1) - sonos

I'm looking to get some information from the Sonos API but I can't seem to find it.
In the Sonos app on the "About My System" page when you scroll down (And have a device connected to your tv) it shows "Audio in". I want that information from the API. Is that possible?
Hope to hear,
Kind regards,
Namanix

The Audio In field displays the audio format that Sonos home theater speaker is receiving. See Check the audio format in Troubleshooting low audio from surround speakers for details.
The Sonos platform enables the following line-in APIs and capabilities:
Use the loadLineIn command in the playback namespace to change the current group source to the line-in source of a specified player.
View the source type in the container object. Sonos home theater products use the linein.homeTheater type. See container in Playback Objects for details.
Products with line-in capabilities include the LINE_IN capability in the player object. See the groups object for details.

I'm not sure what you're looking for, but the Sonos Play:5 (gen1) has an UPNP service called AudioIn.
If my playbar switches to TV mode (I've turned auto switching on), than the CurrentURI changes to x-sonos-htastream:.......
Instead of building something yourself, you can also check-out this typescript/node library #svrooij/sonos.

Related

I don't want camera permission needed for each video chat when there is a series of 1-1 video chats at an event

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

What is the API for SONOS Playbar to Allow third party controlling Volume and Input Selection (Only)?

I only need to be able to control (over third party control system, Crestron) the volume (up, down, mute), select input (video or music) and ON/OFF for SONOS Playbar, Sub and two Play1 in order to achieve 5.1 surround sound.
I am not interested in controlling any of the other SONOS feature as I will use SONOS App for music services. I just need to ensure that my Crestron system can control volume regardless whether the active source is video (coming from the TV) or audio (coming from SONONS App) and also to be able to switch between audio and video sources.
We don't currently have a public API available for Sonos control. I will take this as input for future consideration back to the team.
Look at the UPnP specifications for RenderingControl, and use the volume/mute calls against the Playbar endpoint. Its easy. Selecting input is trickier: TV is simple, but for "music" you need to do a lot more work as you need to specify exactly what music, and Sonos support a gigantic array of options there.

Create a custom desktop YouTube player

I want to create an application capable to play YouTube video's audios and also save the downloaded content in a local cache, therefore when the user decides to resume or play the video again, then it doesn't have to download part of video again but only download the remaining part (User can decide what to do with the cache then, and how to organize it).
It is also very convenient for mobiles (it is my main focus) but I'd like to create a desktop one too for experimental purposes.
So, my question itself is, does YouTube provide any API for this? I mean, in order to cache the download content I need that my application download the content and not any embed player (also remember that it is a native application). I have a third-party application in my Android system that plays YouTube videos, so I think it's possible unless that the developers use some sort of hack, again this is what I don't know.
Don't confuse with the web gdata info API and the embed API, this is not what I want, what I want is to handle the video transfer.
As far as I know, there is no official API for that. However, you could use libquvi to look up the URLs of the real video data, or you could have a look at how they do it and reimplement it yourself (see here).

Streaming music on your website through custom player / application (iTunes)

I was doing some research to find out ways that would allow me to stream music on my website legally. I came across iTunes partner program which allows to stream music on a website through their embedded players. I was wondering is it possible to stream iTunes music through your own custom player? If that is not possible via iTunes, then what other methods are available?
You could do this with a server software like Icecast, there is some good tutorials on setting this up here: http://www.icecast.org/docs.php
Depending on how many browsers you want to support you might want to setup two streams, one in MP3/OGG and a "backup" stream in Flash. Then add some detection as to what the browser supports and present the correct stream (i.e.: Use the HTML5 <audio> tag for playing MP3/OGG to browsers that support this, and use your flash stream for the rest)
their program allowing playback of music in the iTunes Store is likely only for those with the intention to sell music, without providing a commerce business, you'd be breaking their partner program T&C's.

Streaming web video to Roku

Does anyone know how technically to send videos (i.e. Youtube Videos) to a Roku player? There is a "Twonky Beam" app that allows streaming and what it appears to do is to send .mp4 files to Roku for playback. See the demo here: http://gigaom.com/video/youtube-on-roku-twonky-airplay/
This is done without a "Twonky Beam" Roku app. Looks like something that Roku supports natively, although I cannot find anything documented.
I want to know how they were able to accomplish this without Roku being a UPNP or DLNA device.
Any insights here would be great!
There are discussions on how to extract the mp4 URL from YouTube here and here
In terms of how to do airplay style video playback on Roku, you would use the External Control Protocol to launch a channel with the URLs of the video you wish to play back, or once your channel is launched, us the ECP in combination with the roInput component to send the URL's to your channel. Your channel would then send the URLs to a video playback compoenent which would initiate playback from Youtube or whatever source you send it. If you want to play URL's from your device (android/IOS) you would need to run a web server on the device to serve videos to the device.
here is an Open Source YouTube project referenced in that second thread.
Any unofficial project that plays video's from YouTube is subject to DMCA takedown by YouTube should they decide your project does not fit with their goals.
roInput is not really well documented, here is an example that demonstrates both roInput and launch parameters (launch parameters are keywords you include in an http POST):
function main(params as object)
if params.parameter <> invalid then
print "This channnel was launched with Launch Parameters!"
print params
else
print "launched without input parameters"
end if
port=CreateObject("roMessagePort")
input=createobject("roInput")
input.setmessageport(port)
while true
msg=wait(100,port)
if type(msg)="roInputEvent" then
params=msg.getinfo()
print params
end if
end while
end function
so your parameters might be "vidurl=http://myserver.com/video300k.mp4&vidurl=http://myserver.com/video600k.mp4" if you wanted to send multiple bit rate videos.
there are plenty of examples of how to play video on a Roku in the RokuSDK, the simplest being the simplevideoplayer exmaple.
As to the last part of the question re UPNP, you can find a roku on your lan either via brute force telnet on port 8060 to every ip or by using SSDP, also documented in the ECP guide linked above