DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:video

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:video [2009-07-15 01:45] – correct link to download ChrisSplugin:video [2022-01-13 01:28] (current) Klap-in
Line 10: Line 10:
 depends    :  depends    : 
 conflicts  conflicts 
-similar    : flowplay, youtube, youtubev2, google_video, flashplayer +similar    : flowplay, youtube, flashplayer 
-tags       : video, embed+tags       : !obsolete, media, video, music, flash, embed
 ---- ----
 +
 +See for recent info [[:video|Video]]
  
 ====Background==== ====Background====
Line 21: Line 23:
  
 I borrowed the syntax and some code from [[plugin:iframe|the iframe plugin]]. I borrowed the syntax and some code from [[plugin:iframe|the iframe plugin]].
- 
- 
 ====Syntax==== ====Syntax====
  
 <code> <code>
-{{video>http://www.yourpage.com/yourmovie.avi [width,height]|Alternate text}}+{{video>http://www.yourpage.com/yourmovie.avi|Alternate text}}
 </code> </code>
 +
 +Replace the word 'video' at the beginning with the appropriate word, depending on the format of the media you want to display, ie:\\
 +video for .AVI\\ 
 +flash for .swf\\
 +movie for .mov\\
 +mp3 for .mp3\\
 +mpeg for .mpeg\\
 +realvideo for .ram\\
 +midi for .midi\\
 +
  
 The alternate text is very important because if the browser does not support the embedded video it will show the alt text as a link to the video URL so that they can download it. The alternate text is very important because if the browser does not support the embedded video it will show the alt text as a link to the video URL so that they can download it.
 +
 +To specify the height and width of the movie, you will need to apply the fix listed below in the discussion for 2010.4.10.
 +
  
 ====Code==== ====Code====
Line 134: Line 147:
   * When the browser cannot display the video, it shows alternate text that links to download the video instead.  Beside that it displays an icon.  Place the icon you want to use for this at lib/images/fileicons/avi.png .  You can [[http://wiki.evware.com/lib/images/fileicons/avi.png|download one here]] if you don't have another one to use.   * When the browser cannot display the video, it shows alternate text that links to download the video instead.  Beside that it displays an icon.  Place the icon you want to use for this at lib/images/fileicons/avi.png .  You can [[http://wiki.evware.com/lib/images/fileicons/avi.png|download one here]] if you don't have another one to use.
  
-    * The plugin (including tweaks from Chris Smith) can be downloaded in either [[http://www.cdsmith.plus.com/dokuwiki/plugin-video.zip|zip (2K)]] or in [[http://www.cdsmith.plus.com/dokuwiki/plugin-video.tar.gz|tar.gz (2K)]] formats.+    * The plugin (including tweaks from Chris Smith) can be downloaded in either [[http://dokuwiki.jalakai.co.uk/plugin-video.zip|zip (2K)]] or in [[http://dokuwiki.jalakai.co.uk/plugin-video.tar.gz|tar.gz (2K)]] formats.
  
 ====Release Notes=== ====Release Notes===
Line 145: Line 158:
  
 I thought about tweaking the script where you can upload images and allow you to upload the video and pick it from that window menu... but then I decided that required far too much thought.  But I do think it would be cool for the videos to be uploaded through DokuWiki and be in the media menu. I thought about tweaking the script where you can upload images and allow you to upload the video and pick it from that window menu... but then I decided that required far too much thought.  But I do think it would be cool for the videos to be uploaded through DokuWiki and be in the media menu.
-> Add the file extension for the video files to ''conf/mine.conf'' (for more details see [[config:mime]]). You can also add/reuse an icon in ''lib/images/filetypes'' (of the form ''ext.png'') for an icon to be displayed to the left of the link when the link to the file is displayed. --- //[[chris@jalakai.co.uk|Christopher Smith]] 2005-10-19 01:21//+> Add the file extension for the video files to ''conf/mine.conf'' (for more details see [[:mime]]). You can also add/reuse an icon in ''lib/images/filetypes'' (of the form ''ext.png'') for an icon to be displayed to the left of the link when the link to the file is displayed. --- //[[chris@jalakai.co.uk|Christopher Smith]] 2005-10-19 01:21//
  
  
Line 153: Line 166:
  
 The plugin works well for avi, wmv files. Thanks. The plugin works well for avi, wmv files. Thanks.
-It will be good if there is a plugin for quicktime movies. Thanks in advance.+It will be good if there is a plugin for QuickTime movies. Thanks in advance.
  
-See below extended version of plugin, which supports, QuicktimeMpeg & Flash. --- //[[chris@jalakai.co.uk|Christopher Smith]] 2005-10-23 19:00//+See below extended version of plugin, which supports, QuickTimeMPEG, and Flash. --- //[[chris@jalakai.co.uk|Christopher Smith]] 2005-10-23 19:00//
  
 <code php> <code php>
Line 342: Line 355:
  
 >> The directory needs to be called ''video'' The file to paste the code into is called ''syntax.php''. You will probably need to add the file types to DokuWiki's ''conf/mime.conf'' file. --- //[[chris@jalakai.co.uk|Christopher Smith]] 2006-03-29 16:36// >> The directory needs to be called ''video'' The file to paste the code into is called ''syntax.php''. You will probably need to add the file types to DokuWiki's ''conf/mime.conf'' file. --- //[[chris@jalakai.co.uk|Christopher Smith]] 2006-03-29 16:36//
->>>thank you Christopher, I changed the setup as you described, I also chmod the new dir to 755 and added the mime for .mov files. but when I try to call the "info" box in the plugin manager I get a blank page. and until I deleted this dir and the new syntex.php file in it, all my wiki pages were rendered blank.+>>>thank you Christopher, I changed the setup as you described, I also chmod the new dir to 755 and added the mime for .mov files. but when I try to call the "info" box in the plugin manager I get a blank page. and until I deleted this dir and the new syntax.php file in it, all my wiki pages were rendered blank.
 >>>> I'm not sure what the problem could be. Using the code I posted above, I have created plugin manager compatible files for automated installation.  They are available [[http://dokuwiki.jalakai.co.uk/index.html#video|here]]. --- //[[chris@jalakai.co.uk|Christopher Smith]] 2006-03-30 01:59// >>>> I'm not sure what the problem could be. Using the code I posted above, I have created plugin manager compatible files for automated installation.  They are available [[http://dokuwiki.jalakai.co.uk/index.html#video|here]]. --- //[[chris@jalakai.co.uk|Christopher Smith]] 2006-03-30 01:59//
 >>>>>thank you, I use the sidebar plugin and it is great. for now I can't load plugins using the plugin manager, I get an error without explanation and I chmod my lib\plugin folder to 775. I will try this latter. >>>>>thank you, I use the sidebar plugin and it is great. for now I can't load plugins using the plugin manager, I get an error without explanation and I chmod my lib\plugin folder to 775. I will try this latter.
Line 348: Line 361:
 Does this plugin work with the new version (2006-03-09) of DokuWiki? --- //Sergei 2006-04-05 9:58// Does this plugin work with the new version (2006-03-09) of DokuWiki? --- //Sergei 2006-04-05 9:58//
 >Nevermind, it does... I couldn't get it to work because I was using {{video>... when I should've used {{movie>... --- //Sergei 2006-04-05 10:15// >Nevermind, it does... I couldn't get it to work because I was using {{video>... when I should've used {{movie>... --- //Sergei 2006-04-05 10:15//
->>yes, thank you, the code in the syntax section above is misleading , it should be {{movie> and not {{video> . (for quicktime) consider adding a note, the correct syntax for each filetype is listed in the code section.//yair 2006-04-20 9:00//+>>yes, thank you, the code in the syntax section above is misleading , it should be {{movie> and not {{video> . (for QuickTime) consider adding a note, the correct syntax for each filetype is listed in the code section.//yair 2006-04-20 9:00//
  
 **Bug with feed.php?**\\ **Bug with feed.php?**\\
Line 400: Line 413:
  
 ---- ----
-2009.07.13 - Is it possible to render a video uploaded in the Upload File option of doku wiki. For example to use some line like: +2009.07.13 - Is it possible to render a video uploaded in the Upload File option of DokuWiki. For example to use some line like: 
 <code>{{video>:wiki:movie.avi}} </code> <code>{{video>:wiki:movie.avi}} </code>
 Robert Robert
 +>It doesn't work for me, but I'd really like it if someone could explain how to achieve this
 +
 +-----
 +2010.04.10\\
 +The syntax 
 +<code>{{flash>http://www.yoursite.com/yourflash.swf 640,480|Alternate text}}
 +</code>
 +
 +Does not work, as the preg_match syntax doesn't parse it correctly. Replacing the line 126 (within the function $handle):
 +
 +<code>      if (preg_match('/(.*)\[(.*)\]$/',trim($url),$matches=array())) {
 +</code>
 +
 +with this
 +
 +<code>      if (preg_match('/(.*) ([0-9]+,[0-9]+)$/',trim($url),$matches)) {
 +</code>
 +
 +fixes it, and allows you to specify width and height, provided you specify both. ie:
 +
 +both:
 +
 +<code>{{flash>http://www.yoursite.com/yourflash.swf 400,300|Alternate text}}
 +</code>
 +
 +and:
 +
 +<code>{{flash>http://www.yoursite.com/yourflash.swf|Alternate text}}
 +</code>
 +
 +will work. The latter will use the default sizes 640x480.
 +
 +- Noel
plugin/video.1247615145.txt.gz · Last modified: 2009-07-15 01:45 by ChrisS

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki