Video stream java code

hey
i am trying to find how to obtian a video stream from a webcam using java code
if u can help me please.

ars_03 wrote:
i am trying to find how to obtian a video stream from a webcam using java code
if u can help me please.General questions usually stimulate general answers, such as "google it". If you truly want help, you will put more effort into your question such as answering these questions:
* What do you know already about doing this?
* What sources have you looked up and studied?
* Of this, what specifically do you not understand?
* What is the current state of your program?
* Is it running? compiling?
* Are there errors? if so, post them.
etc...
The bottom line here is usually the more thought and effort you put into creating your question, the better your chances are of a volunteer here taking the time and effort to consider it and give you a helpful answer. You would benefit greatly by reading this link (one I try to re-study at least every other week as it helps me):
[http://www.catb.org/~esr/faqs/smart-questions.html]

Similar Messages

  • Video Streaming: Error Code: ve_fms_connect_failed

    I'm trying to stream a video online (The Walking Dead from the AMC website, if that's of any use), but every time I attempt to watch it, I receive the following message:
    "This video stream is currently unavailable.
    Please try again later.
    Error Code:
    ve_fms_connect_failed"
    I did get the video to stream briefly, once for a few minutes, then again immediately after for about 15 minutes before I received the above message again.  This was right after I'd reinstalled Flash.  Also, my computer is a MacBook Pro with Retina Display purchased in August.
    Is anyone aware of this issue, or know of a solution?
    Thanks in advance!

    Maybe some help here.
    http://support.apple.com/kb/PH3855
    http://support.apple.com/kb/PH10742
    http://support.apple.com/kb/PH10920
    Hope you find some help:)

  • Java Video Streaming

    Hello
    I try to get an overview of what's possible according to video streaming in sun's wonderland. The goal is to stream prerecorded videos, stored on a webserver (not necessarily on the same machine like the wl-server ) into our wonderland embedded swing application.
    My first investigation shows me, that I have the following possibilities to stream videos in Java:
    - Java Media Framework (JMF)
    - JVLC (VideoLAN Java API)
    - Quicktime Streaming API (only quicktime movies)
    -> http://www.onjava.com/pub/a/onjava/2005/01/12/strmng_qtj.html
    - Red5 Java Client (only flash movies):
    -> http://www.actionscript.org/resources/articles/617/1/Streaming-and-database-connection-with-red5-media-server/Page1.html
    - Mplayer Java Client:
    -> http://beradrian.wordpress.com/2008/01/30/jmplayer/
    So what do you suggest me? What's the best way? Are there any code-examples for streaming videos from a webserver to a local java-client using JMF?
    Thanks for your help.
    Kind regards,
    Peter
    Edited by: blood_on_ice on Mar 23, 2009 12:44 AM

    Thanks for your answer...
    >
    The "best" way? Considering you're using a Swing application, your best bet is probably going to be JMF. JavaFX has support for playing videos, but I'm not sure if they have support for RTP streams or progressive downloads or anything.
    If you wanted to go the extra mile, you could look into embedding a Silverlight or Flash player into your Swing application. Silverlight is pretty cool because it's HD capable...>
    Yes I have to develop the video streaming in a swing non-top-level Swing JComponent (such as a JPanel) because this is a wonderland restriction...I don't know JavaFX yet, is it possible to build a JavaFX app inside such a non-top-level Swing component? Embedding silverlight in a java-app isn't a really good idea I think...
    Further recherches shows me, that I need on-demand video streaming with the ability to start, stop, play, pause etc. the video which is stored for example on a webserver. This is possible throught RTSP or HTTP according to: [http://www.remlab.net/op/vod.shtml|http://www.remlab.net/op/vod.shtml] ...when I use rtsp, I need a streaming-server like vlc, for http i just need my video stored on a webserver.
    So what do I have for possibilities to stream such a video in a java client (non-top-level Swing JComponent) with RTSP or HTTP?
    I've tried following rtp-code-example: [http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/AVReceive.html|http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/AVReceive.html]
    but it didn't work...I started my vlc-streaming server this way:
    cvlc -vvv movie.mpg --sout '#rtp{dst=192.168.1.33,port=1234,sdp=http://localhost:8080}'but the output of the rtp-code-example shows the following:
    run:
    - Open RTP session for: addr: 127.0.0.1 port: 8080 ttl: 1
      - Waiting for RTP data to arrive...
      - Waiting for RTP data to arrive...
      - Waiting for RTP data to arrive...
      - Waiting for RTP data to arrive...
      - Waiting for RTP data to arrive...
    With vlc http://127.0.0.1:8080 i receive the stream...
    But I couldn't find an example of how I can get an rtsp-stream or a http-stream in jmf...
    Thanks for your help.
    Kind regards,
    Peter
    Edited by: blood_on_ice on Mar 23, 2009 8:59 AM
    Edited by: blood_on_ice on Mar 23, 2009 9:00 AM

  • Finding a java video streaming player

    I recently use FreePastry to implement a p2p video streaming system.
    But now i have a new challege, which bother me several days.
    In Splitstream, which uses Byte[] to send the data to other peer.
    I want find a java video player. It would be best to receive Byte[] as input.
    I try JMF, but it use RTP as the input.
    Is there any other video players suited about my case.

    There is a function in LiveStream.java called read. Read passes in a buffer object. The goal is to write all of the data you have available into the buffer object.
    What you want to do is something along the lines of the following pseudocode...
    public void read(Buffer buffer) throws IOException {
        synchronized (this) {
            /* Get the data */
            byte[] data = FunctionThatGetsByteArrayFromTheNetwork();
            /* Write the data to the buffer object */
            buffer.setData(data);
    }As for using the PushBufferDataSource, you just create one like you would a normal class (just use the new operator) and give it to a processor or a player like you would a normal data source.
    You need to include the DataSource.java code like the example does, modify it to use your modified LiveStream.java (you'll probably change the names of classes, so update the DataSource.java class to reflect those changes) and then just use it to create your DataSource.
        /* From DataSource.java */
        DataSource ds = new DataSource();
        /* Normal way of doing this */
        Processor p = Manager.createProcessor(ds);

  • Can I use Streaming Video in Java Application?

    Will i be able to use Streaming Video in Java Application, if yes can anyhow out there pls teach me how to do it... thanks...

    read up on the Java Medai Framework http://java.sun.com/products/java-media/jmf/index.html

  • Storing that Video stream into our local disk in java

    Hi frendz,
    I want to know how to, Connect to a remote online webcam and store that Video stream into our local disk.
    Any java interface tools are there, or can we use java api to do so.
    Anybody Please share your valuable suggestions.
    thanx,
    [email protected]

    Hi frendz,
    I want to know how to, Connect to a remote online
    webcam and store that Video stream into our local
    disk. The jennicam is no longer online.

  • If any one has java code for any video compression algorithm

    i need a complete java code for video compression step by step

    i need a complete java code for video compression step by step

  • Blu-ray Error: "invalid operation", Code: "19", Note: "primary video stream attributes must be consi

    When i try make a blu Ray (folder or image) i receive this error "
    Blu-ray Object: "<Timeline>Untitled Timeline", Error: "invalid operation", Code: "19", Note: "primary video stream attributes must be consistent with playList"
    is a specific error for blu ray?
    Whats happen?.
    Thanks a lot
    If I create a dvd, all is right, no error are showed a dvd folder is created

    Hello:
    Finally I could make the Blu Ray disc.
    The problem was in put in the same timeline two files in mpg format and psd file with 6 seconds of duration.
    (no compatible timeline, causes error code 19)
    For  a right process a put each file in sperate timeline and end action link to the next file, Then, all go right an BR plays fine.
    Maybe there was somthing diferent inside each mpg file , incompatble for a same timeline.
    The mpg files were extratecd from dvd (vob files)
    I hope that my exprerince help in the future to others persons with the same problems
    Thanks all for support
    Regards

  • CTD bug in simple video streaming applet.

    I'm trying to write a simple applet to use JMF to allow an end-user to view a video stream that's being served up by VLC. It doesn't have to look immensely pretty (in fact, streamlined is what I want most). I swiped some code from the jicyshout project (http://jicyshout.sourceforge.net) which handles streaming MP3s, and borrowed a framework for an applet from one of Sun's example applets for the JMF.
    Here's my code so far:
    ** begin file SimpleVideoDataSource.java **
    import java.lang.String;
    import java.net.*;
    import java.io.*;
    import java.util.Properties;
    import javax.media.*;
    import javax.media.protocol.*;
    /* The SeekableStream and DataSource tweaks are based on the code from
    * jicyshout (jicyshout.sourcefourge.net), which was written by Chris Adamson.
    * The code was simplified (no need for mp3 metadata here), cleaned up, then
    * extended for our puposes.
    * This is a DataSource using a SeekableStream suitable for
    * streaming video using the default parser supplied by JMF.
    public class SimpleVideoDataSource extends PullDataSource {
    protected MediaLocator myML;
    protected SeekableInputStream[] seekStreams;
    protected URLConnection urlConnection;
    // Constructor (trivial).
    public SimpleVideoDataSource (MediaLocator ml) throws MalformedURLException {
    super ();
    myML = ml;
    URL url = ml.getURL();
    public void connect () throws IOException {
    try {
    URL url = myML.getURL();
    urlConnection = url.openConnection();
    // Make the stream seekable, so that the JMF parser can try to parse it (instead
    // of throwing up).
    InputStream videoStream = urlConnection.getInputStream();
    seekStreams = new SeekableInputStream[1];
    seekStreams[0] = new SeekableInputStream(videoStream);
    } catch (MalformedURLException murle) {
    throw new IOException ("Malformed URL: " + murle.getMessage());
    } catch (ArrayIndexOutOfBoundsException aioobe) {
    fatalError("Array Index OOB: " + aioobe);
    // Closes up InputStream.
    public void disconnect () {
    try {
    seekStreams[0].close();
    } catch (IOException ioe) {
    System.out.println ("Can't close stream. Ew?");
    ioe.printStackTrace();
    // Returns just what it says.
    public String getContentType () {
    return "video.mpeg";
    // Does nothing, since this is a stream pulled from PullSourceStream.
    public void start () {
    // Ditto.
    public void stop () {
    // Returns a one-member array with the SeekableInputStream.
    public PullSourceStream[] getStreams () {
    try {
    // **** This seems to be the problem. ****
    if (seekStreams != null) {
    return seekStreams;
    } else {
    fatalError("sourceStreams was null! Bad kitty!");
    return seekStreams;
    } catch (Exception e) {
    fatalError("Error in getStreams(): " + e);
    return seekStreams;
    // Duration abstract stuff. Since this is a theoretically endless stream...
    public Time getDuration () {
    return DataSource.DURATION_UNBOUNDED;
    // Controls abstract stuff. No controls supported here!
    public Object getControl (String controlName) {
    return null;
    public Object[] getControls () {
    return null;
    void fatalError (String deathKnell) {
    System.err.println(":[ Fatal Error ]: - " + deathKnell);
    throw new Error(deathKnell);
    ** end file SimpleVideoDataSource.java **
    ** begin file SeekableInputStream.java **
    import java.lang.String;
    import java.net.*;
    import java.io.*;
    import java.util.Properties;
    import javax.media.*;
    import javax.media.protocol.*;
    /* The SeekableStream and DataSource tweaks are based on the code from
    * jicyshout (jicyshout.sourcefourge.net), which was written by Chris Adamson.
    * The code was simplified (no need for mp3 metadata here), cleaned up, then
    * extended for our puposes.
    /* This is an implementation of a SeekableStream which extends a
    * BufferedInputStream to basically fake JMF into thinking that
    * the stream is seekable, when in fact it's not. Basically, this
    * will keep JMF from puking over something it expects but can't
    * actually get.
    public class SeekableInputStream extends BufferedInputStream implements PullSourceStream, Seekable {
    protected int tellPoint;
    public final static int MAX_MARK = 131072; // Give JMF 128k of data to "play" with.
    protected ContentDescriptor unknownCD;
    // Constructor. Effectively trivial.
    public SeekableInputStream (InputStream in) {
    super (in, MAX_MARK);
    tellPoint = 0;
    mark (MAX_MARK);
    unknownCD = new ContentDescriptor ("unknown");
    // Specified size constructor.
    public SeekableInputStream (InputStream in, int size) {
    super (in, Math.max(size, MAX_MARK));
    tellPoint = 0;
    mark(Math.max(size, MAX_MARK));
    unknownCD = new ContentDescriptor ("unknown");
    // Reads a byte and increments tellPoint.
    public int read () throws IOException {
    int readByte = super.read();
    tellPoint++;
    return readByte;
    // Reads bytes (specified by PullSourceStream).
    public int read (byte[] buf, int off, int len) throws IOException {
    int bytesRead = super.read (buf, off, len);
    tellPoint += bytesRead;
    return bytesRead;
    public int read (byte[] buf) throws IOException {
    int bytesRead = super.read (buf);
    tellPoint += bytesRead;
    return bytesRead;
    // Returns true if in.available() <= 0 (that is, if there are no bytes to
    // read without blocking or end-of-stream).
    public boolean willReadBlock () {
    try {
    return (in.available() <= 0);
    } catch (IOException ioe) {
    // Stick a fork in it...
    return true;
    // Resets the tellPoint to 0 (meaningless after you've read one buffer length).
    public void reset () throws IOException {
    super.reset();
    tellPoint = 0;
    // Skips bytes as expected.
    public long skip (long n) throws IOException {
    long skipped = super.skip(n);
    tellPoint += skipped;
    return skipped;
    // Trivial.
    public void mark (int readLimit) {
    super.mark (readLimit);
    // Returns the "unknown" ContentDescriptor.
    public ContentDescriptor getContentDescriptor () {
    return unknownCD;
    // Lengths? We don't need no stinkin' lengths!
    public long getContentLength () {
    return SourceStream.LENGTH_UNKNOWN;
    // Theoretically, this is always false.
    public boolean endOfStream () {
    return false;
    // We don't provide any controls, either.
    public Object getControl (String controlName) {
    return null;
    public Object[] getControls () {
    return null;
    // Not really... but...
    public boolean isRandomAccess () {
    return true;
    // This only works for the first bits of the stream, while JMF is attempting
    // to figure out what the stream is. If it tries to seek after that, bad
    // things are going to happen (invalid-mark exception).
    public long seek (long where) {
    try {
    reset();
    mark(MAX_MARK);
    skip(where);
    } catch (IOException ioe) {
    ioe.printStackTrace();
    return tell();
    // Tells where in the stream we are, adjusted for seeks, resets, skips, etc.
    public long tell () {
    return tellPoint;
    void fatalError (String deathKnell) {
    System.err.println(":[ Fatal Error ]: - " + deathKnell);
    throw new Error(deathKnell);
    ** end file SeekableInputStream.java **
    ** begin file StreamingViewerApplet.java **
    * This Java Applet will take a streaming video passed to it via the applet
    * command in the embedded object and attempt to play it. No fuss, no muss.
    * Based on the SimplePlayerApplet from Sun, and uses a modified version of
    * jicyshout's (jicyshout.sourceforge.net) tweaks to get JMF to play streams.
    * Use it like this:
    * <!-- Sample HTML
    * <APPLET CODE="StreamingViewerApplet.class" WIDTH="320" HEIGHT="240">
    * <PARAM NAME="code" VALUE="StreamingViewerApplet.class">
    * <PARAM NAME="type" VALUE="application/x-java-applet;version=1.1">
    * <PARAM NAME="streamwidth" VALUE="width (defaults to 320, but will resize as per video size)">
    * <PARAM NAME="streamheight" VALUE="height (defaults to 240, but will resize as per video size)">
    * <PARAM NAME="stream" VALUE="insert://your.stream.address.and:port/here/">
    * </APPLET>
    * -->
    import java.applet.Applet;
    import java.awt.*;
    import java.awt.event.*;
    import java.lang.String;
    import java.lang.ArrayIndexOutOfBoundsException;
    import java.net.URL;
    import java.net.MalformedURLException;
    import java.net.*;
    import java.io.*;
    import java.io.IOException;
    import java.util.Properties;
    import javax.media.*;
    import javax.media.protocol.*;
    public class StreamingViewerApplet extends Applet implements ControllerListener {
    Player player = null;
    Component visualComponent = null;
    SimpleVideoDataSource dataSource;
    URL url;
    MediaLocator ml;
    Panel panel = null;
    int width = 0;
    static int DEFAULT_VIDEO_WIDTH = 320;
    int height = 0;
    static int DEFAULT_VIDEO_HEIGHT = 240;
    String readParameter = null;
    // Initialize applet, read parameters, create media player.
    public void init () {
    try {
    setLayout(null);
    setBackground(Color.white);
    panel = new Panel();
    panel.setLayout(null);
    add(panel);
    // Attempt to read width from applet parameters. If not given, use default.
    if ((readParameter = getParameter("streamwidth")) == null) {
    width = DEFAULT_VIDEO_WIDTH;
    } else {
    width = Integer.parseInt(readParameter);
    // Ditto for height.
    if ((readParameter = getParameter("streamheight")) == null) {
    height = DEFAULT_VIDEO_HEIGHT;
    } else {
    height = Integer.parseInt(readParameter);
    panel.setBounds(0, 0, width, height);
    // Unfortunately, this we can't default.
    if ((readParameter = getParameter("stream")) == null) {
    fatalError("You must provide a stream parameter!");
    try {
    url = new URL(readParameter);
    ml = new MediaLocator(url);
    dataSource = new SimpleVideoDataSource(ml);
    } catch (MalformedURLException murle) {
    fatalError("Malformed URL Exception: " + murle);
    try {
    dataSource.connect();
    player = Manager.createPlayer(dataSource);
    } catch (IOException ioe) {
    fatalError("IO Exception: " + ioe);
    } catch (NoPlayerException npe) {
    fatalError("No Player Exception: " + npe);
    if (player != null) {
    player.addControllerListener(this);
    } else {
    fatalError("Failed to init() player!");
    } catch (Exception e) {
    fatalError("Error opening player. Details: " + e);
    // Start stream playback. This function is called the
    // first time that the applet runs, and every time the user
    // re-enters the page.
    public void start () {
    try {
    if (player != null) {
    player.realize();
    while (player.getState() != Controller.Realized) {
    Thread.sleep(100);
    // Crashes... here?
    player.start();
    } catch (Exception e) {
    fatalError("Exception thrown: " + e);
    public void stop () {
    if (player != null) {
    player.stop();
    player.deallocate();
    } else {
    fatalError("stop() called on a null player!");
    public void destroy () {
    // player.close();
    // This controllerUpdate function is defined to implement a ControllerListener
    // interface. It will be called whenever there is a media event.
    public synchronized void controllerUpdate(ControllerEvent event) {
    // If the player is dead, just leave.
    if (player == null)
    return;
    // When the player is Realized, get the visual component and add it to the Applet.
    if (event instanceof RealizeCompleteEvent) {
    if (visualComponent == null) {
    if ((visualComponent = player.getVisualComponent()) != null) {
    panel.add(visualComponent);
    Dimension videoSize = visualComponent.getPreferredSize();
    width = videoSize.width;
    height = videoSize.height;
    visualComponent.setBounds(0, 0, width, height);
    } else if (event instanceof CachingControlEvent) {
    // With streaming, this doesn't really matter much, does it?
    // Without, a progress bar of some sort would be appropriate.
    } else if (event instanceof EndOfMediaEvent) {
    // We should never see this... but...
    player.stop();
    fatalError("EndOfMediaEvent reached for streaming media. ewe ewe tea eff?");
    } else if (event instanceof ControllerErrorEvent) {
    player = null;
    fatalError(((ControllerErrorEvent)event).getMessage());
    } else if (event instanceof ControllerClosedEvent) {
    panel.removeAll();
    void fatalError (String deathKnell) {
    System.err.println(":[ Fatal Error ]: - " + deathKnell);
    throw new Error(deathKnell);
    ** end file StreamingViewerApplet.java **
    Now, I'm still new to the JMF, so this might be obvious to some of you... but it's exploding on me, and crashing to desktop (both in IE and Firefox) with some very fun errors:
    # An unexpected error has been detected by HotSpot Virtual Machine:
    # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x21217921, pid=3200, tid=3160
    # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode, sharing)
    # Problematic frame:
    # C 0x21217921
    --------------- T H R E A D ---------------
    Current thread (0x058f7280): JavaThread "JMF thread: com.sun.media.amovie.AMController@506411[ com.sun.media.amovie.AMController@506411 ] ( realizeThread)" [_thread_in_native, id=3160]
    siginfo: ExceptionCode=0xc0000005, writing address 0x034e6360
    (plenty more here, I can post the rest if necessary)
    The problem seems to be coming from the "return seekStreams" statement in the first file; when I have execution aborted before that (with a fatalError call), it doesn't crash.
    Any tips/hints/suggestions?

    You should write your own Applet, where you can easily get the visual component (getVisualComponent())and show it directly in your Applet (you call it "embedded"). As far as I know, all examples (AVReceive* etc.) use the component which opens a new window.
    Best regards from Germany,
    r.v.

  • Capturing Video stream with JMF under LINUX??

    Ok, i am confused! I have read lots of info over this subject, but at some sites and forums i read that some people did not succeed in capturing ( and displaying) a live video stream with Java under Linux.
    Is it possible? and if so, can someone give me a sample code or a link to a sample code? thankz a lot!!

    Cross-posted
    http://forum.java.sun.com/post.jsp?forum=54&thread=456420&message=2083138&reply=true

  • Playing video streaming

    I begin to implement a video chat in java. I used JMF for capturing video streaming from a digital camera and RTP protocol for transmiting the video stream. I want to play the stream into an Applet (so on the client side). I don't want to use jmf on client side (an RTP Applet Player or something like this) because this means that the client needs to instal the JMF package. I need a solution to play the stream stream into an applet but I want that the client don't need to instal any software. I can use anything on server side (from where I transmit)...Is this possible? Please help me. Thank you.

    I've only done some web cam capturing code, but I thought you only need the "performance pack" of JMF installed on a machine if you want to perform capturing.
    So, maybe you can still use JMF in an applet without a formal installation on the client pc.
    Just itry ncluding the jmf.jar and any CODEC class files necessary to replay your video stream ?
    It's worth a shot... although someone may very well correct me on this.
    regards,
    Owen

  • Capturing, timestamping and saving a video stream from a webcam ?

    Hello everybody,
    Glad to be in this forum.
    I got to do a program in java doing :
    - a capture of a video stream from a webcam
    - adding time and date on it
    - saving the video stream in a video format compatible with linux and windows
    Is it possible to do that in java (using JMF I guess) ?
    Could anyone help me to progress on my project ?
    thx a lot
    agussi

    Hi agussi, yes, it's possible to do that in Java using JMF.
    I'm not a JMF expert, but I've found this code very useful: http://forum.java.sun.com/thread.jspa?threadID=570463&tstart=50
    This piece of code shows the webcam stream and you can take snapshots with it. With a little tweak you can do what you are expecting.
    I hope this helps.
    Ivan

  • Multiplex audio and video streams

    I am stuck here,I want the audio and video streams obtained after processing by Codes to multiplex to AVI format. I found that this problem has already being posted but no reply. Kindly reply immediately as project is in last phase.

    I am programming the videoconference program using Java Media Framework API. I use two session to transmint and recieve the media, one for audio and one for video. Two players are opened to play both media. I would like to know if I can play both media using only one window.

  • SpryTabbedPanel: Flash player in tabs do not play video streams

    Note: I am a complete noob (no experience with Javascript and rudimentary experience with htlm/css). Please be patient (I hope that this is the correct forum for this) and know that I am appreciative of any help or solution that anyone can provide.
    Using Dreamweaver CS4 on Mac OS 10.5.8
    We recently switched all of our streaming servers from Windows Media (good riddance) to Flash Media Server 3.5 (now getting awesome H.264 quality in comparison).
    I was asked to re-design this webpage with the aim of re-organizing the content so that it is more accessible:
    http://www.librarymedia.net/VideoGallery.html
    We used Adobe's test page for our first page:
    http://www.librarymedia.net/flash/videoplayer.html?source=rtmp://63.116.232.4/live/livestr eam&type=live&idx=10
    This was meant as a temporary page to get us started, and as you can see, it needs work but at least it works.
    I've been working the the final version of this page. My boss wants a tabbed web page with links to our video streams (tab for each category of streams).
    This is what I have so far:
    http://www.librarymedia.net/Flash2/videoplayer2.html?source=rtmp://63.116.232.4/live/lives tream&type=live&idx=10
    I realize that I had several options before building this. One, I could have made a separate page for each tab and linked them with a tab menu. In hindsight, this might have been a better option since I could have just copied the working page that we already have for each tab. Or I could have done what I have tried to do: to use Dreamweaver's SpryTabbedPanel to make the tabs and insert a Flash player with links into each tab.
    The problem:
    1. The streams do not play. The player says "initializing" and then "please enter a stream name and play". Please note that I used SpryURLutils to get each link to open in the appropriate tab.
    2. After reading about the benefits of external vs. inline javascript, I took all of the inline javascript that was contained in Adobe's sample page and placed it in an external file. I tried placing the javascript back into the source code (inline), but this did not fix the problem. I guess there is a Javascript problem or I need extra Javascript code to get this to work.  The javascript code is below. Use view source in your web browser to see source code. Please let me know if I need to provide more information.
    Thanks.
    // (C) Copyright 2008 Adobe Systems Incorporated. All Rights Reserved.
    // NOTICE:  Adobe permits you to use, modify, and distribute this file in accordance with the terms of the Adobe license agreement accompanying it. 
    // If you have received this file from a source other than Adobe, then your use, modification, or distribution of it requires the prior
    // written permission of Adobe.
    // THIS CODE AND INFORMATION IS PROVIDED "AS-IS" WITHOUT WARRANTY OF
    // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
    // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
    // PARTICULAR PURPOSE.
    // THIS CODE IS NOT SUPPORTED BY Adobe Systems Incorporated.
    // Version check based upon the values defined in globals
                                                var hasRequestedVersion = DetectFlashVer(10, 0, 0);
                                                if(!hasRequestedVersion)
                                                    var div = document.getElementById("flashcontent");
                                                    div.innerHTML = '<a href="http://www.adobe.com/go/getflashplayer/" style="color:black"><img src="images/ERROR_getFlashPlayer.gif" width="641" height="377" /></a>';
                                                else{
                                                        AC_FL_RunContent(
                                                            "src", "swfs/videoPlayer",
                                                            "width", "640",
                                                            "height", "377",
                                                            "id", "videoPlayer",
                                                            "quality", "high",
                                                            "bgcolor", "#000000",
                                                            "name", "videoPlayer",
                                                            "allowfullscreen","true",
                                                            "type", "application/x-shockwave-flash",
                                                            "pluginspage", "http://www.adobe.com/go/getflashplayer",
                                                            "flashvars", flashVars
                                          // -->  
    // Javascript in original page
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    function changeImages() {
        if (document.images && (preloadFlag == true)) {
            for (var i=0; i<changeImages.arguments.length; i+=2) {
                document [changeImages.arguments[i]].src = changeImages.arguments[i+1];
    var preloadFlag = false;
    function preloadImages() {
        if (document.images) {
            navi_01_over = newImage("images/button_dynamic_up.gif");
            navi_02_over = newImage("images/button_samples_up.gif");
            navi_03_over = newImage("images/button_interactive.gif");
            preloadFlag = true;
    function changetab(obj, obj2, obj3, left1, left2, left3, nav1, nav2, nav3){
        document.getElementById(obj).style.display = 'block';
        document.getElementById(obj2).style.display = 'none';
        document.getElementById(obj3).style.display = 'none';
        document.getElementById(left1).style.display = 'block';
        document.getElementById(left2).style.display = 'none';
        document.getElementById(left3).style.display = 'none';
        document.getElementById(nav1).src = "images/" + nav1 + "_up.gif";
        document.getElementById(nav2).src = "images/" + nav2 + "_down.gif";
        document.getElementById(nav3).src = "images/" + nav3 + "_down.gif";
    function tabout(obj, nav){
        if (document.getElementById(obj).style.display == 'block'){
            document.getElementById(nav).src = "images/" + nav + "_up.gif";
        else{
            document.getElementById(nav).src = "images/" + nav + "_down.gif";
    function tabover(obj){
        document.getElementById(obj).src = "images/" + obj + "_up.gif";
    // Functionality
        <script language="javascript">
            var queryParameters = new Array();
            var flashVars = "";
            var tag = "";
            var url = "";
            window.onload = function ()
                for(var i=1 ; i<=10;i++)
                    var ids = String("sel"+i.toString());
                    document.getElementById( ids ).style.visibility = "hidden";
                    document.getElementById( ids ).className = "style76";
                // mark the entry for that index
                if(queryParameters['idx'] != "")
                    document.getElementById("td" + queryParameters['idx'] ).className = "style75";
                    document.getElementById("sel" + queryParameters['idx'] ).style.visibility = "visible";
            function initialise()
                function getUrlParam( name )
                      name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
                      var regexS = "[\\?&]"+name+"=([^&#]*)";
                      var regex = new RegExp( regexS );
                      var results = regex.exec( window.location.href );
                      if( results == null )
                            return "";
                      else
                            return unescape( results[1] );
                queryParameters['source'] = getUrlParam('source');
                queryParameters['type'] = getUrlParam('type');
                queryParameters['idx'] = getUrlParam('idx');
                   flashVars += "&videoWidth=";
                flashVars += 0;
                flashVars += "&videoHeight=";
                flashVars += 0;
                flashVars += "&dsControl=";
                flashVars += unescape("manual");
                flashVars += "&dsSensitivity=";
                flashVars += 100;
                flashVars += "&serverURL=";
                flashVars += queryParameters['source'];
                flashVars += "&DS_Status=";
                flashVars += "true";
                flashVars += "&streamType=";
                flashVars += queryParameters['type'];
                flashVars += "&autoStart=";
                flashVars += unescape("true");
                tag = "&lt;object width='640' height='377' id='videoPlayer' name='videoPlayer' type='application/x-shockwave-flash' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' &gt;&lt;param name='movie' value='swfs/videoPlayer.swf' /&gt; &lt;param name='quality' value='high' /&gt; &lt;param name='bgcolor' value='#000000' /&gt; &lt;param name='allowfullscreen' value='true' /&gt; &lt;param name='flashvars' value= '"+                   
                flashVars+"'/&gt;&lt;embed src='swfs/videoPlayer.swf' width='640' height='377' id='videoPlayer' quality='high' bgcolor='#000000' name='videoPlayer' allowfullscreen='true' pluginspage='http://www.adobe.com/go/getflashplayer'   flashvars='"+ flashVars +"' type='application/x-shockwave-flash'&gt; &lt;/embed&gt;&lt;/object&gt;";
            function playStream()
                var url = "source=" + document.getElementById('inputURL').value;
                var type;
                if(document.getElementById('vodCheckbox').checked==true)
                    type="vod";
                else
                    type="live";
                url += ("&type=" + type);
                document.getElementById('playBtn').href="videoplayer.html?" + url;
            function checkbox(type)
                if(type=="vod")
                    if(document.getElementById('liveCheckbox').checked==true)
                        document.getElementById('liveCheckbox').checked=false;
                if(type=="live")
                    if(document.getElementById('vodCheckbox').checked==true)
                        document.getElementById('vodCheckbox').checked=false;
            initialise();

    Should I have posted this in the Spry forum instead? My apologies if this is the wrong forum.
    >There is a sample application of the code included with the zip file  which shows how to implement it.
    The sample doesn't really tell me what I need to do to the code to make it work (I do not know javascript), and unfortunately, I have not found any helpful instructions/documentation online. You've given me the answer, I just don't know enough to implement it. This is what I've done:
    1. Placed the FAVideo.js file in my site folder and linked it to the page: <script src="FAVideo.js" type="text/javascript"></script>
    2. I added the following code (taken from the SimpleDemo.html example inside the FAVideo folder). My comments in bold. Page at
    http://www.librarymedia.net/Flash2/videoplayer2.html?source=rtmp://63.116.232.6/vod/mp4:Ol ympics2010_640x480.mov
             <! To the <body> section:-->
    <body onLoad="">
        <div id="divOne"></div>
    <!-Do I have to place the entire page within the "divOne" div (or just the section containing the tabs) in order for the javascript to work?-->
             <!-In the <head> section: -->
       <script type="text/javascript">
            playerOne = new FAVideo("divOne", "TabbedPanels1", "demo_video.flv",0,0,{ autoLoad:true, autoPlay:true });
        </script>
    <!- I noticed that the body code added a div id called "divOne", so I added the "TabbedPanels1" div id to the above code thinking that this would apply the javascript code to all of the tabs. Dreamweaver adds <div id="TabbedPanels1" class="TabbedPanels"> to the page when you insert the tabbed menu, so I'm thinking the javascript has to point to either one of those for it to work. The "demo_video.flv",0,0 code is probably unneccesary, right? As you can see, I'm completely clueless. -->
        <script>
            playerOne.addEventListener("playheadUpdate",this,myHandler);
            playerOne.removeEventListener("playheadUpdate",this,myHandler);
            function myHandler() {
                //alert("eh");
        </script>
    </body>
    Once again, thanks for your help.

  • How to copy a file from Java code

    I have written a file through Java code in folder, say, "A". Now, I want a copy of that file exactly the same in some other folder "B". How, it can be done?

    http://java.sun.com/docs/books/tutorial/essential/io/streams.html

Maybe you are looking for

  • HP Officejet Pro 8600 Plus Printer says "acquiring e-mail address...​" and won't move on.

    I have just installed this new printer, and when the printer control panel began setting up for e-print, it got hung up at "acquiring e-mail address."  I have already set everything up through the installation CD.

  • Link between Menu and Queries

    Hi Guru's, Where can I find a link (in which table(s)) between the queries and the menu (pfcg) ? Is there something better than AGR_BUFFI ? I need only the technical name of the quey and not the entire URL ... Thanks in advance Alex Message was edite

  • Acrobat 9 constantly configures ... ?

    Acrobat 9 Standard constantly configures ... Acrobat 9 on Windows XP SP3. I did a complete removal of all parts/pieces of old versions of Reader & Standard before installing the full version of Acrobat 9 Standard from CD. Acrobat works as expected ex

  • Safari Crash sometimes on flash movies

    Hello Safari regularly crashes Safari I open several page or when i read Flash. Here is a part of my crash report; Process: Safari [2151] Path: /Applications/Safari.app/Contents/MacOS/Safari Identifier: com.apple.Safari Version: 3.1.1 (5525.18) Build

  • Very bad interlaced effect on Chroma Key filter

    Hallo everyone, Does anybody know why when I try to apply a croma key filter on Motion the image I get is like this ? while when I use FC I get best result? Like this: Is there any option to set in Motion Prefs? Thank you iMac G5, CD, C2D, MB Mac OS