CLASS="sect1" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" >

5.2. Build HTML pages that use the plugin

Here are a few examples of HTML pages that use the Mozilla plugin .

5.2.1. Example 1

In this example, the plugin will read an HTTP stream inside the web page. If the user goes fullscreen, he will have to press f to go back in normal view .


<html>
<head><title>Demo of VLC mozilla plugin</title></head>

<body>

<h1>Demo of VLC mozilla plugin - Example 1</h1>

<embed type="application/x-vlc-plugin"
         name="video1"
         autoplay="no" loop="yes" width="400" height="300"
         target="http://server.example.org/video1.vob" />
<br />
  <a href="javascript:;" onclick='document.video1.play()'>Play video1</a>
  <a href="javascript:;" onclick='document.video1.pause()'>Pause video1</a>
  <a href="javascript:;" onclick='document.video1.stop()'>Stop video1</a>
  <a href="javascript:;" onclick='document.video1.fullscreen()'>Fullscreen</a>

</body>
</html>

5.2.2. Example 2

In this example, the plugin will read a multicast UDP stream in a dedicated video output window .


<html>
<head><title>Demo of VLC mozilla plugin</title></head>

<body>

<h1>Demo of VLC mozilla plugin - Example 2</h1>

<embed type="application/x-vlc-plugin"
         name="video2"
         autoplay="no" loop="no" hidden="yes"
         target="udp:@239.255.12.42" />
<br />
  <a href="javascript:;" onclick='document.video2.play()'>Play video2</a>
  <a href="javascript:;" onclick='document.video2.stop()'>Stop video2</a>
  <a href="javascript:;" onclick='document.video2.fullscreen()'>Fullscreen</a>

</body>
</html>