Add capability to play HTML5 native formats without bbcode

Looking for an Extension? Have an Extension request? Post your request here for help. (Note: This forum is community supported; while there is an Extensions Development Team, said team does not dedicate itself to handling requests in this forum)
Suggested Hosts
nikitasius
Registered User
Posts: 15
Joined: Thu Apr 16, 2015 9:34 am

Re: Add capability to play HTML5 native formats without bbcode

Post by nikitasius »

Leinad4Mind wrote:That seems to me code for encode a video, we dont want to encode but display and play it.
Native html5 will not play .avi or .flv video in safari on ipad. And not all mp4 too. mencode - just as a bonus for people who want to prepare their videos for html5. My recomendation was: nginx parse html output and correct it. But in "extension" thread it looks like offtopic.
User avatar
shortmort37
Registered User
Posts: 656
Joined: Sat Aug 26, 2006 8:40 pm
Location: Upper Darby, PA, USA
Name: Dan Morton
Contact:

Re: Add capability to play HTML5 native formats without bbcode

Post by shortmort37 »

nikitasius wrote:Native html5 will not play .avi or .flv video in safari on ipad. And not all mp4 too.
I have webcode that displays a bare .mp4 video. I have not yet found any HTML 5 browser - on any OS - that won't play it.

That said, if I attempt to display it under phpBB, it fails on Windows Safari, and iOS Safari & Chrome.

I'm just a newbie, and I'm still struggling with figuring out how my IDE works for debugging. But if someone wants to help with a differential diagnosis on the above, that's helpful. Discussions about how to make it work with bbcode, encoders, or getting the video to work when hosted on a remote site don't help me. Check the goal of this extension request in the initial post of this thread. For other objectives, it might be better to start a new thread.

Thanks
Dan
User avatar
shortmort37
Registered User
Posts: 656
Joined: Sat Aug 26, 2006 8:40 pm
Location: Upper Darby, PA, USA
Name: Dan Morton
Contact:

Re: Add capability to play HTML5 native formats without bbcode

Post by shortmort37 »

shortmort37 wrote:I have webcode that displays a bare .mp4 video. I have not yet found any HTML 5 browser - on any OS - that won't play it.
OK - that's not true. I recently discovered that there's a Safari for Windows. It won't play in that.

Not that I care, much. Here are two tests, you can browse the source:

1) http://www.59plymouth.net/phpBB/direct.html

This directly specifies the source, which resides in the same directory. It works on Windows IE11, Chrome, and Firefox, and on iOS Safari and Chrome. It does *not* work on Windows Safari.

2) http://www.59plymouth.net/phpBB/filephp.html

This derives the source using download/file.php. It works on Windows IE11, Chrome and Firefox. It does *not* work on iOS Safari and Chrome. (Again, not on Windows Safari.)

Pretty basic tests. Still, I can't figure out what it is that iOS doesn't like about (2). Brewskies to the winner.

Dan
User avatar
stefd75
Registered User
Posts: 10
Joined: Sat Feb 20, 2016 1:39 pm

Re: Add capability to play HTML5 native formats without bbcode

Post by stefd75 »

i did all these tests too ...

as i said before, the onlyone solution is to not encrypte .mp4 as actual physical name.. because these cheet of safari and ios don't want to read.

We must develop a module to upload mp4 like this : iduser_idunique_nameofvideo.mp4 and it will work.

i'm ready to pay someone to do this, contact me.
User avatar
shortmort37
Registered User
Posts: 656
Joined: Sat Aug 26, 2006 8:40 pm
Location: Upper Darby, PA, USA
Name: Dan Morton
Contact:

Re: Add capability to play HTML5 native formats without bbcode

Post by shortmort37 »

stefd75 wrote:as i said before, the onlyone solution is to not encrypte .mp4 as actual physical name.. because these cheet of safari and ios don't want to read.

We must develop a module to upload mp4 like this : iduser_idunique_nameofvideo.mp4 and it will work.
D*mn! I think I finally understand what you are saying. In this snippet:

Code: Select all

<source src="../59test/download/file.php?id=7390" type="video/mp4">
iOS ignores type="video/mp4", and throws up its hands because the filename doesn't have an extension (.mp4) on it.

Jeebus, is that what this is all about. How is that HTML5 compliant?! :twisted:
User avatar
stefd75
Registered User
Posts: 10
Joined: Sat Feb 20, 2016 1:39 pm

Re: Add capability to play HTML5 native formats without bbcode

Post by stefd75 »

yes it's that

to use all browsers IOS anD SAFARI included

we must have this code

Code: Select all

<video src="./files/{_file.P_FNAME}" width="75%" height="75%" controls preload type="{_file.MIMETYPE}">
  </video>
AND this code

Code: Select all

<script src="//api.html5media.info/1.1.8/html5media.min.js"></script>
AND upload videos WITHOUT renaming them like this : "fegrhrgffffffddrgrtghbhytbn" but like this "iduser_idunique_nameofvideo.mp4"

so we need a mod.
User avatar
Leinad4Mind
Translator
Posts: 863
Joined: Sun Jun 01, 2008 11:08 pm
Contact:

Re: Add capability to play HTML5 native formats without bbcode

Post by Leinad4Mind »

The big problem to some, NOT ALL, apple products (ipad, iphone, mac, therefore "apple"), to fail on reproduce this content, is because phpbb encrypt their attachments. So when I give an encrypted video to html5, even if with extension, "apple" isn't able to reproduce it.
So, in my opinion, the problem is not the no existence of .mp4 extension.
I've done a test: upload a video, go to files folder and renamed to .mp4 and try to open it again on html, and it corrupt the video, I couldnt open it in any browser.

Resuming, "apple" will fail at decrypt videos attached. JUST THAT. It's not the name of the file, I'm preety sure now. In my case, my MAC can deal with encrypted video, so, you guys with bad "apples" needs to test my webste below.

Check this and tell me which doesnt work, i'm almost finding the cure: link removed

AND PLEASE, wait 1 minute at least, since there are many videos, it will take a while till the button should work!
Last edited by Leinad4Mind on Tue Mar 01, 2016 9:20 pm, edited 1 time in total.
Want to access all my portuguese MOD and Extension translations?
Become my Patreon!
phpBB Portugal Translator and Moderator
User avatar
shortmort37
Registered User
Posts: 656
Joined: Sat Aug 26, 2006 8:40 pm
Location: Upper Darby, PA, USA
Name: Dan Morton
Contact:

Re: Add capability to play HTML5 native formats without bbcode

Post by shortmort37 »

Leinad4Mind wrote:The big problem to some, NOT ALL, apple products (ipad, iphone, mac, therefore "apple"), to fail on reproduce this content, is because phpbb encrypt their attachments.
I think you are confusing phpBB's hash of the filename, with encryption of file contents.

It's very possible for you and I to upload attachments with the same name. To prevent your upload from overwriting mine, phpBB adopted a hash algorithm that uniquely distinguishes your file from mine, while preserving the filename in the database. The contents of the file, however, remain unchanged.

To prove this, I started with "a.mp4". I then uploaded to my phpBB board, searched for the hashed name based on the real filename, and copied off that file from the /files directory. I renamed this file "b.mp4". I then create a third file by copying "a.mp4" to "c". I display these three files in:

http://www.59plymouth.net/phpBB/new_test.html

No signs of phpBB, anywhere.

a, b and c all play in Chrome on Windows.

Only a and b play in Chrome on iOS.

If what you were saying is true, then b would not play on iOS, but it does. However, when the .mp4 extension is dropped (from "c"), we're dead in the water.

Hats off to stefd75 for getting to the root of the problem - iOS is looking for that bloody extension, despite being informed by the "type" tag just what kind of file it is.

I wonder, though, if there isn't a way yet to tell it to pay attention. There's a "media" attribute for <source>, and the Safari Developer's Library has all kinds of hacks...

I don't care what the fix is, as long as someone can drag and drop a file to their post, and have it play without having to muck with bbcode. Has to be a way...
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: Add capability to play HTML5 native formats without bbcode

Post by 3Di »

🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
shortmort37
Registered User
Posts: 656
Joined: Sat Aug 26, 2006 8:40 pm
Location: Upper Darby, PA, USA
Name: Dan Morton
Contact:

Re: Add capability to play HTML5 native formats without bbcode

Post by shortmort37 »

Thank you! I'll check it out.

Dan
User avatar
Leinad4Mind
Translator
Posts: 863
Joined: Sun Jun 01, 2008 11:08 pm
Contact:

