Giter Site home page Giter Site logo

darwinvtomy / drm_wv_fp_player Goto Github PK

View Code? Open in Web Editor NEW
26.0 5.0 13.0 72.54 MB

Few of the resources from flutter plugin video_player

Home Page: https://github.com/flutter/plugins/tree/master/packages/video_player

License: Other

Java 40.99% Ruby 4.54% Swift 1.44% Objective-C 0.61% Dart 52.42%
drm widevine android flutter flutter-plugin video video-player exoplayer dash

drm_wv_fp_player's Introduction

drm_wv_fp_player (Beta Version)

An awesome Flutter plugin for Playing Widevine and Fairplay(Incomplete still) DRM Contents For Android and IOS Phones

Getting Started

This project is a starting point for a Flutter app for VOD based Apps We have Integrated DRM for Flutter based VOD App The development is Premature stage and I need volunteers to work on the IOS counter part We used Android's Exoplayer,Framework to integrate in Native Android And video_player, in flutter the following project is the combination of both Exoplayer and video_player (I don't have Mac-System to work on IOS part) The project is still in beta stage. And I am trying to get all help i can get I have completed 30% of the project.I will complete the remaining, once I get the time or resources

Flutter Plugin

plug-in package, a specialized package that includes platform-specific implementation code for Android and/or iOS.

For help getting started with Flutter, view Google's online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Installation

First, add drm_wv_fp_player as a dependency in your pubspec.yaml file.

iOS

Warning: Still have to wait We are looking for volunteers for working on IOS Side

Android

Ensure the following permission is present in your Android Manifest file, located in `/android/app/src/main/AndroidManifest.xml:

<uses-permission android:name="android.permission.INTERNET"/>

The Flutter project template adds it, so it may already be there.

Supported Formats

  • On Android, the backing player is ExoPlayer, please refer here for list of supported formats.

DRM

  • Widevine is currently supported
  • HDCP Compilence is seems to be working
  • Playready is not functional in android
  • Fairplay I need a MAC book and Apple Account
  • DASH is supported with adaptive streaming
  • MULTI-DRM Sample will be added once Fairplay is Fixed
  • All Functionality of Exoplayer will be replicated.

Example

import 'package:drm_wv_fp_player/drm_wv_fp_player.dart';
import 'package:drm_wv_fp_player/model/secured_video_content.dart';

void main() => runApp(VideoApp());

class VideoApp extends StatefulWidget {
  @override
  _VideoAppState createState() => _VideoAppState();
}

class _VideoAppState extends State<VideoApp> {
  VideoPlayerController _controller;

  @override
  void initState() {
    super.initState();
      _controller = VideoPlayerController.exoplayerMeidaFrameWork(MediaContent(
        name: "WV: Secure SD (cenc,MP4,H264)",//Can be null
        uri: 'https://storage.googleapis.com/wvmedia/cenc/h264/tears/tears_sd.mpd',//Google Test Content
        extension: null,//Extension can be added like (mpd,m3u8)
        drm_scheme: 'widevine',
        drm_license_url: 'https://proxy.uat.widevine.com/proxy?provider=widevine_test', //Google Test License
        ad_tag_uri: null,//Pending work
        spherical_stereo_mode: null, //Pending Work
        playlist: null, //Pending Work
      ))
        ..initialize().then((_) {
          // Ensure the first frame is shown after the video is initialized, even before the play button has been pressed.
          setState(() {});
        });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Video Demo',
      home: Scaffold(
        body: Center(
          child: _controller.value.initialized
              ? AspectRatio(
                  aspectRatio: _controller.value.aspectRatio,
                  child: VideoPlayer(_controller),
                )
              : Container(),
        ),
        floatingActionButton: FloatingActionButton(
          onPressed: () {
            setState(() {
              _controller.value.isPlaying
                  ? _controller.pause()
                  : _controller.play();
            });
          },
          child: Icon(
            _controller.value.isPlaying ? Icons.pause : Icons.play_arrow,
          ),
        ),
      ),
    );
  }

  @override
  void dispose() {
    super.dispose();
    _controller.dispose();
  }
}

Contributors

  1. DARWIN V TOMY, --Yep that's meee
  2. CANEWSIN, --The New Guy
  3. Imiginary Friend
  4. Motivatiors
  5. And My Computer which keeps hanging while i work on Android Studio
  6. Google Search
  • LinkdIn, If any one wants Connect me. I am happy to help
  • PayPal, In case If anyone wants to buy me a โ˜•

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.