You are here: Foswiki>Tasks Web>Item13923 (01 Dec 2016, MichaelDaum)Edit Attach

Item13923: MediaElementPlugin incorrect remote url matching

pencil
Priority: Normal
Current State: Closed
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: MediaElementPlugin
Branches:
Reported By: UlrichLeodolter
Waiting For:
Last Change By: MichaelDaum
MediaElementPlugin does not match https?:// url. The following patch fixed that issue for me.

*** MediaElementPlugin/Core.pm.orig   2014-12-15 14:50:52.000000000 +0100
--- MediaElementPlugin/Core.pm   2016-01-14 14:12:35.223855298 +0100
***************
*** 58,64 ****
    my @videos = ();
    foreach my $file (split/\s*,\s*/, $video) {
      my $url;
!     if ($file =~ /^https?::/i) {
        $url = $file
      } else {
        $url = Foswiki::Func::getPubUrlPath() . '/' . $web . '/' . $topic . '/' . $file;
--- 58,64 ----
    my @videos = ();
    foreach my $file (split/\s*,\s*/, $video) {
      my $url;
!     if ($file =~ /^https?:/i) {
        $url = $file
      } else {
        $url = Foswiki::Func::getPubUrlPath() . '/' . $web . '/' . $topic . '/' . $file;

-- UlrichLeodolter - 14 Jan 2016

Thanks Ulrich, will add your patch to the next release.

-- MichaelDaum - 14 Jan 2016

Ok thanks, the above patch fixes only sub handleVIDEO, same applies to sub handleAUDIO.

-- UlrichLeodolter - 15 Jan 2016
 
Topic revision: r4 - 01 Dec 2016, MichaelDaum
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy