Coder Social home page Coder Social logo

Comments (10)

mekya avatar mekya commented on July 20, 2024 1

Yeah sure, have you tried to catch the RTMPIOException with try-catch block and show an appropriate message?

from librtmp-client-for-android.

ojw28 avatar ojw28 commented on July 20, 2024 1

The app doesn't crash when this error occurs. It's already caught by ExoPlayer internally, and propagated to the player's event listener (which gives you a handy point where you can show an appropriate error message).

If your app is crashing, it's not directly related to the logging at the top of this thread. You'd need to provide a more complete log or bug report.

from librtmp-client-for-android.

mekya avatar mekya commented on July 20, 2024

Please check out the RTMPIOException errorcode

Can I test the rtmp url?

from librtmp-client-for-android.

LloydBlv avatar LloydBlv commented on July 20, 2024

@mekya Thanks for your response, the url is generated dynamically, so I cant share, I looked at the url you mentioned, Is there anyway to prevent the app from crash and show a proper error message?

from librtmp-client-for-android.

keremkusmezer avatar keremkusmezer commented on July 20, 2024

I have also a similar issue you can find the bug detail in
google/ExoPlayer#3156

Rtmp Client also dies

from librtmp-client-for-android.

mekya avatar mekya commented on July 20, 2024

It is interesting. The thread you mentioned(google/ExoPlayer#3156) has been resolved. You are still having the sampe problem?

from librtmp-client-for-android.

nagendraK6 avatar nagendraK6 commented on July 20, 2024

I am testing antmedia server and getting similar exception. The rtmp url works fine if I run from VLC player or ffplay on mac

I am putting rtmp url like this

rtmp://34.213.233.241:1935/LiveApp/228154535248454858718201

Error code i am receiving -4

from librtmp-client-for-android.

nagendraK6 avatar nagendraK6 commented on July 20, 2024

/ExoPlayerImplInternal: Source error.
net.butterflytv.rtmp_client.RtmpClient$RtmpIOException
at net.butterflytv.rtmp_client.RtmpClient.open(RtmpClient.java:53)
at com.google.android.exoplayer2.ext.rtmp.RtmpDataSource.open(RtmpDataSource.java:57)
at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractingLoadable.load(ExtractorMediaPeriod.java:692)
at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:315)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)

from librtmp-client-for-android.

aktjkt avatar aktjkt commented on July 20, 2024

Still Getting the same issue
E/ExoPlayerImplInternal: Source error.
net.butterflytv.rtmp_client.RtmpClient$RtmpIOException
at net.butterflytv.rtmp_client.RtmpClient.open(RtmpClient.java:56)
at com.google.android.exoplayer2.ext.rtmp.RtmpDataSource.open(RtmpDataSource.java:57)
at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractingLoadable.load(ExtractorMediaPeriod.java:841)
at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:308)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Please Help

from librtmp-client-for-android.

MarkDylan100 avatar MarkDylan100 commented on July 20, 2024

@mekya how cant I catch the error?

`private fun play(rtmpUri: String) {
    try {
        player = ExoPlayerFactory.newSimpleInstance(
                DefaultRenderersFactory(this), DefaultTrackSelector(), DefaultLoadControl())
        val playerView = findViewById<SimpleExoPlayerView>(R.id.player_view)
        //val uri = Uri.parse(BuildConfig.STREAMING_URL)
        val uri = Uri.parse(rtmpUri)

        playerView.player = player

        val mediaSource = ExtractorMediaSource(uri, RtmpDataSourceFactory(), DefaultExtractorsFactory(), null, null)

        player?.prepare(mediaSource)
        player?.playWhenReady = true
    } catch (e: Exception) {
        println("invalid uri")
    }
}`

this try catch doesn't do anything

from librtmp-client-for-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.