def caption(self): if self._caption is None: for stream in self.stream: if stream['stream kind'] == 'caption' and 'content' in stream: self._caption_track = stream self._caption = Caption.from_node(self.env, stream['content']) break if self._caption is None: self._caption = Caption(self.env) return self._caption