Created
May 14, 2014 20:17
-
-
Save OnlyInAmerica/91dd00a612fbcd2dab1f to your computer and use it in GitHub Desktop.
Streaming with Kickflip for Android
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Kickflip.setup(this, "CLIENT_ID", "CLIENT_SECRET"); | |
Kickflip.startBroadcastActivity(this, new BroadcastListener() { | |
@Override | |
public void onBroadcastStart() { | |
// The user began broadcasting | |
} | |
@Override | |
public void onBroadcastLive(Stream stream) { | |
// This device's broadcast is live! | |
// The kickflip.io HTML5 / Flash player URL for this stream is: | |
// stream.getKickflipUrl(); | |
// The raw stream address (.m3u8 file for HLS streams) is: | |
// stream.getStreamUrl(); | |
} | |
@Override | |
public void onBroadcastStop() { | |
// The user stopped broadcasting. | |
// The BroadcastActivity will be finished after this call | |
// completes. | |
} | |
@Override | |
public void onBroadcastError(KickflipException error) { | |
Log.i("Kickflip" "An error occurred: " + error.getMessage()); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment