Track limit on SoundCloud custom player? - soundcloud

My custom player at woofdriver.com only shows the first 50 of my SoundCloud account's 81 tracks. How can I get the full list to display in the player? I see some references to "limit", but only in the context of the API.
I'm using this custom player http://developers.soundcloud.com/docs/custom-player and the following code to invoke it on the page. The player works great, but it just shows the first 50 tracks instead of the 81 in my stream at http://soundcloud.com/williamhelman,
$("a.wooftraxplayer").scPlayer({
autoPlay : false
});

it seams the custom player has a limit and i dont know the way around it, but maybe you can use the new stylish Widget!!
try going to the SoundCloud Widget API Playground
and entering the url:
http://api.soundcloud.com/users/williamhelman
i get more than 80 songs in the player and it has some nice features like
hope this helps

Actually, I got a response back from SoundCloud on this. When you use just the base URL for the account, it limits to 50 with the custom player. However, if you create a set, there is no such limit. So, using http://soundcloud.com/williamhelman/sets/woofdriverhits as my URL, I now get all of the tracks in the list.

Related

How to get live video id from YouTube channel

YouTube API eventType=live not working, does anyone have an idea why?
https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=UCmyKnNRH0wH-r8I-ceP-dsg&eventType=live&type=video&key=
Without eventType was working fine (but not now):
https://www.youtube.com/embed/live_stream?channel=UCmyKnNRH0wH-r8I-ceP-dsg&autoplay=1
Looks like YouTube changed something in API, search.list really not returning live broadcast since end of last week.
If you have user's access token you can use https://www.googleapis.com/youtube/v3/liveBroadcasts?part=snippet&broadcastStatus=active&broadcastType=all
endpoint to retrieve if any broadcast is live.
If you do not have user's access token, you can try this answer
but i didn't check it if it is working
Anyway this question looks like to be a duplicate of this question
Right now the YouTube API is not working, specifically for retrieving live streams of a specific channelId. In other words if you are setting channelId in the API call, you will get 0 results.
If you're using an API key rather than OAuth (not sure if OAuth works) the only work around at the moment is to use the API to search for a specific title. Here is my query URL below.
https://www.googleapis.com/youtube/v3/search?part=id%2Csnippet&type=video&maxResults=20&order=date&q=My+Uniquely+Titled+Livestream&key=[apiKey]
The results returned by the API will be from all of YouTube. (Note: the rest is done serverside) Put the results into an array and discard any that don't match your channelId. Then check the titles in an array and only get the video ID of the one that matches your desired title. That is the basic logic and it is sort of a rigid work around that won't work for most. But at least it will get you what you need until Google fixes the API.

Trigger events based on timestamp of embedded Soundcloud track

Is it possible trigger events based on the timestamp of an embedded Soundcloud track?
I would like to show/hide photos based on the content of the Soundcloud track but not able to find information about this in the API documentation.
Yes, thats possible. Please share some code. What does embedded mean?
I assume you will use JS.
You can use ie timed comments.
https://developers.soundcloud.com/docs/api/sdks#javascript
SC.stream("/tracks/293", {
autoPlay: true,
ontimedcomments: function(comments){
console.log(comments[0].body);
}
});
Or you can use the standard player events and use your own database.

Soundcloud Stratus - Certain tracks not playing

Running Soundcloud stratus player on www.naturesoundmap.com
The vast majority of listings (custom post type) work fine, but if you navigate on the map down to New Zealand (or the island of Niue), there are a few listings where in the last two weeks or so the sounds have stopped playing. eg. http://www.naturesoundmap.com/listing/post-office-bay/ & http://www.naturesoundmap.com/listing/aroha-evening/
I've checked the links & all are ok - you can see this by pressing the 'Listen' button & the track information loads up ok in Stratus, but it doesn't play.
Strangely, two of the sounds which weren't working last week are now fine.
I'm puzzled!
The problem is that the songs have streaming diabled.
Artists on SoundCloud can choose whether to allow external streaming form sites. In the case of say
https://soundcloud.com/naturesounds_nz/aroha-island-crickets
which is one of the songs that does not play, if get it's api return
https://seam.li/json/?url=api.soundcloud.com/tracks/88830021.json?client_id=apigee
(I passed this through a site I run in order to make the json more readable, this is the plain link )
In this json we see the property
"streamable": false
on line 13, and as such it does not have the stream_url property. Therefore when you call stratus using stream_url, since it does not exist undefined is returned. this results in
GET http://stratus.sc/undefined?consumer_key=xxx 404 (Not Found)
Your solution is simply to manually check the soundcloud urls if they are streamable before putting them on your site. Alternatively if the process is automatic just check the streamable property of the song.

