| 169 | } |
| 170 | |
| 171 | func (b *bridge) Record(key *ari.Key, name string, opts *ari.RecordingOptions) (*ari.LiveRecordingHandle, error) { |
| 172 | if opts == nil { |
| 173 | opts = &ari.RecordingOptions{} |
| 174 | } |
| 175 | if name == "" { |
| 176 | name = rid.New(rid.Recording) |
| 177 | } |
| 178 | |
| 179 | k, err := b.c.createRequest(&proxy.Request{ |
| 180 | Kind: "BridgeRecord", |
| 181 | Key: key, |
| 182 | BridgeRecord: &proxy.BridgeRecord{ |
| 183 | Name: name, |
| 184 | Options: opts, |
| 185 | }, |
| 186 | }) |
| 187 | if err != nil { |
| 188 | return nil, err |
| 189 | } |
| 190 | return ari.NewLiveRecordingHandle(k.New(ari.LiveRecordingKey, name), b.c.LiveRecording(), nil), nil |
| 191 | } |
| 192 | |
| 193 | func (b *bridge) StageRecord(key *ari.Key, name string, opts *ari.RecordingOptions) (*ari.LiveRecordingHandle, error) { |
| 194 | if opts == nil { |