Igor-Khomich / JanusAudioStreamPlayer

14 stars 4 forks source link

Video Streaming #5

Open antondityativ opened 3 years ago

antondityativ commented 3 years ago

@Igor-Khomich Hello! How can I start stream from one device and connect to this stream from another device? Can I use my own server? Thank you very much for help So I can't see the video in localVideoView. Does it work right now?

antondityativ commented 3 years ago

@Igor-Khomich hmmm. I see that you doesn't call startCaptureLocalVideo method. Could you say the reason?

Igor-Khomich commented 3 years ago

Hi for now you can only receive the remote video stream. I work on streaming from device to the room, it will be ready soon, but I can say the exact date.

antondityativ commented 3 years ago

How can I receive video from my own server? Just change link?

Igor-Khomich commented 3 years ago

I've described it in your previous question:

To connect you have to type the room id and the streamer id. To get this id's you need the following functions: ` self.janusVBSession.getVideoRoomsList(completion: { (result, error) in print("GetRoomsList: (String(describing: result))") })

let roomId: Int = 1234 //TODO: get correct room id self.janusVBSession.getVideoRoomsParticipantsList(roomId: roomId) { (result, error) in print("getVideoRoomsParticipantsList: (String(describing: result))") } `

Example of all this code is in the VideoBridgeViewController.swift file.

For now works on device only, I have plans to run it on the simulator, but I can't say exactly when, perhaps within a couple of weeks. It's something like "pet project", and I don't really have a lot of free time for it.

It's all about "video room" plugin, or you can use the "streaming" plugin, example is in the VideoStreamingViewController.swift file.

Just change link?

Instance url setting is in the Environment.swift file

antondityativ commented 3 years ago

I can't find the streamer id(feed_id as I understand).Where can I get it?

Igor-Khomich commented 3 years ago

with

self.janusVBSession.getVideoRoomsParticipantsList(roomId: roomId) { (result, error) in
         print("getVideoRoomsParticipantsList: \(String(describing: result))")
}

you have to receive something like this:

{
    "janus": "success",
    "session_id": 829924416076783,
    "transaction": "CpPpiR72Y9co",
    "sender": 3358014535552715,
    "plugindata": {
        "plugin": "janus.plugin.videoroom",
        "data": {
            "videoroom": "participants",
            "room": 1234,
            "participants": [
                {
                    "id": 123456,
                    "display": "lklk",
                    "publisher": true,
                    "talking": false
                }
            ]
        }
    }
}

id you need - it's "participants"->"id": 123456

antondityativ commented 3 years ago

Thank you very much!

Igor-Khomich commented 3 years ago

You're welcome

Igor-Khomich commented 3 years ago

I see that you doesn't call startCaptureLocalVideo method. Could you say the reason?

Hi @antondityativ, I've just added the option to stream video from device to the video room. If it still actual for you.

younessali commented 3 years ago

Hi I am using AudioBridge Plugin. the sound is not working? how I can play the audiotrack

Igor-Khomich commented 3 years ago

Hi @younessali It's difficult to say something without the context, can you share the console log with me?

arsalanj commented 3 years ago

On the same note, how to get the video stream from the room onto the device? I am able to run the example with metecho URL, but can only share my own feed to there but not getting any feed from the room on my device

Igor-Khomich commented 3 years ago

@arsalanj hi, answered in your previous feed