Play Media Attachments

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

Previous topic - Next topic

aegersz

oh yeah, i tried this on a VANILLA SMF system so you do have a logic conflict ...
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

dougiefresh

#41
I apologize for being away from the forum for so long.  Other projects, plus life itself, has conspired to keep me away....  Then my computer crashed, so I had to fix it, too.....  :(

Quote from: engrz on May 05, 2017, 12:43:15 AM
Please make this mod possible of playing of video attachments, like MP4, FLV file... small clips to be played without downloading.
Yeah, I'll add support for playing small clips....

Quote from: aegersz on July 06, 2017, 07:27:28 AM
oh yeah, i tried this on a VANILLA SMF system so you do have a logic conflict ...
I've installed this mod on a clean 2.0.14 system and it works for me. 

I strongly suspect that the file-type detection isn't working correctly with this file.  Can you send me the media file in question, so that maybe I can figure out what is going on?  (Prefer via PM if possible, to avoid possibility of copyright infringement claim against the forum!)  Or maybe even a link to where it is being hosted on your forum?

aegersz

no, i can't - it's on my home system.

the mod works fine BY ITSELF but not with the Post_and_PM_Inline_Attachments mod also on.

does it work for you with both on ?
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

dougiefresh

#43
Uploaded v1.7 - July 6th, 2017
o Added support for SMF 2.1 Beta 3.
o Removed support for SMF 2.1 Beta 2.
o Added admin setting to set the audio player width.




@aegersz: Honestly, I didn't check.  And I've got a few other mods to fix for SMF 2.1 Beta 3 compatibility before I can work on this particular bug report....

dougiefresh

UPDATE:  I was trying to modify my Post and PM Inline Attachments mod and discovered that SMF 2.1 Beta 3 intregrates a completely new approach to inserting attachments.  In the near future, I will be adding a 128x128 mp3 and video image, representing their respective file types, in order to better show what kind of file is attached in the posting UI.

dougiefresh

Uploaded v1.8 - July 8th, 2017
o Fixed incorrect operation in Display.template.php.




@aegersz:  This update should fix the compatibility bug between this mod and the Post and PM Inline Attachments mod.  Please note that the issue wasn't in this mod, so you will need to install the updated Post and PM Inline Attachments mod (available in a few minutes from this post)....

Steve

If the issue wasn't in this mod, why the update Dougie? Are both updates required to fix the compatibility bug?


Edit: just realized what you changed may have also fixed other issues.
DO NOT pm me for support!

dougiefresh

Quote from: Steve on July 08, 2017, 05:07:41 PM
If the issue wasn't in this mod, why the update Dougie? Are both updates required to fix the compatibility bug?
This update fixes an issue where one of the operations in the mod didn't install correctly....  Not sure whether it just became an issue with 2.0.14, or whether Post and PM Inline Attachments has to be installed for the bug to show up.  It was definitely noticable with the Post and PM Inline Attachments mod install, as this mod wouldn't install otherwise....

BSD2000

Does this support playing .wav files? If not, can it be modified to play too?

Steve

Did you read the first post? It has an example link which shows it working for mp3, wav and ogg files. ;)
DO NOT pm me for support!

aegersz

Quote from: dougiefresh on July 08, 2017, 11:58:11 AM
Uploaded v1.8 - July 8th, 2017
o Fixed incorrect operation in Display.template.php.




@aegersz:  This update should fix the compatibility bug between this mod and the Post and PM Inline Attachments mod.  Please note that the issue wasn't in this mod, so you will need to install the updated Post and PM Inline Attachments mod (available in a few minutes from this post)....

OK, after a bit of mucking around, removing and reinstallling mods, it works but not with any of my WAV files.

here is a link to a tiny one at my site: https://forum.drugs-and-users.org/index.php/topic,3780
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

dougiefresh

Uploaded v1.9 - July 11th, 2017
o Fixed WAV audio file type detection code.




@aegersz:  Thanks for the bug report!  It was definitely an issue with the file type detection code, but not a problem I would have expected when I wrote the code....

aegersz

it works well now EXCEPT the last two versions give a duplication effect (one with the download option ?) ... sorry to be a pain.
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

dougiefresh

Please attach your Themes\default\Display.php file so that I can see what's going on....

aegersz

do you mean /var/www/html/Sources/Display.php (the only file with that name) or /var/www/html/Themes/default/Display.template.php ? here is both:
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

dougiefresh

 :o  Sorry, I meant Themes/default/Display.template.php, not Display.php.....   O:)  I suspect an operation was double-done for the template modification....

aegersz

The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

dougiefresh

@aegersz:  I'm sorry about the delay in responding....  I kinda forgot about this thread.  O:)

I removed first of the two audio attachment additions (the first being from an older version) in Display.template.php file and have attached it to this post.  If you have modified that file, search for is_audio in that file and remove the first occurrance.

dougiefresh

v1.10 - August 2nd, 2017
o Added code to display supported video clips stored as attachments.
o Added video width option to settings.
o Adjusted audio operation to use new audio width option.
o Added audio width option to settings.

WishyWash

Hi dougiefresh, I've just installed version 1.10 of your mod. After attaching an MP3 file to a post, the player appears as advertised. However, when I press play, nothing happens. No sound, counter is stuck at 0:00. I've tried Firefox, Safari and Chrome (no IE/Edge, I'm on a Mac). Any idea what could be wrong? Thank you!

Advertisement: