Embedding .avi in ​​JavaHelp?

I am creating some help content for an application (built on NetBeans) and thought that in some cases it would be useful to show the instructional video in JavaHelp or have a link to open the video.

I would suggest that it is possible to use the <OBJECT> , perhaps, but I do not know which object to embed. What I know little about JavaHelp, I got from http://download.java.net/javadesktop/javahelp/jhug.pdf , and from this I came to the conclusion that I should get a lightweight Java component capable of playing a.avi and insert it with the <OBJECT> . Rather, there is a link in the help that opens .avi in ​​a separate window.

Does anyone have directions on how to do this?

Edit:

I tried something else about adding a lightweight component, but without success. So I wonder if I put the component in the wrong place. If I try to add JButton to JavaHelp using

  <object classid="java:javax.swing.JButton"> </object> 

it renders in JavaHelp just fine.

if I try the button myself, for example

  <object classid="java:my.module.TestButton"> </object> 

I just get a couple of red "???"

The TestBytton class is just

 package my.module; import javax.swing.JButton; public class TestButton extends JButton{ } 

TestButton is in the same NetBeans project as javahelp-html, and the package that TestButton is part of is publicly available. Any ideas?

Edit2: Okay, so I studied this a little more. It seems that at the end the class com.sun.java.help.impl.CustomKit$CustomDocument will try to do

 getClass().getClassLoader().loadClass("my.module.TestButton") 

And this will throw a ClassNotFoundException. This can be, if I understood it correctly, because the class loader that will be used will only find classes that are in netbeans called JavaHelp Integration . And among them there is no my.module.TestButton . So ... I'm stuck again. I do not think that I can easily add anything to this module.

.

+8
java netbeans avi javahelp
source share
2 answers

I do not know how to embed video in JavaHelp. But you should be able to create a regular hyperlink to an HTML file that embeds the video (in some way) for use from an external browser. http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-javahelp/org/netbeans/api/javahelp/doc-files/api.html#external-links shows how to make links.

If you want this to work offline, include HTML in your NBM file set and use the nbinst URL protocol; for example, if in release/docs/helpvid.html in the sources (for an Ant-based NBM project), nbinst://my.module.code.name.base/docs/helpvid.html should refer to it in the application installation. As far as I know, the link handler of the JavaHelp module converts the URL into the equivalent file -protocol URL before passing it to the configured web browser (by default Desktop.browse on JDK 6 +).

+1
source share

I know this is not the answer, but often linking to some YouTube videos is enough. And you get high-quality videos without having to deploy them in the installer.

0
source share

All Articles