Facebook Publishing Score

I am trying to publish scores from my app. But unfortunately I am unable to do so. I even tried using the code snippet at http://developers.facebook.com/blog/post/539/ but for some odd reason it didn't work for me. If someone can provide me with some basic guidelines I would really be helpful as that would help me build upon that system and move forward. I don't want any fancy publishing technique I am just looking forward to publishing score at the end of the game.
Using https://graph.facebook.com/user id/scores?score=10&access_token=acess_token returns
{
"data": [
]
}
Your example looks like a HTTP GET request (i.e. 'show me the scores of this user')
To update a score you either need to make a POST request, or 'fake' the POST request by adding ?method=post to your GET call
You'll also need to use an App Access Token, the instructions for obtaining this are at:
https://developers.facebook.com/docs/authentication/#applogin
I've done it using javascript sdk, you can check out the source code for my game
https://apps.facebook.com/tgif-game/
you should be checking out scripts/gameui.js for the calls to posting scores and getting the list of scores.
In the FaceBook Developer Dashboard set your app category as games.
Then only you'll be able to post scores.

iOS Development: When receiving a Game Center invite, how do I obtain the GKMatch object?

I'm building an iPhone game that uses Game Center and I'm having a hard time understanding how to start a match game that was started by receiving an invitation to play from a friend. The docs say this...
The acceptedInvite parameter is
non-nil when the application receives
an invitation directly from another
player. In this situation, the other
player’s application has already
created the match request, so this
copy of your application does not need
to create one.
According to this, I don't need to create a match request since the player who did the inviting already created one. If so, how do I obtain the GKMatch object needed to send/receive data to/from the other player? The only way that I know to get the GKMatch object is to create a match request and call the findMatchForRequest method, which the docs are saying I shouldn't do.
The only code example they have for this involves creating and using the GKMatchmakerViewController, which I can't use since I'm creating my own custom views.
Thanks so much for your wisdom!
I received a response from one of the Apple engineers on this, here's what he said...
You can do auto-matching with custom
views, but there is no way to use
invites without using
GKMatchmakerViewController. So you
should follow the code sample.
I guess there's just going to have to be a radical break in the consistency of my UI.
I have a fix to the game center invite problem. So follow these steps:-
1- check that your push notifications are on in settings and friend invites are on in your game center account setting.
2-now install the latest version of fruit ninja game
3-open game center and sign in, then put it in background.
4-open fruit ninja directly goto new game=>multiplayer=>gamecenter
5-now you will see two options (invite friend & play now at the top right corner)
6-hit the play now button, so the game center will find the uninvited game for you.
7-when the game starts and you are able to see your uninvited friend's name at the top right corner. After the game finishes, go directly to game center in the background and in your games section and go into fruit ninja in game list. Here you will see the recently played option, Touch it. Here you will see at the top of the list a player name (who you played with) touch the name and send him friend request immediately.
8-if he accepts request goto friends=>(your recently added friend)=>gameplayed together(fruit ninja)=>hit play(at upper right)
9-now the game will open up and you will see the GC page. Hit the invite button and choose the recently added friend, and then send, waiting for him and ready to play.
Now your gc id have verified and you can invite any of your friends and can play any game(which supports the invite feature)
Despite what the Apple engineer said, how about try something like this to invite without using a custom view:
[[GKLocalPlayer localPlayer] loadFriendsWithCompletionHandler:^(NSArray *friends, NSError *error) {
[GKPlayer loadPlayersForIdentifiers:friends withCompletionHandler:^(NSArray *players, NSError *error) {
for (GKPlayer *player in players) {
NSLog(#"%#",player.alias); //here I'm just logging the aliases but the array players can be used in any way
}
}];
} ];
Now if a user selects players from this list on a custom view, GKMatchRequest has a property called playersToInvite and we can set these players to that property. And create a match programmatically using this request.
This looks very possible but I haven't tried it to be honest