#known 2017-03-30

2017-03-30 UTC
benwerd, chrisaldrich, [kevinmarks], tantek, j12t and [cleverdevil] joined the channel
#
martymcguire[m]
Anybody up for reviewing my PR for audio posts via micropub? :)
#
[cleverdevil]
I looks like benwerd is making good progress on pull requests
#
[cleverdevil]
Three or four were merged today.
#
aaronpk
martymcguire[m]: might want to check for conflicts with my PR
j12t, jeremycherfas, dosch[m], wakest, plindner, martymcguire[m], pvagner, jaduncan[m], mapkyca, [dgold], loicm, [kevinmarks], jeremycherfas_ and travis-ci joined the channel
#
travis-ci
mapkyca/idno#172 (master - 5f08e9f : Ben Werdmuller): The build has errored.
#
martymcguire[m]
aaronpk: good idea. no merge conflicts, but this time the tests passed, so maybe that helps.
#
aaronpk
Cool. Maybe also double check audio is supported in JSON?
travis-ci joined the channel
#
travis-ci
mapkyca/idno#173 (master - 352318f : Marcus Povey): The build passed.
#
martymcguire[m]
heh. i don't have a micropub client that posts audio and JSON. :}
loicm, jeremycherfas and j12t joined the channel
#
aaronpk
I will send your PR a PR
jeremycherfas_ joined the channel
#
martymcguire[m]
ah, i see. to support it audio with JSON i need to add audio URL handling like you've put in for photo and video.
#
aaronpk
i've almost got it
#
aaronpk
just testing it now
#
martymcguire[m]
oh nice, thanks!
#
aaronpk
i see what you mean about the video thing in your comment
#
aaronpk
i might do a PR for that too
#
martymcguire[m]
that seems great. this was my first time at the known rodeo, so i wasn't sure how far to go. :}
benwerd joined the channel
#
aaronpk
whoa, what plugin does known use to make the little waveform player
#
aaronpk
i want that
#
aaronpk
i'm getting an error message that i can't find the source of
#
aaronpk
I don't understand where the text "We couldn't access" is coming from
[kevinmarks] joined the channel
#
aaronpk
oh i found it. the ' was escaped so my search wasn't working
#
[kevinmarks]
Neat. I wrote one in C for random reasons
#
aaronpk
video in the known micropub plugin has never worked as far as i can tell
#
martymcguire[m]
^ glad I am not crazy for thinking that was the case :)
#
aaronpk
for two reasons, one of which martymcguire[m] found
#
aaronpk
the other reason is there is no "video" type :P
j12t joined the channel
#
martymcguire[m]
does media not cover video?
#
aaronpk
media does. but the code was setting $type='video'
#
aaronpk
so then it was failing to create a "video" post because it actually needed to create a "media" post
#
martymcguire[m]
Oh right. I added audio to the list of types that triggered "media"
#
martymcguire[m]
For the same reason.
#
martymcguire[m]
There's a ContentType class
#
martymcguire[m]
oh, that is a good question. i was just opening that back up.
benwerd joined the channel
#
aaronpk
beeeeennnnn
j12t_ joined the channel
#
aaronpk
i will just ignore that then
#
martymcguire[m]
but maybe it only handles saving them. the display template seems to expect audio?? https://github.com/martymcguire/Known/blob/ac6dbe8693da51c5106e46fd8e318b47ec5e7227/IdnoPlugins/Media/templates/default/entity/Media.tpl.php
#
aaronpk
there's a video tag in there
#
aaronpk
if (substr($attachment['mime-type'], 0, 5) == 'video')
#
martymcguire[m]
ah, yep, i had skimmed too quickly.
#
aaronpk
so I have it uploading the video, and it's rendering the page with the video tag, and i see it's saved the file to disk
#
aaronpk
but for some reason i can't actually view the video in my browser, even directly from the URL
#
aaronpk
i'm going to PR this to you and you can try it out
#
martymcguire[m]
well that's interesting.
#
martymcguire[m]
got it. pulling this down to check it out.
#
martymcguire[m]
just to double-check - are you happy with the support for audio micropub via JSON that you added?
#
martymcguire[m]
ie - is the remaining mystery in this PR only "how video?"
#
aaronpk
yes, that worked great. i tested uploading a file, referencing a URL in form-encoded, and referencing a URL in JSON
#
aaronpk
maybe we should make video fixing its own thing?
#
aaronpk
or just try it out, i think it's working, there might just be something wrong with my nginx
#
martymcguire[m]
does micropub.rocks have a video test? that might be faster than me whipping up a request via curl
#
aaronpk
hm it doens't. one sec
#
martymcguire[m]
oh, hah, thanks!
#
aaronpk
updated with formencoded too
jeremycherfas_ joined the channel
#
martymcguire[m]
hmm. uploaded via the JSON version, seemed to work, but i think i am now seeing the same behavior that you were
#
aaronpk
just a black video player?
#
martymcguire[m]
video tag is there, but video doesn't play. likewise loading mp4 URL.
#
martymcguire[m]
however if i wget the URL and save the result, VLC plays it fine.
#
aaronpk
is there something about the http header known returns that prevents the browser from recognizing it?
#
martymcguire[m]
content type is video/mp4
#
aaronpk
content type and length match the headers on my site
#
martymcguire[m]
it sends a lot of HTTP 206 partial response chunks
#
aaronpk
it looks like it's requesting the last byte repeatedly
#
martymcguire[m]
the first request seems to return the correct content type and length. not sure why it becomes a partial content response in the browser (but not curl)
#
aaronpk
yeah i don't get it
#
aaronpk
works fine in safari!
#
martymcguire[m]
hah!
#
aaronpk
i was testing in chrome
#
martymcguire[m]
likewise. firefox also fails.
#
aaronpk
well then i don't think the problem has anything to do with the micropub endpoint
#
[kevinmarks]
Is there an off by 1 error somewhere?
#
aaronpk
it appears so
#
aaronpk
this is why i prefer nginx/apache serve files directly
#
martymcguire[m]
requesting the raw .mp4 URL, firefox makes a normal request and apparently doesn't get teh whole content.
#
martymcguire[m]
the next request gets back a really interesting header:
#
martymcguire[m]
Content-Range: bytes 5308416-5380899/5380900
#
martymcguire[m]
as though the server is denying that last byte. further suggests off-by-one handling in known's file serving.
#
martymcguire[m]
aaronpk: i'm going to merge your PR into my PR and add a comment about the strange video behavior, along with the link to your gist for exercising video uploads.
jeremycherfas_, benwerd and [cleverdevil] joined the channel
#
martymcguire[m]
PR updated
#
martymcguire[m]
confirmed that video posts created with the native known "audio" uploader have the same issue.
#
aaronpk
well at least we ruled out anything having to do with the micropub endpoint then
[eddie] joined the channel
#
martymcguire[m]
yep. moving the discussion of video serving to a new Issue.
jeremycherfas_ joined the channel
#
martymcguire[m]
did a bit more digging. safari is just more tolerant of the missing byte. it still spins-then-fails on the final frames of the video.
#
martymcguire[m]
seems like an issue w/ partial content requests
jeremycherfas_, [keithjgrant], [cleverdevil] and [kevinmarks] joined the channel
#
[kevinmarks]
You can probably omit the last byte most of the time, but it's known doing its own serving?
sensiblemn and pvagner joined the channel
#
[kevinmarks]
Are you on mongo?
#
aaronpk
no, mysql. it writes the file to disk
#
@withknown
Google and Facebook and algorithms and editors can't fix fake news with feel-good Band Aids. https://backchannel.com/google-and-facebook-cant-just-make-fake-news-disappear-48f4b4e5fbe8
(twitter.com/_/status/847513341912272898)
#
martymcguire[m]
also on mysql, files written to disk.
#
martymcguire[m]
shonky is definitely a good word: https://github.com/idno/Known/blob/master/Idno/Files/MongoDBFile.php#L37
#
aaronpk
i wonder...
#
aaronpk
did that video we were using include any emoji in its metadata?
#
aaronpk
that often messes up counting things
#
martymcguire[m]
ffprobe didn't turn up any particular textual metadata there
tantek, jeremycherfas, benwerd, [eddie], [dgold], j12t, [mko], [aaronpk], [cleverdevil], [acegiak_net] and [kevinmarks] joined the channel