Re: Add capability to play HTML5 native formats without bbcode

Post by Leinad4Mind »

I'm not confusing hash with encryption.

because I've upload an attachmend a.mp4, then I check the hashcode, I check on ftp the file, I download the file, I tried to open it with my MPC player, and it doesnt open. I change to b.mp4 and doesn't open. Its not a video anymore. I've then reupload to file folder.
And the results on Chrome Windows: the file with hashcode worked, but the one as b.mp4 doesn't!
So explain me why this results? Why can't I open a video on my computer after download it from ftp file folder?

So, could you please tell me, on my page, what works, and what doesnt? Thank you!
Want to access all my portuguese MOD and Extension translations?
Become my Patreon!
phpBB Portugal Translator and Moderator
User avatar
shortmort37
Registered User
Posts: 656
Joined: Sat Aug 26, 2006 8:40 pm
Location: Upper Darby, PA, USA
Name: Dan Morton
Contact:

Re: Add capability to play HTML5 native formats without bbcode

Post by shortmort37 »

Leinad4Mind wrote:I'm not confusing hash with encryption.

because I've upload an attachmend a.mp4, then I check the hashcode, I check on ftp the file, I download the file, I tried to open it with my MPC player, and it doesnt open. I change to b.mp4 and doesn't open. Its not a video anymore. I've then reupload to file folder.
And the results on Chrome Windows: the file with hashcode worked, but the one as b.mp4 doesn't!
So explain me why this results? Why can't I open a video on my computer after download it from ftp file folder?

So, could you please tell me, on my page, what works, and what doesnt? Thank you!
I don't know about your website. But, if you are using ftp and the file does not have an extension, ftp could very well be confused about whether to transfer it in binary mode (correct) or ascii mode (incorrect, and will corrupt the file). I'd try tagging the file with a binary extension, and removing it after the ftp - or, forcing your ftp program to transfer in binary mode.
User avatar
Leinad4Mind
Translator
Posts: 863
Joined: Sun Jun 01, 2008 11:08 pm
Contact:

Re: Add capability to play HTML5 native formats without bbcode

Post by Leinad4Mind »

I've download it as binary ofc. But the problem occurs. Thats why I tought the file must be encrypted.

EDIT: Ok, I've used another software and you're right, it's not encrypted.

Well, the solution will be just to save the attachment with the real filename. But that solution can bring problems when people upload videos with the same name. So, I don't see any good solution here.

In my case, and on my mac I got it working. So... I'll quit this task, since I can't reproduce the problem on my own.
Want to access all my portuguese MOD and Extension translations?
Become my Patreon!
phpBB Portugal Translator and Moderator
User avatar
stefd75
Registered User
Posts: 10
Joined: Sat Feb 20, 2016 1:39 pm

Re: Add capability to play HTML5 native formats without bbcode

Post by stefd75 »

Leinad4Mind wrote: Well, the solution will be just to save the attachment with the real filename. But that solution can bring problems when people upload videos with the same name. So, I don't see any good solution here.
:D that's what i say since friday with my bad english

with my solution, impossible to have double item

iduser_idpost_namewithextension

it's impossible to have the same name in the same post
User avatar
shortmort37
Registered User
Posts: 656
Joined: Sat Aug 26, 2006 8:40 pm
Location: Upper Darby, PA, USA
Name: Dan Morton
Contact:

Re: Add capability to play HTML5 native formats without bbcode

Post by shortmort37 »

Has this been addressed elsewhere within the phpBB community? It seems to me a real deficit that, because of Apple's dependency on the file extension instead of the "type" attribute, phpBB for mobile is compromised as a result.

Some of you may remember the days when phpBB attachments themselves were a mod, developed by Acyd Burn. That mod precedes the days of hashing the filename, and many of those old filenames still persist in our databases. So, I think the real hack here would be to leave the database structure alone, but:

1) For new attachments: After hashing the filename, parse the extension of the original, append to the hash, and store both the file and the database "physical_filename" with that filename.

2) For already uploaded attachments: Write a script that will go into the database, and where the "physical_filename" lacks an extension (because it's been hashed), both update "physical_filename" with the extension and rename the file in <root>/files.

An exercise left for the interested student.

I wonder if this is being brought up in the Apple community?

Dan
Post Reply

Return to “Extension Requests”