jhomlala / betterplayer

Better video player for Flutter, with multiple configuration options. Solving typical use cases!
Apache License 2.0
917 stars 972 forks source link

[BUG] iOS: PlatformException(VideoError, Failed to load video: Cannot Open, null, null) #1161

Closed jigaradesarasa closed 1 year ago

jigaradesarasa commented 1 year ago

Hello,

I'm checking given better player example project to play .mpd video but getting below error on iOS. (In Android working fine)

Error: Unhandled Exception: PlatformException(VideoError, Failed to load video: Cannot Open, null, null)

Code:

  BetterPlayerDataSource dataSource = BetterPlayerDataSource(
        BetterPlayerDataSourceType.network, "https://bitmovin-a.akamaihd.net/content/sintel/sintel.mpd",
        useAsmsSubtitles: true, useAsmsTracks: true, videoFormat: BetterPlayerVideoFormat.dash, videoExtension: "mpd");
    _betterPlayerController = BetterPlayerController(betterPlayerConfiguration);
    _betterPlayerController.setupDataSource(dataSource);

Current Result: simulator_screenshot_25D2AADF-02A1-4AD1-8007-22CE2AB074A7

Error Log: Unhandled Exception: PlatformException(VideoError, Failed to load video: Cannot Open, null, null)

Flutter Doctor:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.0.0, on macOS 12.5 21G72 darwin-x64, locale en-IN)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[!] Xcode - develop for iOS and macOS (Xcode 13.4)
    ! CocoaPods 1.10.2 out of date (1.11.0 is recommended).
        CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/platform-plugins
      To upgrade see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.2)
[✓] VS Code (version 1.74.3)
[✓] Connected device (4 available)
[✓] HTTP Host Availability

! Doctor found issues in 1 category.
Eimji commented 1 year ago

Hello,

Dash is not supported on iOS.

Use HLS instead.

SARVADHIABHISHEK commented 1 year ago

Hello,

Dash is not supported on iOS.

Use HLS instead.

i set videoformate as hls but didn't work that

AhmedPothiyawala commented 1 month ago

can anyone find any of this solutions

jigaradesarasa commented 1 month ago

can anyone find any of this solutions

Try chewie player for iOS