I wish I had that kind of skill. With some digging I may have figured it out. But what may take me a couple of days, others can do in 30 seconds. Had to call in the big guns (Gramziu) on that, over at Anami themes.shortmort37 wrote:You're a better programmer than I, Dr. Kroy! Don't know nothin' 'bout no stinkin' style templates...
Dan
Code: Select all
// HTML5 Streams
case ATTACHMENT_CATEGORY_HTML5:
$block_array += array(
'U_FORUM' => generate_board_url(),
'ATTACH_ID' => $attachment['attach_id'],
'P_FNAME' => $attachment['physical_filename'],
'S_HTML5_FILE' => true,
);
// Viewed/Heared File ... update the download count
$update_count[] = $attachment['attach_id'];
break;
Code: Select all
<!-- ELSEIF _file.S_HTML5_FILE -->
<!-- IF _file.MIMETYPE == 'audio/mp3' -->
<audio controls="true" name="media">
<source src="{_file.U_DOWNLOAD_LINK}" type="{_file.MIMETYPE}">
<source src="./files/{_file.P_FNAME}" type="{_file.MIMETYPE}">
</audio>
<!-- ELSE -->
<video controls width='80%' width='80%'>
<source src="{_file.U_DOWNLOAD_LINK}" type="{_file.MIMETYPE}">
<source src="./files/{_file.P_FNAME}" type="{_file.MIMETYPE}">
</video>
<!-- ENDIF -->
Hmmm... I was quite excited when I read your post. But I'm not finding it to work on Windows Safari, iOS Safari or iOS Chrome. It behaves as before. Might there have been other edits, than the ones you list below?Leinad4Mind wrote:I've solved the problem on iOS (Safari)![]()
I've tested on all browsers on windows, androind and MAC, and it seems to work.![]()
Use this code instead of yours:
This edit is to <yourboard>/styles/prosilver/template/attachment.html. Nice catch on controls="true" in the audio tag - the default is false, I missed it:Leinad4Mind wrote:Code: Select all
// HTML5 Streams case ATTACHMENT_CATEGORY_HTML5: $block_array += array( 'U_FORUM' => generate_board_url(), 'ATTACH_ID' => $attachment['attach_id'], 'P_FNAME' => $attachment['physical_filename'], 'S_HTML5_FILE' => true, ); // Viewed/Heared File ... update the download count $update_count[] = $attachment['attach_id']; break;
Let's get it to work, mate, and I'll gladly buy you that brewski!Leinad4Mind wrote:Try it out. You maybe need to give read permissions of /files/ folder. (or delete the htaccess)Code: Select all
<!-- ELSEIF _file.S_HTML5_FILE --> <!-- IF _file.MIMETYPE == 'audio/mp3' --> <audio controls="true" name="media"> <source src="{_file.U_DOWNLOAD_LINK}" type="{_file.MIMETYPE}"> <source src="./files/{_file.P_FNAME}" type="{_file.MIMETYPE}"> </audio> <!-- ELSE --> <video controls width='80%' width='80%'> <source src="{_file.U_DOWNLOAD_LINK}" type="{_file.MIMETYPE}"> <source src="./files/{_file.P_FNAME}" type="{_file.MIMETYPE}"> </video> <!-- ENDIF -->
Fell free to pay me a beer
You mean, this one?Leinad4Mind wrote:For test purposes remove the 1st source line and test it again.
Code: Select all
// HTML5 Streams
Code: Select all
<source src="./files/{_file.P_FNAME}" type="{_file.MIMETYPE}">
Code: Select all
<source src="{_file.U_DOWNLOAD_LINK}" type="{_file.MIMETYPE}">
I take it you mean El Capitan, a version of Mac OS X.Leinad4Mind wrote:Tell me which os version are you using, Captain or other?