Together Stream allows you to stream content with others in real time. The stream host has full control to choose, pause, and skip any video in the queue — synchronizing playback immediately with participants’ devices.
- Create a shared video stream and invite Facebook friends
- Video playback is automatically synchronized between all stream participants
- Control the mood by updating the stream queue - Search or add popular videos from YouTube
- Chat with others about the current video, or suggest something different to be played next
- Invite others to Together Stream via Text or Email
Together Stream is powered by Contextual Sync and IBM Bluemix.
Xcode 8.2
CocoaPods 1.2.0
Carthage 0.18.1
- Clone the repo if you have not already done so.
- Navigate to
iOS/TogetherStream
runpod install
andcarthage update --platform iOS
Together Stream uses YouTube videos as the source of content to be shared. To access the YouTube API you will need to generate and embed an API key.
- Follow the instructions to create an API key here: https://developers.google.com/youtube/registering_an_application
- Add the key as
youtube_api_key
to theprivate.plist
located atiOS/TogetherStream/TogetherStream/Configuration
Together Stream uses Facebook to authenticate users and to retrieve user information. To access the Facebook API you will need to create an app and link to it in the iOS application.
- Follow steps to configure the Facebook App for iOS: https://developers.facebook.com/docs/ios/getting-started/ Note You can skip installing the SDK since it was already installed above.
- Add the Facebook app ID and secret to
backend/config/private/credentials.js
Together Stream uses push notifications to send stream invites to users with the iOS app.
- If not already, you will need to be enrolled in the Apple Developer program
- Generate a push notification certificate and download the
.p12
file. - Go through these steps to generate a
cert.pem
and akey.pem
https://github.com/node-apn/node-apn/wiki/Preparing-Certificates - Add these certificates to
backend/config/private/
To keep track of analytics, generate a configuration file by following the instructions here: https://developers.google.com/analytics/devguides/collection/ios/v3/
Note You can skip adding the Google Analytics SDK to the project since it was installed above.
Skip Installation
You can skip installing Google Analytics by removing the method setupGoogleAnalytics
in the AppDelegate
and sendGoogleAnalyticsEvent
in Utilities/Utils.swift
- In
backend/config/private/credentials.js
replace theaccessTokenKey
andrefreshTokenKey
with a unique string exactly 32 characters long. This is used to encrypt the access tokens and refresh tokens in the database. - Replace the
sessionSecret
with a unique string. This is used to encrypt the session tokens. - Replace the email
userName
anddomainName
with your email address (i.e.userName@domainName
), thepassword
with your email password, and thedisplayUserName
anddisplayDomainName
with what you want the emails to be sent from. You can use the same values for here as your actualuserName
anddomainName
if you wish.
- In
backend/public/app/credentials.js
replaceYOUR_PRODUCTION_FACEBOOK_APP_ID
andYOUR_DEVELOPMENT_FACEBOOK_APP_ID
with the ids for your production and development Facebook app ids respectively. - Replace
YOUR_YOUTUBE_API_KEY
with Youtube's API key provided by Google. - Replace the email
YOUR_CSYNC_SEVER_IP_ADDRESS
andYOUR_CSYNC_SEVER_PORT
with your csync server's ip address and port.
- Go to https://console.ng.bluemix.net and create an account if you do not already have one.
- Click "Create a Service", choose "Compose for PostgreSQL" and create it.
- Do the same to create a "New Relic" service.
- In your cloned repo, open
manifest.yml
and replace the services with the name of the services you created. - Make sure you have the Cloud Foundry CLI installed.
- Make sure you are logged in to your Bluemix account by running
cf login
- Deploy your app to bluemix with
cf push
- Add the server URL as
server_address
toprivate.plist
located atiOS/TogetherStream/TogetherStream/Configuration
- Follow the instructions here to deploy a Contexual Sync container to blumix: https://github.com/csync/csync-server/wiki/Create-a-CSync-Instance-on-Bluemix
Make sure that when you are creating your container, you add your Facebook credentials in this format:
"CSYNC_FACEBOOK_ID=asfasfd", "CSYNC_FACEBOOK_SECRET=asfdasdf"
- Add the public IP of the container as
csync_url
to theprivate.plist
located atiOS/TogetherStream/TogetherStream/Configuration
- If the Xcode command line developer tools are not installed, run
xcode-select --install
- Navigate to your app on Bluemix and click on "Connections" in the left nav bar
- Click on "View credentials" on the Compose for PostgreSQL service and copy those credentials to
backend/config/private/VCAP_SERVICES.json
- Navigate to
backend
and runnpm install
- Then run
npm start
to start the backend, take note of what port it is listening on - In the
private.plist
channel, change your server address tohttp://localhost:<port number>
- Follow the instructions here to allow connections to a http address: http://stackoverflow.com/questions/31254725/transport-security-has-blocked-a-cleartext-http
- If you would like to run your Contexual Sync server locally as well, follow the instructions here: https://github.com/csync/csync-server#local-deployment.
Make sure you change theprivate.plist
in the iOS app to the local Contextual Sync server.
Together Stream is intended solely for use with an Apple iOS product and intended to be used in conjunction with officially licensed Apple development tools and further customized and distributed under the terms and conditions of your licensed Apple Developer Program.
Want to contribute? Take a look at our CONTRIBUTING.md