News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Play Media Attachments

Started by dougiefresh, December 30, 2016, 11:43:52 PM

Previous topic - Next topic

Arantor

Because this stuff is actually *hard* to get right.

SMF attachments never provide content-range out of the box, not 100% sure if this mod does it, because it's also hard to get right as ranged headers in general are the devils work. (For more information, take a look at LevGal which has a lot of code that might be useful to you)

dougiefresh

OH MY GOD!!!   SERIOUSLY??!?!?!?   ARGHHH!!!

Okay, now that I got that out of my system, I can try to fix the mod using this new information.  I was completely unaware that I was missing anything in this regard.  Thanks, Juanchoartes and Arantor for providing the clues I needed to get this right.




@Arantor:  Nope, this mod does not provide content-range or content-length as a part of it's standard response.  SMF 2.0.x provides content-length, but only if either we're doing compressed output or the file size is greater than 4M....

EDIT:  Looks like SMF 2.1 Beta 3 is pretty similar to SMF 2.0.x in this regard.

@Juanchoartes:  I'll try to implement a fix for this issue.

Steve

DO NOT pm me for support!

dougiefresh

Quote from: Steve on September 18, 2017, 10:48:07 AM
And the error I'm getting?
Whoops!  Sorry I missed that message!  I've fixed it for the next version.

Juanchoartes

Thank you very much @dougiefresh!

dougiefresh

UPDATE:  I've been trying to integrate code into the attachment download function in order to do ranged downloads and it is screwing up my test install (where it concerns media files)....  It is being a complete b#tch... 

Also, Levertine Gallery (which I assume is LevGal) is still live, but registering on the forum is disabled, purchasing is disabled (as if I had the money!), plus the ability to downloading it is non-existent....  So I'm at a loss on how to look at that project to see how it was done....  Frankly, from what little is available on their forum, that project might be dead and buried....

I've found a few more minor bugs and have fixed them for the next version.  I'll release the fixed version probably tomorrow, as I'm going to sleep now.

lurkalot

Quote from: dougiefresh on September 22, 2017, 10:49:18 PM

Also, Levertine Gallery (which I assume is LevGal) is still live, but registering on the forum is disabled, purchasing is disabled (as if I had the money!), plus the ability to downloading it is non-existent....  So I'm at a loss on how to look at that project to see how it was done....  Frankly, from what little is available on their forum, that project might be dead and buried....


You will find a very generous post by Arantor right here, where you can pick up a copy of Levgal https://www.simplemachines.org/community/index.php?topic=525210.msg3921971#msg3921971

dougiefresh

Holy sheep!  I missed that (although not suprised, since attachments don't show up on Yahoo search....)  Thanks a bunch, lurkalot!

dougiefresh

Uploaded v2.2 - December 8th, 2017
o Fixed several undefined element/variable errors in the mod.

Steve

Why when uninstalling the previous version do I get a test failed with 'ignore errors' in parenthesis? (see attachment)
DO NOT pm me for support!

-Rock Lee-

I thought you had left the translation, I leave it attached although I have a question with the MIME itself, that's why I translated it to my opinion if something is wrong you let me know.


Regards!
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

dougiefresh

Uploaded v2.3 - December 15th, 2017
o Added Spanish Latin translation, courtsey of Rock Lee!
o Added missing add/remove hooks entry for proper mod uninstallation.




@Rock Lee:  Thank you for the translation!  It's been included in this version!

Steve

So what do I do about the errors uninstalling the previous version? Ignore them or not?
DO NOT pm me for support!

dougiefresh

@Steve:  Sorry for getting back to you so late.  The PersonalMessage.php file has a single operation, which I'm pretty sure is related to PM Attachments.  If you don't have that mod installed, then you can ignore the error.  If you do have it installed, then you need to fix the issue before uninstalling.  Is that the file you are having an issue with?  Your picture shows so much....  ::)

Steve

Sorry about the image. I deserved that verbal spanking lol ...

I don't have PM Attachments installed but attached is the full width image.
DO NOT pm me for support!

dougiefresh

#115
@Steve: Verbal spanking...   O:)  I LOL'ed at that...   8) That operation is to properly support an installation with the PM attachment mods installed....



Quote from: Juanchoartes on September 18, 2017, 06:02:09 AM
I have noticed that in Firefox, the attached audio doesn't play well. The audio plays but the total duration of the audio doesn't appear and you can't go forward in the timeline. When the audio finishes, the following appears in the place where the audio duration was: "Infinity: NaN: NaN". I have attached an image with the explanation. In Chrome, the audio plays perfect and you can click in the timeline to move forward or backward.

I have been researching and it seems that this problem would be more related to Firefox. In this link they say something about that: https://stackoverflow.com/questions/6887867/html5-audio-video-tag-duration-on-firefox

"Make sure that your server sets the content-length and content-range properties in his response-header." (which I haven't understood).

Any idea of why in Firefox the audio file is playing wrong?
I've tried integrating the content-range and content-length and other range-related s#@t into the download code, without success.  I'm working on a seperate script to provide the video download; failing that, the attachment system will be modified to do direct downloads of the video file.  I hate doing that last one, though....  I at least have some control with a script....

Steve

The mod works fine but the attached is what the player looks like after it's done playing the file.

Is that normal?
DO NOT pm me for support!

Steve

Any chance you've looked at this Dougie?
DO NOT pm me for support!

dougiefresh

When I run the mod in localhost, the video just stops at (what I assume is) the last frame of the video.  I'm using the attached video to test with....

Steve

Okay ... that's bizarre. Tried your video and it worked fine so I was going to attach the audio file I had tested but I tried it again before I did and it worked fine.

So I guess whatever gremlin was messing with me left town. :P
DO NOT pm me for support!

Advertisement: