| 129 | } |
| 130 | |
| 131 | func (b *bridge) Play(key *ari.Key, id string, uri string) (*ari.PlaybackHandle, error) { |
| 132 | if id == "" { |
| 133 | id = rid.New(rid.Playback) |
| 134 | } |
| 135 | k, err := b.c.createRequest(&proxy.Request{ |
| 136 | Kind: "BridgePlay", |
| 137 | Key: key, |
| 138 | BridgePlay: &proxy.BridgePlay{ |
| 139 | MediaURI: uri, |
| 140 | PlaybackID: id, |
| 141 | }, |
| 142 | }) |
| 143 | if err != nil { |
| 144 | return nil, err |
| 145 | } |
| 146 | return ari.NewPlaybackHandle(k.New(ari.PlaybackKey, id), b.c.Playback(), nil), nil |
| 147 | } |
| 148 | |
| 149 | func (b *bridge) StagePlay(key *ari.Key, id string, uri string) (*ari.PlaybackHandle, error) { |
| 150 | if id == "" { |