Advertisement:

Author Topic: Play Media Attachments  (Read 9103 times)

Offline Juanchoartes

  • Semi-Newbie
  • *
  • Posts: 13
Re: Play Media Attachments
« Reply #80 on: September 09, 2017, 11:40:01 AM »
Hi @dougiefresh

Before the installation, it appears again the error in the capture that I attached in my last post, about writing the file "PersonalMessage.template.php" of the theme.

After installing, appears the message you can see in the capture attached to this post.
("¡Un error ha ocurrido!" means "An error has occured!").
("Falla al enviar el formulario. La sesión ha expirado" means "Failed to submit form. The session has expired").

I don't know if those two errors or messages are important for the correct functioning of the mod, but it works perfect now. The video tag is gone and there is no error when I attached a mp3 file.

Great! Thank you very much for your work!  ;D

Offline aegersz

  • Sophist Member
  • *****
  • Posts: 1,007
  • Gender: Male
  • "mods" junkie
    • dopetalk
Re: Play Media Attachments
« Reply #81 on: September 10, 2017, 01:42:12 AM »
@dougiefresh - this is now working for me ... just the Automatic Attachment Rotation install conflict to sort out to get me back to where I was.

no code mods were required.
SMF 2.0: 130+ mods installed (the full List can be seen at http://forum.drugs-and-users.org/index.php/topic,3301)

Offline aegersz

  • Sophist Member
  • *****
  • Posts: 1,007
  • Gender: Male
  • "mods" junkie
    • dopetalk
Re: Play Media Attachments
« Reply #82 on: September 10, 2017, 01:44:23 AM »
I also got a "your session has timed out" at the point where the Package Installer redirects you to the settings for the mod - but only on my test system !

weird.
SMF 2.0: 130+ mods installed (the full List can be seen at http://forum.drugs-and-users.org/index.php/topic,3301)

Offline aegersz

  • Sophist Member
  • *****
  • Posts: 1,007
  • Gender: Male
  • "mods" junkie
    • dopetalk
Re: Play Media Attachments
« Reply #83 on: September 10, 2017, 06:52:38 AM »
sorry to be a pain in the arse but is there any support for .wma files ?
SMF 2.0: 130+ mods installed (the full List can be seen at http://forum.drugs-and-users.org/index.php/topic,3301)

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,333
    • XPtsp.com Community
Re: Play Media Attachments
« Reply #84 on: September 10, 2017, 04:12:13 PM »
I've included mime detection for WMA and WMV files in the mod and fixed the mod installer so that the session expires message doesn't appear.  Please note that it does not promise that the browser will support them....  It'll be in the next release.... 
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline Juanchoartes

  • Semi-Newbie
  • *
  • Posts: 13
Re: Play Media Attachments
« Reply #85 on: September 11, 2017, 06:31:55 AM »
Perfect. Thanks again!

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,333
    • XPtsp.com Community
Re: Play Media Attachments
« Reply #86 on: September 11, 2017, 11:48:20 AM »
Uploaded v2.1 - September 10th, 2017
o Fixed expired session error upon mod install.
o Added file signatures and mime types for WMA, WMV and AAC files.



@aegersz and @Juanchoartes:  Hopefully, this update addresses each of the issues you brought up, with exception of the Automatic Attachment Rotation install conflict, which literally has nothing to do with this mod....  O:)
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline aegersz

  • Sophist Member
  • *****
  • Posts: 1,007
  • Gender: Male
  • "mods" junkie
    • dopetalk
Re: Play Media Attachments
« Reply #87 on: September 11, 2017, 10:51:49 PM »
sweet. sorry about the Image Rotation mod mention - I get derailed so easily.

thanks again !
SMF 2.0: 130+ mods installed (the full List can be seen at http://forum.drugs-and-users.org/index.php/topic,3301)

Offline Juanchoartes

  • Semi-Newbie
  • *
  • Posts: 13
Re: Play Media Attachments
« Reply #88 on: September 12, 2017, 11:54:42 AM »
Hi @dougiefresh

Today I have tested the 2.0.1 version in my server (I had tested it some days ago in my local installation but not in the server) and the Video tag is still there! There is not Video tag in my local installation, but it appears in the remote installation. Is the same version of my forum, no changes.

I have uninstalled the 2.0.1 version of the mod and installed the 2.1 and the Video tag still appears. Any idea about what is happening?

By the way, the "expired session error" is gone, but instead, another error appears. I have attached to this post a screen capture with the error.


Offline Juanchoartes

  • Semi-Newbie
  • *
  • Posts: 13
Re: Play Media Attachments
« Reply #89 on: September 14, 2017, 05:08:20 AM »
Hello again

I have updated Mozilla Firefox to the last version (55.0.3) but that has not fixed the error of the video tag. I attached a capture of a post with two jpg images attached. The video tag appearance has changed, I guess is because the new version of Firefox.

In my local installation, the mod works fine, the video tag doesn't appear. But in my remote SMF installation, every time I attach a jpg file (or png), the video tag appears.

If anyone who is using this mod in a remote installation, had this problem and fixed it, please let me know. Maybe could be an issue with the hosting... I don't know.

Offline Steve

  • Support Specialist
  • SMF Hero
  • *
  • Posts: 3,710
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: Play Media Attachments
« Reply #90 on: September 14, 2017, 10:07:01 AM »
Or a conflict with another mod. What other mods do you have installed?
Please do not PM me for support.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,333
    • XPtsp.com Community
Re: Play Media Attachments
« Reply #91 on: September 14, 2017, 11:10:09 AM »
@Juanchoartes:  Please attach your Sources/Display.php so that I can see if there is anything I can see that might cause this conflict....
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline Juanchoartes

  • Semi-Newbie
  • *
  • Posts: 13
Re: Play Media Attachments
« Reply #92 on: September 14, 2017, 03:00:11 PM »
Hi @Steve and @dougiefresh

Finally, I fixed.

The problem was a conflict with the "PDF Tag" mod (the only one mod that I have installed ). Thank you very much Steve. Your comment was very helpful!

If someone has the same problem, these are the steps I followed to fix the conflict with that mod:
  • Uninstall and delete the "PDF Tag" mod.
  • Before uninstalling the "PDF Tag" mod, an error warning about editing the /Source/Subs.php file appears. In spite of that, I uninstalled the mod. "PDF Tag" mod adds the following code to the /Source/Subs.php file:
Code: [Select]
// PDF [pdf]example.pdf[/pdf]
         array(
            'tag' => 'pdf',
            'type' => 'unparsed_content',
            'content' => ($context['browser']['is_ie'] && !$context['browser']['is_mac_ie'] ? '<object type="application/pdf" classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" data="$1" width="800" height="600"><param name="src" value="$1"><embed src="$1" width="500" height="400" /><noembed><a href="$1" target="_blank">$1</a></noembed></object>' : '<embed type="application/pdf" src="$1" width="500" height="400" /><noembed><a href="$1" target="_blank">$1</a></noembed>'),
            'validate' => create_function('&$tag, &$data, $disabled', '
               if (isset($disabled[\'url\']))
                  $tag[\'content\'] = \'$1\';'),
            'disabled_content' => '<a href="$1" target="_blank">$1</a>',
         ),

  • Edit the file, delete that code and save (remember to make a backup of the file in case you make some mistake).
  • Install "Play Media Attachments" mod.
  • IMPORTANT: You have to reattach every jpg file (or any other format) that gave the error of the video tag.

That's all. Now works perfect!


Well, finally I fixed it. The mod is working great. Surely I should have tested earlier if some mod was causing some conflict but since I only had one installed, I did not realize. Sorry about that.

Thank you very much @dougiefresh and @Steve!  ;)

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,333
    • XPtsp.com Community
Re: Play Media Attachments
« Reply #93 on: September 14, 2017, 03:44:57 PM »
Weird.  I don't see a connection between the two, but I'm at work and haven't looked at that other mod,  either.  Good to know you solved your issue!

I can write an admin function to rescan all attachments to assign proper mime types.  The catch is that some "new" formats, like SVG, aren't likely to be detected correctly....
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline Steve

  • Support Specialist
  • SMF Hero
  • *
  • Posts: 3,710
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: Play Media Attachments
« Reply #94 on: September 14, 2017, 05:45:49 PM »
No worries Juanchoartes. Thanks for letting dougie know what the problem was and your solution.
Please do not PM me for support.

Offline Juanchoartes

  • Semi-Newbie
  • *
  • Posts: 13
Re: Play Media Attachments
« Reply #95 on: September 15, 2017, 06:52:37 AM »
I did a lot of test and right now I am not sure about it, but I am almost sure that in one of the tests I did in one of my local installations, the mod worked fine without uninstalling the mod "PDF Tag".

Anyway, the only thing that worked for me in my remote installation was to uninstall the mod "PDF Tag".

That admin function would be great although I would not need it because I did not have many attachments in the forum. I reattached the files manually.

Thank you @dougiefresh and thank you @Steve.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,333
    • XPtsp.com Community
Re: Play Media Attachments
« Reply #96 on: September 15, 2017, 01:33:28 PM »
I did a lot of test and right now I am not sure about it, but I am almost sure that in one of the tests I did in one of my local installations, the mod worked fine without uninstalling the mod "PDF Tag".

Anyway, the only thing that worked for me in my remote installation was to uninstall the mod "PDF Tag".
I've had a chance to sit down and look at the PDF Tag mod.  What I don't understand is why you are having the issues you are, cause there is literally NOTHING there that I can see that would conflict and/or interfere with this mod....

That admin function would be great although I would not need it because I did not have many attachments in the forum. I reattached the files manually.
Okie-dokie....
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline Juanchoartes

  • Semi-Newbie
  • *
  • Posts: 13
Re: Play Media Attachments
« Reply #97 on: September 16, 2017, 10:16:07 AM »
Hi @dougiefresh

The only thing that worked for me in my remote installation was to uninstall the "PDF Tag" mod and now "Play Media Attachments" works perfectly but maybe there is something that I have not considered, I don't know... I haven't made any changes in my remote installation that could fix the problem there was. Only uninstalling and deleting the "PDF Tag" mod.

Anyway, if there is any information I can look at my remote installation that could help you, let me know.

Offline Steve

  • Support Specialist
  • SMF Hero
  • *
  • Posts: 3,710
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: Play Media Attachments
« Reply #98 on: September 17, 2017, 01:16:45 PM »
Am getting an error anytime I play an attached file (the file plays) ... see attached.

Also attached is my display.template if you need it.
Please do not PM me for support.

Offline Juanchoartes

  • Semi-Newbie
  • *
  • Posts: 13
Re: Play Media Attachments
« Reply #99 on: September 18, 2017, 06:02:09 AM »
Hi

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 [nofollow]

"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?