feat(app): artifact videos play in the viewer, as the web

This commit is contained in:
2026-10-23 14:41:30 +01:00
parent d1555e721f
commit 6fd14e76ca
9 changed files with 345 additions and 17 deletions
@@ -86,7 +86,6 @@ void main() {
test('unsupported types are explicit instead of a fake preview', () {
for (final record in <ArtifactRecord>[
_record('result.csv', contentType: 'text/csv'),
_record('clip.mp4', contentType: 'video/mp4'),
_record('bundle.zip', contentType: 'application/zip'),
]) {
final plan = _plan(record);
@@ -96,4 +95,12 @@ void main() {
expect(plan.resolved, isNotNull);
}
});
test('a same-origin video plays in the viewer without a byte fetch', () {
final plan = _plan(_record('clip.mp4', contentType: 'video/mp4'));
expect(plan.kind, ArtifactPreviewKind.video);
expect(plan.canFetch, isFalse);
expect(plan.message, isEmpty);
expect(plan.resolved, isNotNull);
});
}