Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Video_Player does not play video on iOS Simulator (not sure about physical device) #14038

Closed
FaisalAbid opened this issue Jan 11, 2018 · 8 comments
Labels
a: video Video playback package flutter/packages repository. See also p: labels.

Comments

@FaisalAbid
Copy link

Steps to Reproduce

Installed the video player plugin. Added the correct Info.plist keys. But I cant get the video to play.

import 'dart:async';

import 'package:flutter/material.dart';

import 'package:video_player/video_player.dart';

class VideoScreen extends StatefulWidget {
  final String id;
  final String type;
  VideoScreen(this.id, this.type);

  @override
  State<StatefulWidget> createState() {
    return new _VideoScreenState();
  }
}

class _VideoScreenState extends State<VideoScreen> {
  VideoPlayerController _controller;
  bool _isPlaying = false;

  @override
  void initState() {
    super.initState();
    _controller = new VideoPlayerController(
      'http://www.sample-videos.com/video/mp4/720/big_buck_bunny_720p_20mb.mp4',
    )
      ..addListener(() {
        final bool isPlaying = _controller.value.isPlaying;
        if (isPlaying != _isPlaying) {
          setState(() {
            _isPlaying = isPlaying;
          });
        }
      })
      ..initialize();
  }

  @override
  Widget build(BuildContext context) {
    return new Scaffold(
      appBar: new AppBar(
        title: new Text("Video"),
      ),
      body: new Center(
        child: new Padding(
          padding: const EdgeInsets.all(10.0),
          child: new AspectRatio(
            aspectRatio: 1280 / 720,
            child: new VideoPlayer(_controller),
          ),
        ),
      ),
      floatingActionButton: new FloatingActionButton(
        onPressed:
        _controller.value.isPlaying ? _controller.pause : _controller.play,
        child: new Icon(
          _controller.value.isPlaying ? Icons.pause : Icons.play_arrow,
        ),
      ),
    );
  }
}

Logs

Clicking Play causes this to appear in the the console

[VERBOSE-1:ios_external_texture_gl.mm(37)] Failed to create GLES texture cache: -6661
[VERBOSE-1:ios_external_texture_gl.mm(37)] Failed to create GLES texture cache: -6661
[VERBOSE-1:ios_external_texture_gl.mm(37)] Failed to create GLES texture cache: -6661
[VERBOSE-1:ios_external_texture_gl.mm(37)] Failed to create GLES texture cache: -6661
[VERBOSE-1:ios_external_texture_gl.mm(37)] Failed to create GLES texture cache: -6661
[VERBOSE-1:ios_external_texture_gl.mm(37)] Failed to create GLES texture cache: -6661
[VERBOSE-1:ios_external_texture_gl.mm(37)] Failed to create GLES texture cache: -6661
[VERBOSE-1:ios_external_texture_gl.mm(37)] Failed to create GLES texture cache: -6661
[VERBOSE-1:ios_external_texture_gl.mm(37)] Failed to create GLES texture cache: -6661
[VERBOSE-1:ios_external_texture_gl.mm(37)] Failed to create GLES texture cache: -6661
[VERBOSE-1:ios_external_texture_gl.mm(37)] Failed to create GLES texture cache: -6661
[VERBOSE-1:ios_external_texture_gl.mm(37)] Failed to create GLES texture cache: -6661
[VERBOSE-1:ios_external_texture_gl.mm(37)] Failed to create GLES texture cache: -6661

Flutter Doctor

flutter doctor
[✓] Flutter (on Mac OS X 10.13.2 17C88, locale en-US, channel master)
• Flutter at /Users/faisalabid/Development/flutter
• Framework revision 3782415 (5 days ago), 2018-01-05 14:48:50 -0800
• Engine revision 6a724f0
• Tools Dart version 1.25.0-dev.11.0
• Engine Dart version 2.0.0-edge.5b56dfb77a76e9d8021086c0684b1e8bd9dbca9a

[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
• Android SDK at /Users/faisalabid/Library/Android/sdk
• Android NDK at /Users/faisalabid/Library/Android/sdk/ndk-bundle
• Platform android-27, build-tools 27.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)

[✓] iOS toolchain - develop for iOS devices (Xcode 9.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 9.2, Build version 9C40b
• ios-deploy 1.9.2
• CocoaPods version 1.3.1

[✓] Android Studio (version 3.0)
• Android Studio at /Applications/Android Studio.app/Contents
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)

[✓] IntelliJ IDEA Ultimate Edition (version 2017.2.6)
• Flutter plugin version 19.1
• Dart plugin version 172.4343.25

[✓] Connected devices
• iPhone X • 25D3677C-3836-4267-9A41-D68F3666E8B6 • ios • iOS 11.2 (simulator)

@FaisalAbid FaisalAbid changed the title Video_Player does not play video on iOS Simulator (not sure about device) Video_Player does not play video on iOS Simulator (not sure about physical device) Jan 11, 2018
@najeira
Copy link
Contributor

najeira commented Jan 11, 2018

video_demo says "The video demo is not supported on the iOS Simulator.".

I run Flutter Gallery on iOS physical device and confirmed video_demo works.

@LeonidVeremchuk
Copy link

Google pixel (1,2), Samsung Galaxy s6,s8, Meizu M3 Note. Gallery Application or official sample: video buffering more than 10 sec, freezing or blank screen with audio only.

@Hixie
Copy link
Contributor

Hixie commented May 31, 2018

cc @mravn-google

@Hixie Hixie added plugin a: video Video playback labels May 31, 2018
@Hixie Hixie added this to the Goals milestone May 31, 2018
@mravn-google
Copy link
Contributor

Question is if these problems have been solved by the ongoing Skia work done in collaboration with customer:gold for #16178.

@zoechi
Copy link
Contributor

zoechi commented Jul 19, 2018

I'm going to close this as dup of #14647 because I think the title of #14647 matches the actual issue better.
Please add a comment to get the issue reopened if you disagree.

@zoechi zoechi closed this as completed Jul 19, 2018
@Hixie
Copy link
Contributor

Hixie commented Jul 19, 2018

@zoechi Also feel free to edit the titles. :-)

@zoechi
Copy link
Contributor

zoechi commented Jul 19, 2018

@Hixie sure, but I needed a reason to decide for one or the other ;-)

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 16, 2021
@flutter-triage-bot flutter-triage-bot bot added the package flutter/packages repository. See also p: labels. label Jul 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: video Video playback package flutter/packages repository. See also p: labels.
Projects
None yet
Development

No branches or pull requests

6 participants