Skip to content

[BUG]: HLS video less than 1 second doesn't work on iOS #4274

Open
@ivaniuk7531

Description

@ivaniuk7531

Version

6.7.0

What platforms are you having the problem on?

iOS

System Version

iOS 17.6.1

On what device are you experiencing the issue?

Real device, Simulator

Architecture

New architecture with interop layer

System and libraries information

System:
  OS: macOS 14.6.1
  CPU: (8) arm64 Apple M1 Pro
  Memory: 51.97 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.18.0
    path: ~/.nvm/versions/node/v20.18.0/bin/node
  Yarn:
    version: 3.6.4
    path: /opt/homebrew/bin/yarn
  npm:
    version: 10.8.2
    path: ~/.nvm/versions/node/v20.18.0/bin/npm
  Watchman:
    version: 2024.09.16.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.15.2
    path: /Users/ivaniuk/.rvm/gems/ruby-3.2.0/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.0
      - iOS 18.0
      - macOS 15.0
      - tvOS 18.0
      - visionOS 2.0
      - watchOS 11.0
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.1 AI-241.18034.62.2411.12071903
  Xcode:
    version: 16.0/16A242d
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.12
    path: /Users/ivaniuk/.jenv/shims/javac
  Ruby:
    version: 3.2.0
    path: /Users/ivaniuk/.rvm/rubies/ruby-3.2.0/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.75.4
    wanted: 0.75.4
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

What happened?

I cannot play HLS videos that are less than 1 second in length on iOS devices. However, the same video works on Android devices and the online service at HLS.js demo. When I try to play HLS videos that are less than 1 second, I get this error below:

{
    "error": {
        "code": -11848,
        "domain": "AVFoundationErrorDomain",
        "localizedDescription": "Cannot Open",
        "localizedFailureReason": "The media cannot be used on this device.",
        "localizedRecoverySuggestion": ""
    },
    "target": 6625
}

Reproduction Link

https://github.com/ivaniuk7531/react-native-video-HLS-error

Reproduction

This is very easy to reproduce. You can use this URL https://d1249b47aalla0.cloudfront.net/pictures/41/726/41726322/5ynk7fyup8pf8t5gr7/video/low/10030395362/vid.m3u8 and react native video version 6.7.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Verification

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions