title: Playing Vimeo videos in Flutter
body: <p>I'm trying to play <strong>vimeo videos</strong> in flutter app using the <code>video_player</code> plugin but got <strong>no success</strong>, it's throwing bunch of errors. 
  please help me how I might go about implementing this in flutter app? using webview or any plugin etc? perhaps a code snippet would be huge help for me!</p>
  
  <p>here is my code snippet </p>
  
  <pre><code>import 'package:video_player/video_player.dart';
  import 'package:flutter/material.dart';
  
  void main() =&gt; runApp(VideoApp());
  
  class VideoApp extends StatefulWidget {
    @override
    _VideoAppState createState() =&gt; _VideoAppState();
  }
  
  class _VideoAppState extends State&lt;VideoApp&gt; {
    VideoPlayerController _controller;
  
    @override
    void initState() {
      super.initState();
      _controller = VideoPlayerController.network(
          'https://vimeo.com/{some-video-id}')
        ..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();
    }
  }
  </code></pre>
  
  <p><strong>THE ERROR IN DEBUG CONSOLE -</strong></p>
  
  <blockquote>
    <p>E/AccessibilityBridge(28662): VirtualView node must not be the root
    node. E/ExoPlayerImplInternal(28662): Source error.
    E/ExoPlayerImplInternal(28662):
    com.google.android.exoplayer2.upstream.HttpDataSource$InvalidResponseCodeException:
    Response code: 404 E/ExoPlayerImplInternal(28662):    at
    com.google.android.exoplayer2.upstream.DefaultHttpDataSource.open(DefaultHttpDataSource.java:300)
    E/ExoPlayerImplInternal(28662):   at
    com.google.android.exoplayer2.upstream.StatsDataSource.open(StatsDataSource.java:83)
    E/ExoPlayerImplInternal(28662):   at
    com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractingLoadable.load(ExtractorMediaPeriod.java:885)
    E/ExoPlayerImplInternal(28662):   at
    com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:381)
    E/ExoPlayerImplInternal(28662):   at
    java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
    E/ExoPlayerImplInternal(28662):   at
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
    E/ExoPlayerImplInternal(28662):   at
    java.lang.Thread.run(Thread.java:919)</p>
  </blockquote>