(rooms *Rooms, current ClientInfo)
| 9 | type StartShare struct{} |
| 10 | |
| 11 | func (e *StartShare) Execute(rooms *Rooms, current ClientInfo) error { |
| 12 | room, err := rooms.CurrentRoom(current) |
| 13 | if err != nil { |
| 14 | return err |
| 15 | } |
| 16 | |
| 17 | room.Users[current.ID].Streaming = true |
| 18 | |
| 19 | v4, v6, err := rooms.config.TurnIPProvider.Get() |
| 20 | if err != nil { |
| 21 | return err |
| 22 | } |
| 23 | |
| 24 | for _, user := range room.Users { |
| 25 | if current.ID == user.ID { |
| 26 | continue |
| 27 | } |
| 28 | room.newSession(current.ID, user.ID, rooms, v4, v6) |
| 29 | } |
| 30 | |
| 31 | room.notifyInfoChanged() |
| 32 | return nil |
| 33 | } |
nothing calls this directly
no test coverage detected