]> git.mxchange.org Git - friendica.git/commitdiff
linkify audio/video links for non-html5 browsers (or those with unsupported codecs?)
authorFriendika <info@friendika.com>
Fri, 31 Dec 2010 02:43:42 +0000 (18:43 -0800)
committerFriendika <info@friendika.com>
Fri, 31 Dec 2010 02:43:42 +0000 (18:43 -0800)
include/bbcode.php

index 646401ddb5338153ff4b9bd3841898b8a319c9f6..ef31f5a6651c78975078b4efa6f1b7afc424d6e6 100644 (file)
@@ -80,9 +80,9 @@ function bbcode($Text) {
 
        // html5 video and audio
 
-       $Text = preg_replace("/\[video\](.+?)\[\/video\]/", '<video src="$1" controls="controls" width="425" height="350">$1</video>', $Text);
+       $Text = preg_replace("/\[video\](.+?)\[\/video\]/", '<video src="$1" controls="controls" width="425" height="350"><a href="$1">$1</a></video>', $Text);
 
-       $Text = preg_replace("/\[audio\](.+?)\[\/audio\]/", '<audio src="$1" controls="controls">$1</audio>', $Text);
+       $Text = preg_replace("/\[audio\](.+?)\[\/audio\]/", '<audio src="$1" controls="controls"><a href="$1">$1</a></audio>', $Text);
 
          
        // [img=widthxheight]image source[/img]