SONOS Playback error "These Songs are not available for Streaming from APPNAME" - sonos

I've been preparing POC to integrate our music service with SONOS, I've written simple service for testing purpose. I've implemented three essential methods to play url "getMetadata", "getMediaMetadata" and "getMediaURI".
First I've tried with media type "track" and returned song url(hard coded) from "getMediaURI" method which is .mp4 format, It worked fine as expected.
Later when I've tried with 7-digital url playback fails by saying "These Songs are not available for Streaming from "APPNAME". I've tried changing mime type values also nothing seems working. Type : audio/x-m4a
Note: Same 7 digital url is playing fine on browser.
Am I doing anything wrong here? Am I missing anything? Any help is really appreciated.
Thanks.

Looking at the documentation on Sonos' developer website, it doesn't seem like that audio/x-m4a is a supported MIME type. Do you know the audio format of 7-Digital's track for sure? If its mp4 or m4a, I would try setting the MIME type to one of these - audio/mp4, audio/aac,
application/x-mpegURL, application/vnd.apple.mpegURL, audio/x-mpegurl
Also make sure that your track's sampling is supported as described in the table at the link below.
Link http://musicpartners.sonos.com/node/464

Related

How can I get IMSC XML from an HLS manifest?

I am reading about IMSC and the docs say it should be in XML https://developer.mozilla.org/en-US/docs/Related/IMSC
Meanwhile, I have an RTMP stream with embedded caption data from the HLS manifest. When I look at the fragments, it all looks like binary to me rather than XML. I actually checked all network traffic from the browser and only see the manifest and fragment calls. In sample players online I DO see the captions getting built up and displayed, but I'm not sure how they go from Manifest -> XML.
As far as I can tell devs should be using https://developer.mozilla.org/en-US/docs/Related/IMSC/Using_the_imscJS_polyfill if they want to show live captions.
ISMC is carried inside fragmented mp4 files, they are not stand alone text files like WebVTT.

Apple News Preview -- can't load articles

I am attempting to use News Preview to check out my apple news articles, but I keep getting the error "This document couldn't be opened. For details, see the error console...". The error console seems to be completely blank.
I have tried this with article json directly from my server and also json downloaded from iCloud's news publisher. The articles in question display fine on my test news channels in the Apple News app.
Has anyone had this issue before?
Edit: I have the latest version of XCode installed. The same result occurs when I try to load articles downloaded from Apple's documentation.
For the next person that runs into this, my problem was that my https local URLs (links and images) weren't using a valid certificate. Replacing them with http fixed the issue.
Typically this happens when the json is malformed or if incorrectly using an ANF property.

Any reliable way to remember UPnP mediaserver media file location?

I'm working on a mediarenderer client project which needs to memorize last played media file. I initially stores from service and thought that it would be fine until I discovered that the media ObjectID is not permanent.
For example, I have 2 files A.mp3 and B.mp3 with ObjectID "1" and "2" respectively. If I remove A.mp3 and restart the media server, it assign "1" to B.mp3 while I thought it would still be "2". This happens on both mediaservers (pms, minidlna) I tried out.
So my question: What info can I use to remember the media file location other than storing the full hierarchy (eg. /path/to/music.mp3) as I need to resolve the path step by step to obtain the playback URL which I think is less efficient.
I came into a conclusion that UPnP Media Server simply did not define a usecase for this. And I tested out VLC media player and found that they are facing the same issue, hence this issue doesn't deserve a workaround perhaps.

How to load a static google map with a path (polyline)?

I have implemented some code that loads an image from a URL upon a listview item being clicked; this has been tested with a 'dummy' image and works without any problem with the image being displayed in an imageview object.
However, what I really want to do is to load a Static Google Map with Paths (polyline) via URL, but for some reason this is not working and I hope that someone here will be able to tell me what is wrong with my URL:
http://maps.googleapis.com/maps/api/staticmap?size=400x400&path=40.737102,-73.990318|40.749825,-73.987963|40.752946,-73.987384|40.755823,-73.986397
According to the Google documentation http://code.google.com/apis/maps/documentation/staticmaps/ I believe that my URL should work, because an image witha path only requires the size attribute (i.e. all others are optional).
When I try to test load my URL via a web-browser I receive an Error 403 in Google Chrome telling me that the googleapis website requires a log in. Is this the API key? I have an API key that I've previously used for a non-static google map and I copy/pasted this key from the map's xml into my URL (using the key= attribute), but again this was not successful.
I've tried searching on google and this forum, but it seems that no-one has had this problem before - or maybe I'm just really bad at searching :( But hopefully someone can assist?
Thanks!
You're missing the required sensor parameter.
http://maps.googleapis.com/maps/api/staticmap?size=400x400&path=40.737102,-73.990318|40.749825,-73.987963|40.752946,-73.987384|40.755823,-73.986397&sensor=false
This requirement is fairly new, but yes, you are missing the API key.
Just as you added the parameters &size= or &path=, at some point you need to have a &key=parameter. So for your example it would look like this:
http://maps.googleapis.com/maps/api/staticmap?size=400x400&key=ENTER-YOUR-API-KEY&path=40.737102,-73.990318|40.749825,-73.987963|40.752946,-73.987384|40.755823,-73.986397
hope that helps

Requesting header information of a file

is there anyway I can request only the header information of any media. For example I just want to request header information of any video file so as to find its video length. I tried using ffmpeg -i {video_url} and did the work but I noticed that it actually downloads the given media in local storage and returns back the header information which obviously increases roundtrip time.
So I would really appreciate if there is any idea for finding the length of media in a fly. BTW I have a ruby on rails application where I need to implement this.
You could try with ffprobe -show_format. ffprobe comes with ffmpeg, and should have been compiled and installed along with it.
You can also try mediainfo. you can download it from: http://mediainfo.sourceforge.net/en.
There is also a wrapper gem for mediainfo but it didn't work well for me. I just used:
response = '#{mediainfo_path} #{source.path} --output=json 2>&1'
and you can then search the response for the properties you want such as "duration" etc.