You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Possible to provide own MediaStream object as source? #9
In my situation, I already have a peer connection (and thus video/audio source) running inside the logic of my own app. Now what I want to do is relay this custom MediaStream to the flashphoner server. I have looked at the source code of the core, but there is a lot of logic. I was just wondering what the general approach would be to accomplish this. I can provide more details if needed!
We didn't test passing external MediaStream object to our API.
Most likely it does not work out of the box. Please post your case on our tech forums at https://forum.flashphoner.com We will report once we have any news on this issue.
I was able to fix the issue with some minor modification to the client library. I don't think there is an way to do it without this change. It would be a nice feature perhaps, considering most people who would want to integrate the webrtc to rtmp functionality probably already have a way of getting their MediaStream.
Here you can capture stream from HTML5 Canvas. You need to choose "Canvas" source instead of Cam.
Perhaps it would help to capture arbitrary MediaStream in your case.
Activity
flashphoner commentedon Mar 2, 2018
We didn't test passing external MediaStream object to our API.
Most likely it does not work out of the box. Please post your case on our tech forums at https://forum.flashphoner.com We will report once we have any news on this issue.
khayamy001 commentedon Mar 2, 2018
I was able to fix the issue with some minor modification to the client library. I don't think there is an way to do it without this change. It would be a nice feature perhaps, considering most people who would want to integrate the webrtc to rtmp functionality probably already have a way of getting their MediaStream.
For example, this way it would be possible to create a custom MediaStream object from the Web Audio API (see: https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createMediaStreamDestination), which in the current scenario is impossible.
Thanks for the reply!
flashphoner commentedon May 9, 2018
We have implemented canvas capturing feature and publishing stream over WebRTC.
Please checkout our demo app.
https://demo.flashphoner.com/client2/examples/demo/streaming/media_devices_manager/media_device_manager.html
https://demo.flashphoner.com/client2/examples/demo/streaming/media_devices_managermanager.js
Here you can capture stream from HTML5 Canvas. You need to choose "Canvas" source instead of Cam.
Perhaps it would help to capture arbitrary MediaStream in your case.