(video: str)
| 252 | |
| 253 | |
| 254 | def load_base64_video(video: str) -> BytesIO: |
| 255 | parsed_url = urlparse(video) |
| 256 | data_spec, data = parsed_url.path.split(",", 1) |
| 257 | media_type, data_type = data_spec.split(";", 1) |
| 258 | |
| 259 | if data_type != "base64": |
| 260 | msg = "Only base64 data URLs are supported for now." |
| 261 | raise NotImplementedError(msg) |
| 262 | |
| 263 | content = base64.b64decode(data) |
| 264 | return content |
| 265 | |
| 266 | |
| 267 | def load_video(video: str, |
no test coverage detected