[pmwiki-users] to embed or not to embed

Christopher Cox ccox at endlessnow.com
Sun May 7 21:34:05 CDT 2017


Replied to wrong thread earlier, but I was able to do some more experimentation 
(not using ape)

If your pub/css/local.css has:

.video-container {
         position:relative;
         padding-bottom:56.25%;
         padding-top:30px;
         height:0;
         overflow:hidden;
}

.video-container iframe, .video-container object, .video-container embed {
         position:absolute;
         top:0;
         left:0;
         width:100%;
         height:100%;
}

Then, on a page you can use:

 >>video-container<<
(:includeSite {$PageUrl}?action=download&upname=test.mp4 width=100% border=0:)
 >><<

That url for the iframe could be youtube or whatever, I used a local site 
example.  Assumes the video is 16:9 aspect ratio.  You could create multiple css 
class containers and have one for 4:3.


On 05/07/2017 04:24 PM, Petko Yotov wrote:
> Embedding locally attached videos is not supported: I haven't found the time to
> make it work consistently across different browsers.
>
> If you want to enable it, you could alter the installation code to this:
>
>
>   if($action=="browse" || $_REQUEST['preview']) { # existing line
>
>     # new 2 lines
>     $HTMLFooterFmt['ape-local'] = '<script type="text/javascript">
>     var uAPErx = [ [/^(.*\.(mp4|mkv|avi|mp3|ogg|flac))$/i, "$1"] ];</script>';
>
>     # existing lines
>     $HTMLFooterFmt['ape'] = '<script type="text/javascript"
>       src="$FarmPubDirUrl/ape/ape.js"></script>';
>   }
>
>
> The line with 'ape-local' and the next line were inserted, and allow you to let
> the browser try to embed mp4|mkv|avi|mp3|ogg|flac files.
>
> Note, this is something that I cannot support if it doesn't work in some way.
> Some day, if I find some free time, I may to work on it. For the moment,
> consider uploading your videos to a supported platform.
>
> Petko
>
> ---
> Change log     :  http://www.pmwiki.org/wiki/PmWiki/ChangeLog
> Release notes  :  http://www.pmwiki.org/wiki/PmWiki/ReleaseNotes
> If you upgrade :  http://www.pmwiki.org/wiki/PmWiki/Upgrades
>
>
> On 2017-05-07 19:11, Roberto De Renzi wrote:
>>   I have embedded two videos in my pmwiki with your ape recipe, one is
>> from youtube and it is really embedded.  See
>>
>> https://youtu.be/S4iSqS1rEX8
>>
>> The second is an Attach:myfile.mp4 and it only shows a link to the file. See
>>
>> http://www.fis.unipr.it/~derenzi/dispense/pmwiki.php?n=Onde.Cinematica
>>
>> If I click on the link, instead of embedding the video, it gets loaded
>> in a fresh browser page.
>>
>> Can you please tell me where I am going wrong?
>>
>> Grazie  Roberto
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>




More information about the pmwiki-users mailing list