feat(chat): add inline video player component and modal viewer (#722) (#732)

* feat(chat): add inline video player component and modal viewer

Closes #722

* feat(chat): modernize video player with compact lock pill, save, and share

* refactor(chat): simplify inline video thumbnail to launch fullscreen player on tap

* fix(chat): pass session cookie and auth token headers to VideoView for protected media playback

* fix(chat): format unquoted cookie header for VideoView auth

* fix(chat): resolve video URLs via resolveImageUrl for gateway-hosted media
This commit is contained in:
M57 authored and GitHub committed 2026-08-01 00:47:26 +03:00
1 parent c3e026964c
commit 63b966b133
6 files changed
+580 -1

No files matched your search

@@ -244,4 +244,27 @@ class MarkdownTextFeatureTest {
assertTrue(nonGifAttachment.isImage)
assertFalse(nonGifAttachment.isGif)
}
// 14. Standalone video parsing (issue #722)
@Test
fun testStandaloneVideo_parsesToVideoBlock() {
val md = "![demo](https://example.com/demo.mp4)"
val block = parseBlocks(md).singleOrNull() as? MdBlock.Video
assertTrue("video URL should parse to Video block", block != null)
assertEquals("https://example.com/demo.mp4", block!!.uri)
assertEquals("demo", block.alt)
}
// 15. Attachment isVideo check (issue #722)
@Test
fun testAttachment_isVideo() {
val videoAttachment =
com.m57.hermescontrol.data.model.Attachment(
uri = "content://media/1.mp4",
name = "test.mp4",
mimeType = "video/mp4",
)
assertTrue(videoAttachment.isVideo)
assertFalse(videoAttachment.isImage)
}
}