This is a quote from Solomons and Frylhe Organic Chemistry 10th Ed, Chapter 13, p.614
Reactions of this type are quite general with other conjugated dienes. Conjugated trienes often show 1,6-addition. An example is the 1,6-addition of bromine to cycloocta-1,3,5-triene.

A plausible mechanism for the bromination step would be the initial formation of a bromonium ion which is attacked distally by bromide:

Sequential nucleophilic substitution with dimethylamine then leads to the desired product.
Echoing Martin's comment on Siddharth Porwal's answer, there is a distillation step between the bromination and the substitution with dimethylamine. It is not possible for a putative bromonium ion to survive. Also, the isolation of the 1,6-dibromide also disproves the possibility of 1,2-addition mentioned in RE60K's answer.
The reaction above was originally reported by Cope et al.:[1]
Bromine (3 g) in 20 ml of chloroform was added to a stirred solution of 2 g of 1,3,5-cyclooctatriene in 20 ml of chloroform at −15 to −25° in a nitrogen atmosphere in a period of one hour. The product was distilled rapidly under reduced pressure; b.p. 95° (0.3 mm), n25ᴅ 1.5954. [...] Previous work had shown that dibromocyclooctadiene prepared by the two routes gave the same bis-dimethylaminocyclooctadiene by reaction with dimethylamine.
Reference
- Cope, A. C.; Stevens, C. L.; Hochstein, F. A. Cyclic polyolefins. v. preparation of bromocyclooctadienes and 1,3,5-cyclooctatriene from 1,5-cyclooctadiene. J. Am. Chem. Soc. 1950, 72 (6), 2510–2514. DOI: 10.1021/ja01162a047.