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

[Android] None of the available extractors (...) could read the stream #606

Closed
javier-artiles opened this issue May 22, 2019 · 8 comments
Closed

Comments

@javier-artiles
Copy link

javier-artiles commented May 22, 2019

Configuration

$ react-native info
  React Native Environment Info:
    System:
      OS: macOS 10.14.5
      CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
      Memory: 204.66 MB / 16.00 GB
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 12.1.0 - /usr/local/bin/node
      Yarn: 1.16.0 - /usr/local/bin/yarn
      npm: 6.9.0 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
    IDEs:
      Android Studio: 3.4 AI-183.5429.30.34.5452501
      Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
    npmPackages:
      react: ^16.8.3 => 16.8.3
      react-native: ^0.59.3 => 0.59.3
    npmGlobalPackages:
      react-native-cli: 2.0.1

react-native-track-player version 1.1.4

Issue

When I try to play the following stream URL https://nhks-vh.akamaihd.net/i/news/easy/k10011923001000.mp4/master.m3u8
the player fails on Android with:

{
  code: "playback-source"
  message : "None of the available extractors (MatroskaExtractor, FragmentedMp4Extractor, Mp4Extractor, Mp3Extractor, AdtsExtractor, Ac3Extractor, TsExtractor, FlvExtractor, OggExtractor, PsExtractor, WavExtractor, AmrExtractor) could read the stream."
  type: "playback-error"
}

Strangely an earlier build of my app with version 0.2.3 or react-native-track-player is able to play the stream without issue.

Here's some more detail on the stream:

#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=64000,CODECS="mp4a.40.2",CLOSED-CAPTIONS=NONE
https://nhks-vh.akamaihd.net/i/news/easy/k10011923001000.mp4/index_0_a.m3u8?null=0&id=AgAyz4n2FyAuHHC05VxmY81II0nwX6YO6XNjoYkDmlXsFLrySjy6aBUOjV35yRhpL5vB69xqJFhEwQ%3d%3d

Note 1: I've confirmed playback does work for this stream on iOS.
Node 2: I've also tried enabling all extensions through the track-player.json file, unsuccessfully.

{
  "dash": true,
  "hls": true,
  "smoothstreaming": true
}
@javier-artiles javier-artiles changed the title None of the available extractors (...) could read the stream [Android] None of the available extractors (...) could read the stream May 23, 2019
@dcvz
Copy link
Contributor

dcvz commented May 23, 2019

Hey @javier-artiles I have an inkling about what the issue could be. Do you have a basic demo of this not working?

@javier-artiles
Copy link
Author

Hi @dcvz thank for your prompt reply.
I've created a basic demo that illustrates the issue. In the README of the repo I've pasted the log results that I get when running on Android.
Thank you for your help!!

@javier-artiles
Copy link
Author

Hi @dcvz by any chance have you been able to look into this issue? If you have any leads I could investigate I may be able to unlock some progress. I’m not familiar with the underlying libraries (or Android native development in general), but I can give it a try if you think that’s where the root cause may be.

@dcvz
Copy link
Contributor

dcvz commented May 31, 2019

@javier-artiles pulling down your branch now and investigating

@dcvz
Copy link
Contributor

dcvz commented May 31, 2019

@javier-artiles you've forgotten to specify the type of the stream as HLS.. You can specify that in the track object -- there's more info in the documentation

for your specific example, you'd change this:

await TrackPlayer.add({
  id: streamUrl,
  url: streamUrl,
  type: 'hls', // missing this!
  //title: 'Track Title',
  //artist: 'Track Artist',
  //artwork: require('track.png')
});

@dcvz
Copy link
Contributor

dcvz commented May 31, 2019

try it out and let me know if it's working for you :)

@dcvz
Copy link
Contributor

dcvz commented May 31, 2019

as far as I believe we are no longer using the track-player.json to enable modules. /cc @Guichaguri

@javier-artiles
Copy link
Author

Thank you so much @dcvz I missed that. I should have reads the docs more thoroughly.
The issue is fixed once I set the track type field to hls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants