Giter Club home page Giter Club logo

Comments (5)

pedroSG94 avatar pedroSG94 commented on June 26, 2024 1

Hello,

Both cases are currently possible.

1 - You have a callback to detect connection fail. You can use that callback to start recording.

2 - Using StreamBase (RtmpStream, RtspStream, SrtStream, UdpStream or GenericStream class). You can change the audio and video source on fly.
You have an example changing video source on fly here:
https://github.com/pedroSG94/RootEncoder/blob/master/app/src/main/java/com/pedro/streamer/rotation/RotationActivity.kt#L70
https://github.com/pedroSG94/RootEncoder/tree/master/app/src/main/java/com/pedro/streamer/rotation

For internal audio you can use InternalSource and for microphone MicrophoneSource.
InternalSource need use a service to create the MediaProjection class like ScreenSource. You have an example using ScreenSource here:
https://github.com/pedroSG94/RootEncoder/blob/master/app/src/main/java/com/pedro/streamer/screen/ScreenService.kt

Note:
I'm not sure if you can use the same MediaProjection instance for ScreenSource and InternalSource

from rootencoder.

pedroSG94 avatar pedroSG94 commented on June 26, 2024 1

You can do it this way:
https://github.com/pedroSG94/RootEncoder/blob/master/app/src/main/java/com/pedro/streamer/rotation/CameraFragment.kt#L128

from rootencoder.

ramt57 avatar ramt57 commented on June 26, 2024

Hi,

So Thanks for the Reply, Internal Audio is working fine now and yes we can use the same MediaProjection instance for ScreenSource and InternalSource.

from rootencoder.

ramt57 avatar ramt57 commented on June 26, 2024

Also, Can u tell me how can I record to a local file. I mean is this possible with your library or should I just implement my own recorder

from rootencoder.

ramt57 avatar ramt57 commented on June 26, 2024

Thanks

from rootencoder.

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.