Skip to content

Latest commit

 

History

History
84 lines (62 loc) · 5.67 KB

README.md

File metadata and controls

84 lines (62 loc) · 5.67 KB

PlayTogether

PlayTogether is a WebRTC-based shared media player. Written in Flutter, it allows you to enjoy your local media with your friends in real-time while having a video call with them 📹📷

⚠️ Note: The app only uses a STUN server right now, therefore you can only connect to the peers on your same/local network. So make sure to use the same WiFi/LAN when using the app.

Screenshots

Feature Screenshot
Video Demo
PlayTogether.Demo.mp4
Authentication 1
Dashboard 2
Profile 3
Incoming Call 4
Video Call 5

Get Started

This project uses FVM to lock onto a specific Flutter version. Right now, it uses Flutter 3.22.3, so please make sure to set up FVM on your system and run pub use 3.22.3 before starting up the project.

This app uses Firebase, make sure to use flutterfire to set up your own Firebase project with this app.

This project also uses the following environment variables using envied:

  1. GOOGLE_CLIENT_ID - You can find this in your Google Cloud Platform console (from the APIs & Services > Credentials tab)
  2. GOOGLE_CLIENT_SECRET - You can find this in your Google Cloud Platform console (from the APIs & Services > Credentials tab)

Therefore please make sure to manually create an .env file in the root of the project that has the following content (replace values with your own):

GOOGLE_CLIENT_ID=90xxxx298xxx-xxxxxgv1a9bxxxxxxtb4fthxxxxxxlg6.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=GOCSPX-xxxxxx99KnByxxxxxxxSuLhvpxxx

Generate MSIX (Windows)

For Viewers / Users

If you are a viewer/user and want to install the provided MSIX file (in releases) on your Windows system, please follow this guide to install the certificate to be able to do so:

  1. Select Properties from the right-click menu of the MSIX package.
  2. Go to the Digital Signature tab.
  3. From the Signature List choose the certificate.
  4. Click on Details.
  5. Click on View Certificate.
  6. Click Install Certificate.
  7. Choose Local Machine from Store Location.
  8. Allow the app to install certificates.
  9. Choose Place all certificates in the following store.
  10. Click Browse and select Trusted People.
  11. Click OK and Click Next then Click Finish
  12. Then you should see a popup window with the message Import was successful

For Developers

All builds are supposed to be debug builds because the app does NOT run in profile or release mode due to the following issue (possibly because of the media_kit library):

fatal error LNK1120: 7 unresolved externals Ref: flutter/flutter#32746

Therefore, the only way to differentiate between builds is by its flavor, i.e. either development or production. And since there is no way to set flavor via the msix:create command, we are defaulting to production if no flavor values are passed, and to run the development flavor, you will have to pass --dart-define FLAVOR=development flag to your flutter run command (in VSCode, you can do it by writing "args": ["--dart-define", "FLAVOR=development"] inside your configuration(s)).

  1. Generate your own MSIX signing certificate using MSIX Hero app on Microsoft Store. Open the app, tap on Tools, and under CERTIFICATES AND SIGNING category, select Create self-signed certificate. Enter your details and it should generate a .cer and a .pfx files in your user's Documents\Certificates folder.

  2. Once the certificate is generated, set up the MSIX pub package and after setting it up, execute the following commands in PowerShell:

fvm dart run msix:create --debug --certificate-path {YOUR_FILE_PATH} --certificate-password {YOUR_PASSWORD}

Here, {YOUR_FILE_PATH} refers to the complete path of your .pfx certificate file. For example: C:\Users\shubh\Documents\Certificates\PlayTogether.pfx and {YOUR_PASSWORD} refers to the password you used with MSIX Hero to generate this certificate file.

Quick Commands

  1. fvm dart run build_runner watch --delete-conflicting-outputs
  2. firebase emulators:start
  3. fvm flutter pub upgrade --major-versions; fvm flutter pub upgrade --tighten