GetExtension returns an RTP header extension
(id uint8)
| 422 | |
| 423 | // GetExtension returns an RTP header extension |
| 424 | func (h *Header) GetExtension(id uint8) []byte { |
| 425 | if !h.Extension { |
| 426 | return nil |
| 427 | } |
| 428 | for _, extension := range h.Extensions { |
| 429 | if extension.id == id { |
| 430 | return extension.payload |
| 431 | } |
| 432 | } |
| 433 | return nil |
| 434 | } |
| 435 | |
| 436 | // DelExtension Removes an RTP Header extension |
| 437 | func (h *Header) DelExtension(id uint8) error { |
no outgoing calls