drm_wv_fp_player 0.0.3

  • Readme
  • Changelog
  • Example
  • Installing
  • 73

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

Android #

Ensure the following permission is present in your Android Manifest file, located in `

<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.


  • 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 {
  _VideoAppState createState() => _VideoAppState();

class _VideoAppState extends State<VideoApp> {
  VideoPlayerController _controller;

  void 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,//Pending Work
        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(() {});

  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.pause()
                  : _controller.play();
          child: Icon(
            _controller.value.isPlaying ? Icons.pause : Icons.play_arrow,

  void dispose() {

Contributors #

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

0.0.1 #

  • It was just attempt for making a plugin

0.0.2 #

  • I have added the Installation instructions to implement the plugins

0.0.3 #

  • HLS is currently Supported
  • Multi-Drm is not currently Supported (Still working on)


import 'dart:async';

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'video_player.dart';
import 'model/media.dart';

Future<List<Media>> loadMediaFiles() async {
  String jsonString = await rootBundle.loadString('assets/media.exolist.json');
  return Media.parseMediaLists(jsonString);

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

class MyApp extends StatelessWidget {
  Widget build(BuildContext context) {
    final appTitle = 'Flutter Exoplayer (Beta)';

    return MaterialApp(
      title: appTitle,
      home: MyHomePage(title: appTitle),

class MyHomePage extends StatelessWidget {
  final String title;

  MyHomePage({Key key, this.title}) : super(key: key);

  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(title),
      body: FutureBuilder<List<Media>>(
        future: loadMediaFiles(),
        builder: (context, snapshot) {
          if (snapshot.hasError) print(snapshot.error);
          print('SNAP SHOT DATA  ${snapshot.data.toString()}');
          return snapshot.hasData
              ? PhotosList(medias: snapshot.data)
              : Center(child: CircularProgressIndicator());

class PhotosList extends StatelessWidget {
  final List<Media> medias;

  PhotosList({Key key, this.medias}) : super(key: key);

  Widget build(BuildContext context) {
    return ListView.builder(
      itemCount: medias.length,
      itemBuilder: (context, index) {
        return StuffInTiles(medias[index]);

class StuffInTiles extends StatelessWidget {
  final Media myTile;
  BuildContext _context;


  Widget build(BuildContext context) {
    _context = context;
    return _buildTiles(myTile);

  Widget _buildTiles(Media t) {
    return ExpansionTile(
      key: PageStorageKey<int>(3),
      title: Text(t.name),
      children: t.samples.map(_buildSubTiles).toList(),

  Widget _buildSubTiles(Sample t) {
    return ListTile(
        dense: true,
        enabled: true,
        isThreeLine: false,
        onLongPress: () => print("long press"),
        onTap: () {
              _context, MaterialPageRoute(builder: (_) => VideoApp(sampleVideo: t,)));
        subtitle: Text(
          "Subtitle Description",
        selected: true,
        title: Text(t.name,
            style: TextStyle(fontSize: 18.0, color: Colors.black54)));
//ChewieDemo(sampleVideo: t,)

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  drm_wv_fp_player: ^0.0.3

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:drm_wv_fp_player/drm_wv_fp_player.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Apr 4, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.6
  • Flutter: 1.12.13+hotfix.8

Health suggestions

Fix lib/model/secured_video_content.dart. (-3.93 points)

Analysis of lib/model/secured_video_content.dart reported 8 hints, including:

line 7 col 16: Name non-constant identifiers using lowerCamelCase.

line 8 col 16: Name non-constant identifiers using lowerCamelCase.

line 9 col 16: Name non-constant identifiers using lowerCamelCase.

line 11 col 16: Name non-constant identifiers using lowerCamelCase.

line 17 col 12: Name non-constant identifiers using lowerCamelCase.

Format lib/drm_wv_fp_player.dart.

Run flutter format to format lib/drm_wv_fp_player.dart.

Maintenance suggestions

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
http ^0.12.0+2 0.12.0+4
Transitive dependencies
async 2.4.1
charcode 1.1.3
collection 1.14.11 1.14.12
http_parser 3.1.4
meta 1.1.8
path 1.6.4
pedantic 1.9.0
sky_engine 0.0.99
source_span 1.7.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies