* 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:
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 = ""
|
||||
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)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user