Before he was likable – before “The Late Late Show” and “Carpool Karaoke” and hosting the Tony Awards – James Corden was a bit too much. In a good way. In British television shows like “Gavin and Stacey” and “The Wrong Mans,” he perfected characters who achieved high comedy through constant pressure. They were irrepressible, because of their sweet natures and frantic, because of their staggering insecurity and exasperated, because no one took them seriously. And they channelled their too-muchness into corrosive sarcasm. You could easily imagine one of them having a tantrum in a restaurant; you’d be a little surprised if he didn’t. Corden is a lot else besides: a highly skilled physical comedian who won a Tony for “One Man, Two Guvnors” and when he goes there, a gifted dramatic actor in films like “The History Boys” and Mike Leigh’s “All or Nothing.” But he’s been lost in the wilderness of late-night chat and Hollywood self-promotion for quite a few years now. So even a minor event like “Mammals” – a six-episode dark comedy premiering Friday on Amazon Prime Video, Corden’s first scripted TV series since “The Wrong Mans” in 2014 – sparks some interest. “Mammals” was written by the serious British playwright Jez Butterworth and directed by the morbid-humor specialist Stephanie Laing and it is – this is a little spoilerish, but you can’t really talk about the show without saying it – a comedy of infidelity. Corden and Melia Kreiling play Jamie and Amandine, a chef and a marketing expert in London whose apparently blissful marriage starts to go through some changes almost as soon as the show begins. The show is less about plot development than it is about detection and revelation, as an accidental discovery leads Jamie down a rabbit’s hole of investigation into Amandine’s hidden life. As with so much of TV writing now, Butterworth’s script doesn’t show us characters developing and changing. Instead it gradually reveals the things, some secret and some simply withheld from us, that have made the characters what they already are. The pleasure of this kind of storytelling depends in part on skillful arrangement and deployment of surprise, and on this count “Mammals” is a middling affair – plot mechanics don’t seem to be Butterworth’s strength, and within the show’s three hours, there’s a fair bit of mild, aimless drift. But to be fair, his focus may be elsewhere. As the series goes along, it begins to appear that Butterworth is making a relatively significant, though not overt, attempt to model “Mammals” on Shakespeare’s “The Tempest.” The clues are in the dialogue and while the correspondences aren’t direct, you can see the outlines: Corden’s Jamie as the exiled Prospero, another character emerging as the usurping Antonio, a series of figurative shipwrecks in Jamie’s life propelling the plot. Like the Shakespearean romances that culminate in “The Tempest” and “The Winter’s Tale,” “Mammals” works to build comedy out of tragedy and sends its characters to hell and back en route to a hoped-for happy ending. It’s tricky to pull off and Butterworth has a way of giving sentimentality a dry, cynical edge that doesn’t dispose you to care about his characters as much as you need to. But Corden and Kreiling help to compensate, along with Sally Hawkins as Jamie’s sister and Colin Morgan as Jamie’s brother-in-law, who pitches in on the investigation. Another characteristic of the Shakespearean romance that Butterworth assimilates is the requirement for magic – the human characters are in such bad straits that a little extra help is needed to resolve the situation. “Mammals” incorporates magic as a talking point and as ambience, with scenes at an enchanting seaside cottage and a dreamily lighted nighttime playground. And it hints, here and there, at the existence of the real thing. Some real magic may be needed to resolve the issues the show puts in the way of its lovers, including questions about the nature of marriage and commitment, and whether lifelong monogamous bonds make any sense. Jamie, whose self-worth is based less on his culinary skills than on his marriage to a woman considered far out of his league, is not inclined to be flexible on those points. Whether he’ll have a Prospero-like change of heart remains to be seen – unlike Shakespeare’s romances, “Mammals” ends in a winking cliffhanger. Along the way, Corden is more tamped down than in his vintage roles. But there are moments – a lunge toward a smarmy rival, aborted at the last second; Jamie’s nervous prolixity in a flashback to his first meeting with Amandine – when he gets to practice his alchemy, transmuting convulsive nervousness or rage into crystalline comedy.