cc/td/doc/product/software/iptv30
hometocprevnextglossaryfeedbacksearchhelp

Table of Contents

Using IP/TV in a Web Browser

Using IP/TV in a Web Browser

IP/TV can be incorporated into a web browser as either a plugin or helper application. This chapter discusses how to create, customize, and run IP/TV as a plugin or as a helper application.

There are two ways to incorporate IP/TV into your Web environment, each requiring varying levels of customizing on your part. The two methods are as follows:

Using IP/TV as a Browser Plugin

The following sections describe how to launch, run, and customize an IP/TV program plugin, and how to access the IP/TV sample plugin.


Note To run a browser plugin, an IP/TV Content Manager must be running in your network. You need to have IP/TV Viewer installed on your system with plugins. Note also that the demo CD has an HTML page that you can load into your browser that works with the demo installation.

Launching the Plugin

To launch IP/TV Viewer as a plugin, open your browser and enter the plugin's URL. Ask your system administrator for the exact location and name of the browser plugin web page. For example, the URL http://<mywebserver>/yourplugin.htm will jump to the web page named yourplugin.htm, which is located on the web server named webserver.

Running the Plugin

After you launch the plugin, the browser web page with the embedded IP/TV plugin appears. Figure 12-1 shows a sample plugin with all the toolbar settings defined.

Figure 12-1 is an example of an on-demand program plugin window. A scheduled program plugin window has different VCR controls.


Figure 12-1: IP/TV as a Plugin---On-Demand Program


The VCR controls for an on-demand program include: Stop/Play, positioning buttons, Position Control slider, Mute button, and volume control. For a scheduled program, the VCR controls include: Stop/Play, Mute button, and volume control.

See the "Menu Bar and Tool Icon Reference" appendix in the IP/TV Viewer User Guide for a complete listing of plugin window toolbar buttons and icons.

Creating and Customizing the Plugin

To create an IP/TV plugin and customize the "look and feel" of the plugin's toolbar, use the EMBED tag or OBJECT ID tag on the plugin's HTML source page. Use the EMBED tag for either the Netscape Navigator or Internet Explorer browsers. Use the OBJECT ID tag for the Internet Explorer browser only. Note that the IP/TV plugin only supports scripting when the EMBED tag for Netscape Navigator is used. If you want to add scripting and are using Internet Explorer, then you must use the OBJECT ID tag.


Note You need to be familiar with HTML and JavaScript to script an IP/TV plugin.

Using the EMBED Tag

For Netscape Navigator or Internet Explorer, use the EMBED tag on the HTML source page of the plugin which lets you create and customize the look of the embedded IP/TV plugin window. Follow these steps:

Step 1 Open the Content Manager and click either OnDemand programs or Scheduled programs.

Step 2 Scroll to the desired program and click the Review link. The Review Program page appears.

Step 3 Scroll to the bottom of the page and click Load Plugin. A sample web page with the IP/TV plugin playing your selected program appears. This sample web page has all the default settings.

Step 4 If you like the way the web page looks, save it with an .htm extension and go to Step 6. If you do not like the way the web page looks, go to Step 5.

Step 5 To change the default settings, you need to access the program's .htm file in a text editor. To do this, click View Page>Source (for Netscape Navigator) or click View>Source (for Internet Explorer) to display the web page's .htm file.

Step 6 Change the default settings of the EMBED tag in the .htm file using the following parameters:

<EMBED TYPE="application/x-sdp"
SRC="path/file.sdp"
NAME=name
WIDTH=width
HEIGHT=height
[AUTOSTART= {TRUE | FALSE}]
[INVOKEURLS= {TRUE | FALSE}]
[SHOWTOOLBARS= {TRUE | FALSE}]
[SHOWPOSITIONTOOLBAR= {TRUE | FALSE}]
[SHOWVCRTOOLBAR= {TRUE | FALSE}]
[SHOWAUDIOTOOLBAR= {TRUE | FALSE}]
[SHOWSURFTOOLBAR= {TRUE | FALSE}]
[SHOWMISCTOOLBAR= {TRUE | FALSE}]
[SHOWDETACHTOOLBAR= {TRUE | FALSE}]
[SHOWSTATUSBAR= {TRUE | FALSE}]
[SHOWMINVIEW= {TRUE | FALSE}]>

Table 12-1 for a description of EMBED tag and OBJECT ID tag parameters section describes EMBED tag and OBJECT ID tag parameters.

Using the OBJECT ID Tag

For Internet Explorer use the OBJECT ID tag on the HTML source page of the plugin which lets you create and customize the look of the embedded IP/TV plugin. Follow these steps:

Step 1 Follow Steps 1 through 5 (and Step 6 if necessary) in the "Using the EMBED Tag" section earlier in this chapter.

Step 2 Change the default settings of the OBJECT ID tag in the .htm file using the following parameters:

<OBJECT ID="plugin_title"
WIDTH=width
HEIGHT=height
CLASSID= CLSID:364752D0-9065-11D2-8210-0060B0F139BD
[<PARAM Name="FILENAME"VALUE={"SDP FILENAME"}]
[<PARAM Name="AUTOSTART"VALUE={"TRUE | FALSE"}]
[<PARAM Name="INVOKEURLS"VALUE={"TRUE | FALSE"}]
[<PARAM Name="SHOWTOOLBAR"VALUE={"TRUE | FALSE"}]
[<PARAM Name="SHOWPOSITIONTOOLBAR"VALUE={"TRUE | FALSE"}]
[<PARAM Name="SHOWVCRTOOLBAR"VALUE={"TRUE | FALSE"}]
[<PARAM Name="SHOWAUDIOTOOLBAR"VALUE={"TRUE | FALSE"}]
[<PARAM Name="SHOWSURFTOOLBAR"VALUE={"TRUE | FALSE"}]
[<PARAM Name="SHOWMISCTOOLBAR"VALUE={"TRUE | FALSE"}]
[<PARAM Name="SHOWDETACHTOOLBAR"VALUE={"TRUE | FALSE"}]
[<PARAM Name="SHOWSTATUSBAR"VALUE={"TRUE | FALSE"}]
[<PARAM Name="SHOWMINVIEW"VALUE={"TRUE | FALSE"}]
</OBJECT>

EMBED Tag and OBJECT ID Tag Parameters

Table 12-1 describes all EMBED tag and OBJECT ID tag parameters.


Note Some parameters are specific only to the EMBED tag or the OBJECT ID tag.


Table 12-1: EMBED and OBJECT ID Tag Parameters
Parameter Values Description

TYPE

application/x-sdp

Specifies the MIME type of the EMBED and OBJECT ID tags and determines which plugin to load. This parameter is required for the EMBED tag and optional for the OBJECT ID tag.

SRC= 1

FILENAME= 2

path/file

Specifies the name of the .sdp file to be launched. If you specify a full path name, it must be enclosed in quotation marks. You can reference the program ID from the Content Manager. To reference an .sdp file directly from the Content Manager, enter the full path name. For example: "http://cm/cgi-bin/iptv/download.pl/progid.sdp". This parameter is required.

NAME= 1

plugin name

Indicates the plugin name in the EMBED tag.

OBJECT ID= 2

plugin name

Indicates the plugin name in the OBJECT ID tag.

CLASSID= 2

CiscoMedia.OCX ID

Identifies the object implementation. The CiscoMedia.OCX ID is:

CLSID:364752D0-9065-11D2-8210-0060B0F139BD

WIDTH=

width

The width in pixels from the left edge of the plugin window to the right edge of the plugin. This parameter is required.

HEIGHT=

height

The height in pixels from the top of the Viewer window to the bottom of the VCR controls. This parameter is required.

AUTOSTART

TRUE or FALSE

Specifies whether to start playing the clip automatically. TRUE (the default) causes the clip to automatically start. FALSE disables autostart and the clip does not start playing until you click the Play button. This parameter is optional.

INVOKEURLS

TRUE or FALSE

Specifies whether to invoke URLs in a browser that are contained in an .asf file. TRUE (default) enables URL flipping. FALSE disables URL flipping. This parameter is optional.

RESIZEVIDEO

TRUE or FALSE

Specifies video resizing. FALSE (default) centers the video in the plugin area. If the video is larger than the plugin area, the borders are clipped. True resizes the video to fit in the plugin area you specified in the EMBED or OBJECT ID commands. This parameter is optional.

SHOWAUDIOTOOLBAR

TRUE or FALSE

Displays/hides the Audio toolbar. TRUE (default) displays this toolbar. FALSE hides this toolbar.This parameter is optional.

SHOWDETACHTOOLBAR

TRUE or FALSE

Displays/hides this toolbar. FALSE (default) hides this toolbar. TRUE displays this toolbar. This parameter is optional.

SHOWMINVIEW

TRUE or FALSE

Specifies whether the plugin viewer window is displayed in minimal view. Minimal view displays only one toolbar including the Stop/Play, Mute, and Audio buttons. True displays only the minimal view and overrides the settings of all other property values. False (default) displays the normal view.

Note that if False is set the state of the status bar is solely dependent on the SHOWSTATUSBAR value. Other toolbars are shown or hidden depending on the relation between their property values and the SHOW TOOLBAR value. For example, if SHOWTOOLBAR=TRUE, and SHOWSURFTOOLBAR=FALSE, then the Surf toolbar is hidden. If SHOWTOOLBAR=FALSE, then none of the toolbars is shown.

SHOWMISCTOOLBAR

TRUE or FALSE

Displays/hides the Misc toolbar. False (default) hides the toolbar. True displays the toolbar. This toolbar contains web information, the Question Manager, copy image, and full screen buttons. This parameter is optional.

SHOWPOSITIONTOOLBAR

TRUE or FALSE

Displays/hides the Position toolbar. True (default) displays this toolbar. False hides this toolbar. This parameter is optional.

SHOWSURFTOOLBAR

TRUE or FALSE

Displays/hides the Change Program list. FALSE (default) hides this toolbar. TRUE displays this toolbar.This parameter is optional.

SHOWSTATUSBAR

TRUE or FALSE

Displays/hides the IP/TV plugin status bar. TRUE (default) displays the status bar. FALSE hides this status bar. This parameter is optional.

SHOWTOOLBAR

TRUE or FALSE

Displays/hides all toolbars. TRUE displays all toolbars. FALSE hides all toolbars. This parameter overrides the settings of all other toolbars parameter settings. This parameter is optional.

SHOWVCRTOOLBAR

TRUE or FALSE

Displays/hides the VCR toolbar. TRUE (default) displays this toolbar. FALSE hides this toolbar.This parameter is optional.

SURFOPTIONx 3

x, y.sdp

Add scheduled or on-demand program names to the Change Programs list box. the value x is each instance of an .sdp file. It can be 1, 2, 3 up to 32. The value y.sdp is the name of the .sdp file that contains the program name you want listed in the Change Programs list box. You can enter this option in the EMBED command up to 32 times. This parameter is optional.

1Used only in the EMBED tag.
2
Used only in the OBJECT ID tag.
3
Do not mix scheduled and on-demand programs in the SURF_OPTION list.

To prevent video from being clipped off, you need to consider the toolbar dimensions when designing the HTML source page for the plugin. The width and height in the EMBED or OBJECT ID tag refers to the size of window covering video and toolbars.

Toolbar dimension information is as follows:

For example, suppose the existing video size is 320 x 240 and the HTML page author chooses to show the Position toolbar, VCR toolbar, Audio toolbar, Misc toolbar, Surf toolbar, and status bar. The author needs to set the width of the plugin window to be the maximum of the video width, the sum of VCR toolbar and Audio toolbar width, and the sum of Misc toolbar and Surf toolbar width. The height of the plugin window needs to be set to be the sum of the video height, Position toolbar height, VCR toolbar height, Surf toolbar height and status bar height. In this case, the video size would be 320x348.

Playback Methods and Properties

IP/TV plugin supports several attributes that let you manipulate playback of content. These attributes include playback methods and seeking methods and properties. Playback methods for media content are: Play, Pause, and Stop. Seeking methods and properties are: MarkerName method, CurrentMarker property, Current Position, and MarkerCount property.

Table 12-2 lists and describes the methods and properties the IP/TV plugin supports.


Table 12-2: Playback Methods and Properties
Method or Property Syntax Description

Play method

plugin_name.Play

Starts playing a clip from the starting position or continues playing a paused clip. This method has no parameters.

Pause method

plugin_name.Pause

Suspends playback at the current position in the clip. This method performs the same action as clicking the VCR control Pause button. This method has no parameters and does not return a value.

Stop method

plugin_name.Stop

Stops playback of the current clip. This method has no parameters and does not return a value.

MarkerName method

plugin_name.
GetMarkerName
MarkerNum

Returns a string containing the name of the marker, given its marker number. MarkerNum is a long value specifying the number of the marker name to return.

CurrentMarker property

plugin_name.
SetCurrentMarker1

plugin_name.
CurrentMarker2

Sets a Long value indicating the current marker number. Before you attempt to set this property, determine whether a file has markers and their number by using MarkerCount. If a file has no markers, setting CurrentMarker to anything except 0 (zero) results in an error. Setting CurrentMarker to a number higher than MarkerCount also results in an error.

plugin_name.
GetCurrentMarker1

plugin_name.
CurrentMarker2

Returns a Long value indicating the current marker number. This property always returns the current or last marker, which means the actual file position can be either at the current marker or before the next marker. Markers are numbered beginning at 1, so if a file has markers, setting CurrentMarker to 0 (zero) to changes the file position to zero.

CurrentPosition property

plugin_name.
SetCurrentPosition1

plugin_name.
CurrentPosition2

Sets a Long value of the clip's current position in seconds.

plugin_name.
GetCurrentPosition1

plugin_name.
CurrentPosition2

Returns a Long value of the clip's current position in seconds.

MarkerCount property

plugin_name.
GetMarkerCount1

plugin_name.
MarkerCount2

Returns a Long value of number of markers in the current clip. This property returns zero if a file has no markers, or if the FileName property is not set. Marker numbers start at 1.

1This syntax is specific to the EMBED tag.
2
This syntax is specific to the OBJECT ID tag.

Example HTML Files Using EMBED and OBJECT Tags

The following example displays a program's customized .htm file using the EMBED tag.


Example 12-1: EMBED Tag Sample.htm File
<HTML>
<HEAD>
<TITLE>IP/TV Netscape-style Plugin: Cisco Systems, Inc.</TITLE>
</HEAD>
<BODY BGCOLOR="C0C0C0">
<CENTER>
<H2>
IP/TV Web Video
</H2>
<P>
<!-- modify the URL below to point to download.pl and your program
     where download.pl is in the [iptv-scripts] directory,
     eg. http://myhostname/cgi-bin/iptv  or http://myhostname/scripts  
     and yourfile is in the programs subdirectory
-->
<EMBED SRC="samplemarker.sdp" 
        NAME = IPTVPlugin
        WIDTH=420 
        HEIGHT=320 
        ShowMinView=true>
</EMBED>
<form>
<input  type=button
                onclick="document.IPTVPlugin.Play()"
                value=play>
<input  type=button
                onclick="document.IPTVPlugin.Stop()"
                value=stop>
<input  type=button
                onclick="document.IPTVPlugin.SetCurrentMarker(parseInt(form.editSeek.value))"
                value=seek>
<input  name=editSeek
                type=text
                value=1
                size=10>
<form>
</CENTER>

The following example displays a program's customized .htm file using the OBJECT ID tag.


Example 12-2: OBJECT ID Sample .htm File Tag
<OBJECT ID="IPTVPlayer" WIDTH=400 HEIGHT=400
 
 CLASSID="CLSID:364752D0-9065-11D2-8210-0060B0F139BD">
<PARAM Name="AutoStart" Value="true">
<PARAM Name="InvokeURLs" Value="false">
<PARAM NAME="FileName" Value="mpeg_vod.sdp">
<PARAM NAME="ShowToolbars" Value="true">
<PARAM NAME="ShowVCRToolbar" Value="true">
<PARAM NAME="ShowAudioToolbar" Value="true">
<PARAM NAME="ShowSurfToolbar" Value="true">
<PARAM NAME="ShowMiscToolbar" Value="true">
<PARAM NAME="ShowDetachToolbar" Value="true">
<PARAM NAME="ShowMinView" Value="false">
<PARAM NAME="InvokeURLs" Value="false">
<PARAM NAME="ResizeVideo" Value="false">
<PARAM NAME="ShowStatusBar" Value="true">
<PARAM NAME="SurfOption1" Value="concert_vod.sdp">   
<PARAM NAME="SurfOption32" Value="http://pub-pc/servlet/OdPublish?ProgID=907984166">  
</OBJECT>
<form>
<input  type=button
onclick="document.IPTVPlayer.Play()"
value=play> <input type=button onclick="document.IPTVPlayer.Stop()" value=stop> <input type=button onclick="document.IPTVPlayer.Pause()" value=pause> <input type=button onclick="document.IPTVPlayer.CurrentMarker=parseInt(form.editSeek.value)" value=seek> <input name=editSeek type=text value=0 size=10> <form> </CENTER>

Using the IP/TV Sample Plugin

If desired, you can use the sample plugin that comes with IP/TV which is useful if you want to launch and run IP/TV Viewer solely from a browser without any customization. To access the sample plugin, perform the following steps:

Step 1 Open your browser.

Step 2 In your browser enter the URL http://<mywebserver>/iptvfiles/iptv.htm,

where <mywebserver> is the name of your Content Manager.
The IP/TV plugin appears with the title IP/TV Web Video. All programs on the Content Manager are listed in the Change Program list.

Web Presenter IP/TV Plugin Example

This section provides an example of a Web Presenter program IP/TV plugin. Figure 12-2 shows a browser web page containing a plugin with three frames: Video frame, Table of Contents frame, and the Slide Presentation frame. The HTML source page for each frame is located in the following directory on the IP/TV 3.0 CD-ROM: \Samples\Plugins\Presenter\demo.htm.


Figure 12-2: Web Presenter IP/ TV Plugin Example


Using IP/TV Viewer as a Helper Application

You can set up IP/TV Viewer to be used as a helper application. The following sections describe how to launch, run, and customize the IP/TV helper application.


Note To create a helper application, an IP/TV Content Manager must be running in your network and IP/TV Viewer must be installed.

Launching the Helper Application

To launch IP/TV Viewer as a helper application, open your browser and go to the web page that contains the IP/TV Viewer helper application link. Ask your system administrator for the exact location and name of the web page that contains this link. Click the link to launch IP/TV Viewer.

Running the Helper Application

After launching the IP/TV helper application by clicking its web link, the IP/TV Viewer main window and then viewer window appear. The designated program begins to play in the viewer window. The program behaves exactly the same as when you launch IP/TV Viewer as a standard application.

See the "Menu Bar and Icon Reference" appendix in the IP/TV Viewer User Guide for a complete listing of viewer window toolbar buttons and icons.

Customizing the Helper Application Anchor and Link


Note We recommend that your system administrator perform the following steps to customize the helper application anchor and link that appear on the web page.

Step 1 Open the Content Manager and click either OnDemand programs or Scheduled programs.

Step 2 Scroll to the desired program and click the Review link. The Review Program page appears.

Step 3 Scroll to the bottom of the page and click Load Helper Application. A sample web page that contains the helper application anchor and link appears (see Figure 12-3).


Figure 12-3: Sample Web Page with Helper Application Link


Step 4 If you like the way the web page looks, save it with an .htm extension and go to Step 6. If you do not like the way the web page looks, go to Step 5.

Step 5 To change the default settings, you need to access the program's HTML web page in a text editor. To do this, click View>Source (for Netscape Navigator) or click View>Page Source (for Internet Explorer) to display the web page's .htm file.

You can make changes in this file or copy and paste the information into another .htm file.

Step 6 Change the following helper application anchor and link commands in the .htm file.

        <A HREF="path/file">
        Link </A>

Table 12-3 describes the helper application anchor and link parameters.


Table 12-3:
Helper Application Anchor and Link Parameters
Parameter Value Description

HREF=

path/file

Specifies the name of the .ipt file to be launched. If you specify a full path name, it must be enclosed in quotation marks. For example: "http://web-server/.../xxx.ipt".

Link=

message text

The text that appears as a link in the browser web page. When you click this link, the designated program is launched in a separate IP/TV plugin window.

The following sample .htm file contains the helper application anchor and link commands.


Example 12-3: Sample Helper Application .htm File
<HTML><HEAD>
<TITLE>IP/TV Web Video</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF">
<CENTER>
<H2>Yourcompany's IP/TV Web Video Page</H2>
<P>
<A HREF="http://mywebserver/iptv/download.pl/137475.ipt">Play IP/TV Viewer Now</A>
<P>To customize: view and save the HTML source for this page
</CENTER>
</BODY>
</HTML>

In this sample file, the .ipt file is named 137475.ipt and is located on the web server named mywebserver. The text message, Play IP/TV Viewer Now, is the link that appears on the browser page. When you click this link from within your browser, IP/TV Viewer is launched and displays a viewer window with the designated program playing in it.


hometocprevnextglossaryfeedbacksearchhelp
Posted: Thu Oct 28 16:02:26 PDT 1999
Copyright 1989-1999©Cisco Systems Inc.