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 7.1.1 Nougat (API 25) ABI x86_64 not playing Video #672

Closed
anshul-kai opened this issue Jul 2, 2017 · 10 comments
Closed

Android 7.1.1 Nougat (API 25) ABI x86_64 not playing Video #672

anshul-kai opened this issue Jul 2, 2017 · 10 comments

Comments

@anshul-kai
Copy link

Videos aren't playing on Android Nougat (API 25) ABI x86_64. Could this be an issue across all 64-bit ABIs?

@michaelspeed
Copy link

this is a problem i am facing! actually the app freezes for sometime before playing the video. but then it starts

@michaelspeed
Copy link

michaelspeed commented Jul 2, 2017

07-03 03:26:04.061 16603-16603/com.atmiyo W/MediaPlayer: setScreenOnWhilePlaying(true) is ineffective without a SurfaceHolder
07-03 03:26:04.062 16603-16603/com.atmiyo W/MediaPlayer: Couldn't open https://firebasestorage.googleapis.com/v0/b/xxxx: java.io.FileNotFoundException: No content provider: https://firebasestorage.googleapis.com/v0/b/xxxx
07-03 03:26:14.355 16603-16603/com.atmiyo W/MediaPlayer: Couldn't open https://firebasestorage.googleapis.com/v0/b/xxxx: java.io.FileNotFoundException: No content provider: https://firebasestorage.googleapis.com/v0/b/xxxx
07-03 03:26:24.603 16603-16603/com.atmiyo W/MediaPlayer: setScreenOnWhilePlaying(true) is ineffective for Surface
07-03 03:26:24.675 16603-16603/com.atmiyo I/Choreographer: Skipped 1236 frames! The application may be doing too much work on its main thread.

them again it starts playing!!! anyone knows why its skipping?
this problem does not exist in iOS

@michaelspeed
Copy link

this solves while using exoplayer

@manuTro
Copy link

manuTro commented Jul 7, 2017

@michaelspeed I also solved by using exoplayer, but now I cannot see the video, just a black window, and from my log I have com.google.android.exoplayer2.upstream.HttpDataSource$InvalidResponseCodeException: Response code: 401. Did you got the same?

@michaelspeed
Copy link

well sometimes it works and sometimes i get the same error with a black screen. i checked it with ios version and no issues there

@anshul-kai
Copy link
Author

anshul-kai commented Jul 9, 2017

Using ExoPlayer solves my problem guys. I don't see any black windows. Want to share your code?

@manuTro
Copy link

manuTro commented Jul 10, 2017

@a-koka I'm using clojurescript, but if you want I can share it.. However my code works fine by using react-navive-video without exoplayer, just the app freeze before show the video (but at the least I can see the video).
I added exoplayer in this way :
settings.grandle

//include ':react-native-video'
// project(':react-native-video').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-video/android')
//project(':react-native-video').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-video/android-exoplayer')
include ':react-native-fs'
project(':react-native-fs').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fs/android')

include ':app'
include ':react-native-fs'

include ':react-native-video-exoplayer'
project(':react-native-video-exoplayer').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-video/android-exoplayer')
project(':react-native-fs').projectDir = new File(settingsDir, '../node_modules/react-native-fs/android')

build.grandle

    // compile project(':react-native-video')
  compile project(':react-native-video-exoplayer')
    compile project(':react-native-fs')
    compile fileTree(dir: "libs", include: ["*.jar"])
    compile "com.android.support:appcompat-v7:23.0.1"
    compile "com.facebook.react:react-native:+"  // From node_modules
}

Is it right?

@anshul-kai
Copy link
Author

This is how my settings.gradle looks. I didn't make any change to build.gradle.

include ':react-native-video'
project(':react-native-video').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-video/android-exoplayer')

I haven't tried your approach of renaming the project but I can't image why it would work any different. I'm not having any issues with a black screen though. Did you implement the hack to update paused via onLoad? There are few threads discussing this. One is here.

Here's a snippet of how to hack paused:

_onload() {
  this.setState({paused: !paused}, () => this.setState({plapausedying}))
}

<Video source={{uri}}
    volume={1.0}
    muted={false}
    paused={!paused}
    onLoad={this._onLoad.bind(this)} />

@manuTro
Copy link

manuTro commented Jul 11, 2017

@a-koka For now I didn't implemented the onLoad callback.. but I think my problem is about cookies because I got this response com.google.android.exoplayer2.upstream.HttpDataSource$InvalidResponseCodeException: Response code: 401. .I opened this issue #683

@cobarx
Copy link
Contributor

cobarx commented Jun 3, 2018

ExoPlayer cookie support will be included in 2.2.0

@cobarx cobarx closed this as completed Jun 3, 2018
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

4 participants