Giter Site home page Giter Site logo

sbis04 / flutter_stream Goto Github PK

View Code? Open in Web Editor NEW
29.0 3.0 14.0 1.05 MB

A sample Flutter project for demonstrating how to integrate video streaming service with the help of MUX.

License: MIT License

Kotlin 0.34% Swift 1.01% Objective-C 0.10% Dart 89.92% Ruby 3.40% Dockerfile 0.84% JavaScript 4.38%
flutter mux streaming video

flutter_stream's Introduction

Flutter Video Streaming (MUX integration)

A sample Flutter project for demonstrating how to integrate video streaming service with the help of MUX.

To get step-by-step information on how to build this app, check out the article "Integrating video streaming with Flutter using Mux"

Usage

If you want to try this sample app, follow the steps mentioned below (the app uses a backend API server for sending the requests to MUX):

  • Clone this GitHub repository

    https://github.com/sbis04/flutter_stream.git
  • Create a .env file in the directory flutter_stream/mux-api-server with the following content:

    MUX_TOKEN_ID="<mux_token_id>"
    MUX_TOKEN_SECRET="<mux_token_secret>"
  • Generate MUX API Access Token from here (if you don't have a MUX account, create one by going here)

  • This will generate a Token ID and Token Secret, add them to the .env file

  • Run the API server (for testing) using the following command from the directory flutter_stream/mux-api-server:

    node main.js
  • Get packages by running the following from the root directory:

    flutter pub get

Now, you are ready to run this app on your device, just use the this command:

cd flutter_stream
fluter run

Plugins

The plugins that are used in this app are as follows:

  • dio - for making HTTP POST and GET requests
  • video_player - for previewing the video to be streamed
  • intl - to format DateTime objects

Testing

Used the plugin http_mock_adapter for writing a few API mocking tests in Dart.

License

Copyright (c) 2021 Souvik Biswas

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

flutter_stream's People

Contributors

sbis04 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

flutter_stream's Issues

node

Hello
When i clone and run node main.js

ak@ak-Inspiron-5447:~/flutteradmin/flutter_stream$ node main.js
internal/modules/cjs/loader.js:818
throw err;
^

Error: Cannot find module '/home/ak/flutteradmin/flutter_stream/main.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
at Function.Module._load (internal/modules/cjs/loader.js:667:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
ak@ak-Inspiron-5447:/flutteradmin/flutter_stream$ node -v
v12.22.5
ak@ak-Inspiron-5447:
/flutteradmin/flutter_stream$ npm install
npm WARN saveError ENOENT: no such file or directory, open '/home/ak/flutteradmin/flutter_stream/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/home/ak/flutteradmin/flutter_stream/package.json'
npm WARN flutter_stream No description
npm WARN flutter_stream No repository field.
npm WARN flutter_stream No README data
npm WARN flutter_stream No license field.

up to date in 1.923s
found 0 vulnerabilities

╭────────────────────────────────────────────────────────────────╮
│ │
│ New major version of npm available! 6.14.14 → 7.21.1 │
│ Changelog: https://github.com/npm/cli/releases/tag/v7.21.1
│ Run npm install -g npm to update! │
│ │
╰────────────────────────────────────────────────────────────────╯

ak@ak-Inspiron-5447:~/flutteradmin/flutter_stream$ node main.js
internal/modules/cjs/loader.js:818
throw err;
^

Error: Cannot find module '/home/ak/flutteradmin/flutter_stream/main.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
at Function.Module._load (internal/modules/cjs/loader.js:667:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}

Video Preview issue

Why is it like the video plays in debug mode and it gets stuck on the first frame after the loader progress gets done and nothing happens further in release mode. Anyone?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.