The deal will see Harry Potter-maker Warner Bros. and Discovery take on Netflix, Disney+ and Amazon.