I have a Spotify developer account, this also shows in Spotify Client.
However, I'm having problems with my test app. I just copied the tutorial app from the Spotify deveopment pages.
In Program files\Spotify i put the folder tutorial with the app files.
I also made this directory: Libraries\My Dokuments\Spotify\tutorial\
This did not work. When searching for spotify:app:tutorial I got metadata error and "could not find this app". When changing the "t" to "T" (Tutorial with upper case T), I did not get "could not find"-message, but nothing happened. Also I got the message "metadatastarted" while "loading for ever".
I tried this path: Users\P45\AppData\Local\Spotify\tutorial
This did not help.
These are the directories I made:
Libraries\My Dokuments\Spotify\tutorial\
Program files\Spotify\tutorial\
Users\P45\AppData\Local\Spotify\tutorial\
Any suggestions?
(Also, more info I should provide? Other changes?)
Create "My Documents\Spotify" in your %USERPROFILE% folder (you should already have 'My Documents' there, assuming it is english windows, so just create "Spotify" under that), and then create your app folder, "tutorial" there. That is where your files should reside in.
Note that %USERPROFILE% probably does not point to 'Libraries' folder.
Metadata error however suggest you might have also an error with your application and not only with your folder path... if possible, post your manifest.json and index.html files, too, to fix that.
This is a simple app I made earlier on, you can check from there the bare minimum metadata stuff as well as the instructions. For completeness, this is the link to official instructions provided by Spotify.
Related
What I want to do is to create a direct link URL to a mp3 file which is located on my Google Drive and use it on Audio object of HTML5, but I get 403 error.
I know that when one tries to create a link of a file located on Google Drive, it creates not a direct URL to the file but a URL for viewing the file through a viewer such as
https://drive.google.com/file/d/<file ID>/view?usp=sharing
I googled to find it is possible to rewrite it into a direct link URL like this:
https://drive.google.com/uc?id=<file ID>
I set this URL in the src property of my audio element. However, when I try play() method, the following error is thrown:
GET https://drive.google.com/uc?id=<file ID> 403
myProject.html:1 Uncaught (in promise) DOMException: Failed to load because no supported source was found.
So I tried to access to the URL https://drive.google.com/uc?id=<file ID> from my browser.
Then, I got this:
403. That’s an error.
We're sorry, but you do not have access to this page. That’s all we know.
I tried many times so it is not likely that I'm mis-pasting the <file ID>.
What should I do to create a valid direct link URL of the file?
I would appreciate for any information.
Progress
I got what was wrong.
The problem was that a file on Google Drive can be accessed only from the user who is authorized, which means only the owner of the Google account can access the file URL.
I tried to access it from Chrome Browser which is associated with the Google account, then, the error didn't occur.
However, I want to serve this file to all the people.
What should I do to give permission for access to other people?
You understand that Google drive is not a file hosting service right? This solution is not going to be very stable even if you do get it to work.
For it to work your going to need to set the file public so that everyone can access it. Then i would be willing to bet you will need an API key to do this in the long run.
Also remember that file id is not stable it can change in the future if for example you upload the file.
I solved this on my own. I right clicked the file, clicked Get link, and changed the authorization selection from Restricted into Anyone with the link. Then, the 403 error vanished for the access from anyone.
I have found no joy in getting any of the sample programs for Chrome to connect to my Chromecasts.
The Chromecasts have been registered and I am able to browse to their IP address port 9222 successfully.
Both the Chrome browser and Beta extension are up to date.
I have tried the CastHelloVideo-Chrome, CastMedia-Chrome and Cast-Tictactoe-Chrome and all fail to connect. The developer console shows a pair of errors:
GET chrome-extension://boadgeojelhgndaghljhdicfkmllpafd/cast_sender.js net::ERR_FAILED
and
Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('file://') does not match the recipient window's origin ('null').
When testing our own code we get an error when calling requestSession but the message returned by Chrome.cast.Error is useless since the function and variable names have been obscured.
I also have a difficult time testing the examples for Chrome. I decided to use Chrome to test because debugging JavaScript is so much quicker than going directly to Android. I spent hours trying to figure out why I keep getting the error message GET chrome-extension://boadgeojelhgndaghljhdicfkmllpafd/cast_sender.js net::ERR_FAILED and Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('file://') does not match the recipient window's origin ('null') if I run it from my PC but not when I run it from an example website at http://www.videws.com/eureka/helloVideos/ provided by one of the Cast developers at Google. I keep reading/trying different combinations from his readme note in the example until it dawned on me what he meant by "Put all files on your own server" instead of "computer".
I created a public weblink on my Google Drive, make the folder public and copied all the files there. When go to Google drive on the web, preview the example (index.html), the example runs beautifully. I tried tic-tac-toe. It also runs.
So the answer is you need to run it off a website -- not from a local file in your computer (ctrl-O in Chrome)
I hope this will help you going with Cast.
Danh
I was finally able to get connected, but from Android. Many steps will be the same though.
I tested this: https://github.com/googlecast/CastHelloText-android It let's you speak into the phone, and what you say appears on the TV/Chromecast. I didn't install the formal sender app, but I was able to load the TicTac Toe from the receiver as well. So i have seen them both on my CC.
I couldn't connect until I properly setup the RECEIVER APPLICATION. You didn't mention it.
What I did from where I think you are at.. I just double checked my receiver app settings.
File copy the receiver.hml file provided in the sample sender app. Place it in a public dropbox folder. copy that public link to my clipboard.
Go back to where you registered your Chromecast device(s). https://cast.google.com/publish -Add An Application. I called mine : ReceiverSimple
Edit the app you just created, and for the URL field: paste in that public link. For you, set the platform to Chrome. It did not seem to matter whether or not i included the package name, so try leaving it blank.
Save It. Now COPY to clipboard the ApplicationID for the receiver you just created.
Open the provided sender app source code, and find where it's using APP_ID (hopefully R.Strings or equivalent in chrome ) Paste that App ID in. That will tell your client to use your receiver app, (and therefore, load that receiver.html file into the chrome cast screen).
also try a chrome cast reboot as another means of sanity checking.
I think you're close.
I know very similar questions have been asked before. Like here: Spotify apps / home directory location (Windows local development)?
But the solutions suggested in that thread have not worked for me. Here's what I've done:
1) Enabled developer account
2) Followed these steps https://developer.spotify.com/technologies/apps/tutorial/
3) Including creating a directory called "tutorial" under /user/Documents/Spotify/
I have deinstalled, reinstalled, etc the client. And I still get "Sorry, I could not find this app." and "MetaDataFailed" etc.
I run Win 7 64 bit and Spotify version 0.8.3.222.g317ab.79d
I'm sure the solution to this is real simple, but I just can't seem to figure it out.
I got the same error as well, but after adding the required keys (More here: Application Manifest) I got it working.
Another thing I noticed was that when adding the BundleIdentifier key in manifest.json I only could get it to work with a lowercase name. E.g. spotify:app:myapp instead of spotify:app:MyApp.
This could of course be something specific on my end, but it is worth checking out.
Your app name MUST match the identifier you specify for BundleIdentifier in your manifest.json file.
open app: spotify:app:my-identifier
manifest.json: "BundleIdentifier": "my-identifier"
see https://stackoverflow.com/a/10421944 for moar
Just a clarification you are using c:\users[user name]\Documents\Spotify[app name]\ as the folder? Your post looked like /user was the root.
Also, in your manifest.json file if your BundleVersion is a number equal to or less than the number in production your local app will be ignored. Spotify will only load a local app with a BundleVersion number higher than production.
I'm trying to get the Spotify Hello World app running (https://developer.spotify.com/technologies/apps/tutorial/) and when I run the app in Spotify it doesn't load anything. Using the Inspector, it shows nothing in the head and body of the HTML. I've verified time and again that there actually is something in my index.html file.
I do have a developer's account and I am a premium member.
Does anyone have any suggestions for me to get the app to run correctly?
[SOLVED] I just realized when trying to load the application I was typing spotify:app:Tutorial when it should have been spotify:app:tutorial. It's case sensitive, yet when its the wrong case it doesn't yield any error, just empty HTML.
Seems like your application is found else you would get a not found error. At this rate we can't really tell alot. You might wanna include your manifest and index.html file.
Also if you change something in your manifest you have to kill spotify and restart for it to work properly again.
Using linux (Ubuntu 11.10) the tutorial did not start correctly until I used
consistent caps.
I.e. I changed to "tutorial" instead of "Tutorial" in both app directory name
and in the manifest. Still, the "Spotify" dir in $home needs S in caps.
Then the app started correctly using uri spotify:app:tutorial
I.e. ~/Spotify/tutorial/*
Make sure "BundleIdentifier":"tutorial" is in your manifest.json file.
I have built my entire website with Flash and embedded several swf objects (slideshows) into it. Everything works fine when I publish it as swf movie, but now that I want to upload my website, an error message occurs saying:
Error #2044: Unhandled SecurityErrorEvent:. text=Error #2140: Security sandbox violation: file:///mylayout.swf cannot load file:///slideshow_1.swf. Local-with-filesystem and local-with-networking SWF files cannot load each other.
I know that it has something to do with the fact that one of the swf files is local to the filesystem and the other local via networking, but in my publish settings, I told it to access local files only. That didn't help.
I am hosting my website at www.all-inkl.com; besides that, I have not uploaded it yet; I'm just testing it offline. I know I should add this code somewhere:
<allow-access-from domain="localhost" secure="true"/>`
but I'm not sure where to add it. Maybe to my timeline?
The crossdomain.xml file should have your server name specified. For example take a look at http://www.msn.com/crossdomain.xml
You will have to specify the domain names there. Your server should also be having a crossdomain.xml. Add the corresponding server name there. For example if you are using localhost, try adding
<allow-access-from domain="localhost" secure="true"/>
check your swf loading paths. try to specify the entire path like "hppt://www.yourdomain.com/yourweb/mylayout.swf" like this for every swf. and set the html code where the swf embed tag for allowScriptAccess : "always"