add ability to handle swf and some audio files#679
Conversation
|
I support adding support for 4chan's flash board. Even if I can't view the files, I still like to read the posts. |
|
MP3 files are actually playable with Exoplayer along with some other types of audio files, so if you want to add in code to handle that instead of displaying a toast, that would be good. See https://exoplayer.dev/progressive.html; also you might want to add to the image inlining code to allow those types of files to be hotlinked. |
|
Is using the existing VIDEO mode for mp3 acceptable? |
|
Yep, I believe that would work fine. |
|
could you point me to the image inlining commit? i have trouble finding it. |
|
You should only need to modify this regex pattern for hotlinking: https://github.com/Adamantcheese/Kuroba/blob/multi-feature/Kuroba/app/src/main/java/com/github/adamantcheese/chan/core/site/parser/CommentParserHelper.java#L76 |
|
Thanks! |
|
Should we enable /f/ as requested by TacoTheDank while we're at it? |
|
Yeah, the bits that need removing are in Chan4BoardsRequest. |
|
One last thing. Should i add the same thumbnail for swf files on 4chan as i did for 420chan, or do you want to handle that different/yourself? |
|
Sure, I'll make them internal to the project when I merge it anyways (using that raw.githubusercontent style link). It'll remind me to do that. |
|
/m/ supports: Supported file types are: AAC, FLAC, GIF, JPG, M4A, MP3, NSF, OGG, PNG, SPC, WEBM Is this going to support the files that Exoplayer can play as well? |
|
AAC, NSF, SPC aren't supported by Exoplayer. |
In that case, @Lolzen I humbly request you support those as well. They may not be as commonly used as mp3 but it would be nice for FLAC, OGG and M4A to "just work" when we come across them. |
|
Sure thing. |
|
So it seems the flac extension has to be built from source according to https://github.com/google/ExoPlayer/blob/release-v2/README.md I'll personally pass on that one, as i don't really know how i would have to handle that with the gradle stuff. Regarding ogg - i have to tinker around a bit more. "Loading finished before preparation is complete" |
Apparently you don't need that extension anymore with the latest Exoplayer running on Android O MR1 and above devices since that version started shipping with a FLAC decoder. Just something to consider in the future. Probably not something you want to do for this PR just yet, or at least until we get to the latest Exoplayer 2.11.3 Thanks for M4A and OGG. Lossy codec support is probably enough for now anyway. |
|
allright. tested both flac & ogg and can cofirm them working. Hope it's a special case with https://boards.420chan.org/m/thread/454348#456286 On a side note i think it would be well to use a simple general "audio" thumbnail for audio fileTypes. |
Thanks for getting FLAC too! I think this might indeed be a special case because looking at the file properties, it was encoded with Lavc52.79.1 with Xiph.Org libVorbis I 20070622 so that is quite old. Might be worth sending that to the Exoplayer team. Or maybe a newer Exoplayer already fixed playback of such ogg files. |
…s available for a file Adjust some MultiImageView code to better use ExoPlayer 2 conventions; audio should no longer pop when playback begins if you have mute-by-default on
based on 462029b
Neither swf nor mp3's can be handled internally but still be downloaded.
Goes hand in hand with 420chan's /m/ & /f/ boards which support uploading these file types.
Surely there are other imageboards out there which support them aswell.