VideoDisplay control

According to the Developers guide in flexbuilder 2 you can
use the videodisplay control to stream video. The code they show is
this:
<?xml version="1.0"?>
<!-- controls\videodisplay\VideoDisplayCamera.mxml -->
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
// Define a variable of type Camera.
import flash.media.Camera;
public var cam
public function initCamera():void {
// Initialize the variable.
cam = Camera.getCamera();
myVid.attachCamera(cam)
]]>
</mx:Script>
<mx:VideoDisplay id="myVid"
width="320" height="240"
creationComplete="initCamera();"/>
</mx:Application>
So they are creating a camera object using the
creationComplete event in the videoDisplay control.
My question is how does the control know where the camera is.
If I have the camera connected to my laptop (via USB) and my laptop
is on the network, how do I point the control to the camera?

It uses the default camera installed on your system.
Check getCamera() method on this link
http://livedocs.adobe.com/flex/2/langref/flash/media/Camera.html#getCamera()

Similar Messages

  • VideoDisplay control in Vista

    We are using the VideoDisplay control to display a .flv file
    being streamed from a stream server. It works great except I can't
    get it to work on Vista clients. I've tried it on 2 seperate Vista
    machines. Does anyone know if this control is not compatible with
    Vista yet?
    Thanks in advance,
    Todd

    What is your code for streaming the video? Also, are you
    using the VideoDisplay in a component or directly in your code? If
    you can post some of the relevant code for your app, that might
    make it easier to find the problem. Since the VideoDisplay control
    itself works with Vista, the problem must lie elsewhere.
    Vygo

  • Why spark videodisplay control does not work when i run the application?

    Even in the mode design I can not see the video, thks.....

    @Jorge,
    Try using file:/// instead of file:/.
    This seems to work for me:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark"
            xmlns:mx="library://ns.adobe.com/flex/mx">
        <s:VideoDisplay x="159" y="96"
                source="file:///C:/Documents and Settings/pdehaan/My Documents/My Videos/walking.flv"
                loop="true"
                width="384" height="267"/>
    </s:Application>
    But I'd probably recommend copying the .FLV file into your Builder project or putting it online instead of trying to play it back from a hardcoded file:/// path.
    Peter

  • Setting playheadTime in VideoDisplay

    I encountered a weird behaviour of the playheadTime setter in
    the VideoDisplay component.
    It seems like I'm getting the right value from it, but when
    I'm trying to set it - the playhead jumps to an unexpected point in
    the video.
    In the code below I'm setting the playheadTime to "1" when
    the "skip" button is pressed, but it is actually jumping to the
    6.974s point in the video.
    Can you tell me what I'm doing wrong?
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:Panel x="22" y="66" layout="absolute" width="572"
    height="474">
    <mx:VideoDisplay id="mainVid" y="10"
    maintainAspectRatio="true" source="
    http://youtube-221.vo.llnwd.net/d1/03/1A/4YrMAI1vhnM.flv"
    autoPlay="false" horizontalCenter="0"/>
    <mx:HBox x="186" y="262">
    <mx:Button label="Play" click="mainVid.play();"/>
    <mx:Button label="Pause" click="mainVid.pause();"/>
    <mx:Button label="Stop" click="mainVid.stop();"/>
    </mx:HBox>
    <mx:Button label="Skip" click="mainVid.playheadTime=1"
    x="271" y="304"/>
    <mx:TextInput x="360" y="292" width="51" height="24"
    text="{mainVid.playheadTime}" />
    </mx:Panel>
    </mx:Application>

    This has to do with the FLV format and not the VideoDisplay
    control. The NetStream.seek() function which VideoDisplay
    encapsulates can only seek to key frames.
    A Key Frame in a video is a frame that is redrawn completely.
    When you are compressing your FLV's you have many options to set
    for Key Frames. The more Key Frames you have the bigger the file
    size, most FLV's are probably compressed at 15-30 fps and will have
    their Key Frame rate set to every 50-100. At 30 fps and every 100
    frames make a key frame you are actually only getting new key frame
    every ~3 seconds.
    No when the NetStream.seek() function is called it finds the
    closest Key Frame after the time value you give it. So basically
    the video you are watching has a Key Frame at 0 seconds and
    6.974s.

  • Mx:videodisplay.totalTime = -1

    I am trying to build a custom-progress bar which includes
    both the download progress as well as the play progress of an
    mx:videodisplay control, and allows the user to seek based on where
    on the progress bar they click.
    Here's how I am doing it:
    capture the position of the click from mouseEvent
    use it to calculate a percentage for how far down the
    progress bar the click occurred (0.0-1.0)
    multiply percentage by video.totalTime to determine what the
    desired time is
    set playheadTime equal to desired time
    My problem is that the totalTime property is returning -1.
    The video, however, remains playing, and the playheadTime property
    is legit too - the clock still counts up every second of the video
    as it plays. But since the totalTime property is -1 everything else
    gets screwed up, and when I attempt to seek anywhere, i get Error
    1003: Invalid Seek - understandable since seeking to a negative
    time doesn't make sense.
    Any information anyone has about how the totalTime property
    is calculated would be appreciated. Also below are a couple pieces
    of the code:

    Update. When I add single line "System.gc()" in onTimer function I no longer have a crash and memory usage is constant.
    Best Regards, Aleksey

  • VideoDisplay no longer works

    I set up a project which was very simple.
    I dragged a videoDisplay control onto the screen and set the
    parameters:
    Live="true"
    Autoplay="true"
    source="rtmp://ipaddress/app/instance/video
    runnning the application worked fine and the live streaming
    video was running fine.
    I create 3 videoDisplay controls in total where each one was
    puuling a different stream, when I ran it it worked fine showing
    all three streams.
    That was yesterday.
    Today when I went to edit some basic cosmetic issues where I
    never touched the VideoDisplay I started getting:
    Error #2044: Unhandled AsyncErrorEvent:. text=Error #2095:
    flash.net.NetConnection was unable to invoke callback onBWDone.
    error=ArgumentError: Error #2126: NetConnection object must be
    connected.
    I now cannot stream live video.
    Any ideas please?

    Hi lynettec,
    When you say Acrobat doesn't work in Firefox, do you mean that you can't view PDF files in the Firefox browser? If so, please see View PDF files in Firefox without downloading them | Firefox Help
    If you're referring to the Acrobat online services, they are supported in Firefox, so I'd would need a little more information about what's happening to get to the bottom of the problem.
    Best,
    Sara

  • Witch One: VideoDisplay or FLVPlayback ?

    hi,
    I create a Flex application that must a lots of video tu
    use...
    some time i use "videodisplay" some time the
    "FLVPlayback"....
    i know NetStream to...
    what are the most difference ?
    So at this time, witch is the best to use ? for:
    - H264
    - Fullscreen Hardware
    - progressive / streaming
    Thanks a lots for your answer...
    and excuse me for my bad english !

    Adobe Newsbot hopes that the following resources helps you.
    NewsBot is experimental and any feedback (reply to this post) on
    its utility will be appreciated:
    Flex 3 - VideoDisplay control:
    The Flex streaming VideoDisplay control makes it easy to
    incorporate streaming media into .... When you read from or write
    to a NetConnection, NetStream,
    Link:
    http://livedocs.adobe.com/flex/3/html/controls_17.html
    Displaying a video in Flex using the NetConnection,
    NetStream, and:
    Displaying a video in Flex using the NetConnection,
    NetStream, ... If you are doing simple playback of video
    VideoDisplay a really easy way to playback
    Link:
    http://blog.flexexamples.com/2008/03/01/displaying-a-video-in-flex-using-the-netconnection -netstream-and-video-classes/
    Flex 3 - Using the DRMAuthenticateEvent class:
    Adobe Flex 3 Help ... Add this event handler to a NetStream
    object that points to ... The following example contains a
    VideoDisplay object with a source
    Link:
    http://livedocs.adobe.com/flex/3/html/DRM_5.html
    Flashcomguru.com: Playing a live FMS stream using
    VideoDisplay in:
    Jan 17, 2007 ... According to the Flex docs this is possible:
    'The VideoDisplay ... the Camera to a VideoDisplay and you CAN
    attach the NetStream to the
    Link:
    http://www.flashcomguru.com/index.cfm/2007/1/17/Playing-a-live-FMS-stream-using-VideoDispl ay-in-Flex2
    mx.controls.VideoDisplay (Flex 3):
    The VideoDisplay control lets you play an FLV file in a Flex
    application. .... a metadata information packet that is received
    from a call to the NetStream.
    Link:
    http://livedocs.adobe.com/flex/3/langref/mx/controls/VideoDisplay.html
    [Red5] Flex VideoDisplay component and red5:
    Aug 14, 2006 ... [Red5] Flex VideoDisplay component and red5
    ... it seems that its trying to attach a netstream before the
    connection is even made right ?
    Link:
    http://osflash.org/pipermail/red5_osflash.org/2006-August/004917.html
    Disclaimer: This response is generated automatically by the
    Adobe NewsBot based on Adobe
    Community
    Engine.

  • Error When connecting to FLVs via Vitalstream's Media Server

    Hello,
    I get an error everytime I try to connect to an FLV using
    Vitalstream's Media Server. I have turned on and off the
    Autobandwidthdetection property in the VideoPlayer component (to
    bypass main.asc)(If that even matters (no support in these
    errors!!!!!) I though it might be the FLV encoding but it runs with
    no problem when I run the FLV locally: Here is the error that I
    get:
    Error #2044: Unhandled AsyncErrorEvent:. text=Error #2095:
    flash.net.NetConnection was unable to invoke callback streamInfo.
    error=ReferenceError: Error #1069: Property streamInfo not found on
    mx.controls.videoClasses.NCManagerConnectClient and there is no
    default value.
    at mx.controls.videoClasses::NCManager/::connectRTMP()
    at mx.controls.videoClasses::NCManager/connectToURL()
    at mx.controls.videoClasses::VideoPlayer/::_load()
    at mx.controls.videoClasses::VideoPlayer/play()
    at mx.controls::VideoDisplay/play()
    at mx.controls::VideoDisplay/::autoPlaying()
    at mx.controls::VideoDisplay/::creationCompleteHandler()
    at
    flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.core::UIComponent/dispatchEvent()
    at mx.core::UIComponent/set initialized()
    at mx.managers::LayoutManager/::doPhasedInstantiation()
    at Function/
    http://adobe.com/AS3/2006/builtin::apply()
    at mx.core::UIComponent/::callLaterDispatcher2()
    at mx.core::UIComponent/::callLaterDispatcher()
    Please someone help! Vitalstream is not being helpful at
    all.

    I am also getting this error when using VitalStream. Was an
    answer ever found this this issue? If anybody has any suggestions,
    all help is appreciated.
    Error #2044: Unhandled AsyncErrorEvent:. text=Error #2095:
    flash.net.NetConnection was unable to invoke callback streamInfo.
    error=ReferenceError: Error #1069: Property streamInfo not found on
    mx.controls.videoClasses.NCManagerConnectClient and there is no
    default value.
    at mx.controls.videoClasses::NCManager/::connectRTMP()
    at mx.controls.videoClasses::NCManager/connectToURL()
    at mx.controls.videoClasses::VideoPlayer/::_load()
    at mx.controls.videoClasses::VideoPlayer/load()
    at mx.controls::VideoDisplay/load()
    at mx.controls::VideoDisplay/::autoPlaying()
    at mx.controls::VideoDisplay/::creationCompleteHandler()
    at
    flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.core::UIComponent/dispatchEvent()
    CODE
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:Panel title="VideoDisplay Control Example"
    height="75%" width="75%"
    horizontalAlign="center"
    paddingTop="10" paddingLeft="10" paddingRight="10"
    paddingBottom="10">
    <mx:Text width="75%" color="blue"
    text="Use the buttons to control the video. The Stop button
    resets the video to the beginning."/>
    <mx:VideoDisplay
    id="myVid"
    height="158"
    width="211"
    source="rtmp://LINK REMOVED"
    autoPlay="false"/>
    <mx:HBox>
    <mx:Button label="Play" click="myVid.play();"/>
    <mx:Button label="Pause" click="myVid.pause();"/>
    <mx:Button label="Stop" click="myVid.stop();"/>
    </mx:HBox>
    <mx:HBox>
    <mx:Label text="{myVid.bytesLoaded} of
    {myVid.bytesTotal}" />
    <mx:Label text="{myVid.playheadTime} of
    {myVid.totalTime}" />
    </mx:HBox>
    </mx:Panel>
    </mx:Application>
    Text

  • Need help setting up Flex on server (sdk?)

    This should be a simple noob question:
    I have Flex Builder on my local machine. I've created an
    application (project.mxml) that uses VideoDisplay to play some
    videos chosen from a List using an XML file as the data source. The
    app works great testing on my local machine.
    I now wish to take my project and put it on my Windows 2k3
    server.
    I copied over my project directory to the server at
    D:\Flex\ProjectName, and I set a website in IIS using home
    directory D:\Flex.
    At this point, I go to my local machine and punch in the URL,
    http://10.xxx.xxx.xxx:8700/ProjectName/bin/project.html,
    which brings up my application UI. I can see the app, it looks
    identical to my local machine. However, when I go to select my
    video from the List, nothing plays. I've included a function that
    checks for connection and it doesn't report back with an alert.
    As for the server, it has the newest version of Flash player
    (not sure if this is even needed on server side?) and it also has
    the Flex Data Services 2 installed (yes, I'm using Flex 2). I don't
    even think I need the FDS2 installed at the moment since I'm not
    really connecting to any data sources other than this xml file, but
    I installed it as a precaution since i have it installed on my
    local machine. This is as far as the server is setup for Flex. I've
    looked at documentation and its not clear to me as to what needs to
    be on the server to get Flex apps to work. Do I need to install
    Flex Builder on the server? Or the SDK? And what files am I
    supposed to give the server from my local machine? I've spent a
    great deal of time on this to see it fail on the server, so any
    help is appreciated.

    I've added FLV to the MIME extensions list and restarted
    WWWPS
    Still no video connection. Sigh, this is weird. I am able to
    directory browse and I can see the videos.
    Something strange happens though. If I directory browse to
    /vids/, I can see all my FLV's. However when I click on one, it
    gives me a "Server Error" - Either the Macromedia application
    server is unreachable or it does not have a mapping to process this
    request.
    I changed my script a bit to point to another XML file
    located on the web,
    http://ws.jamesward.org/youtube.xml
    and modified my dataProvider and the source spots to fit his
    structure and it displayed his youtube videos.
    I'm going to try using full URL addressings for each video
    url on my XML file, though I think I did this already without
    progression.
    Let me know about that error I reported.
    EDIT: Using the full URL didn't work. It's still giving me a
    connection failed alert.
    EDIT2: I made a new mxml file with just a
    <mx:VideoDisplay> control only. I set the source to the full
    URL path of a single video on my server and tested the app locally.
    It would not display the video. I then set the source to the
    relative path of the same video on my local machine and the video
    played. So it's definitely something with my server handling these
    FLV's.
    EDIT3: Just to note, my server also has ColdFusion 7.0.2
    running on it. I don't know if that explains the error
    above?

  • Video Clear

    Hi everyone, I'm trying to create a videochat using Flex 3
    and Flash Media server and I have some problems with the method
    "Clear" of Video object. When a user stop publishing its stream
    (from the webcam), I receive an event because a shared object
    property (with the id of the publisher) changes to "null". At this
    time, I invoke the method "clear" of the video object that contains
    the stream, but the screen (videoDisplay containing the video
    object) doesn't change. I continue seeing the last frame received.
    What can I do? Thanks!!

    You could also subclass the VideoDisplay control and add your
    own public "clear()" method which calls the
    mx_internal::videoPlayer.clear() code.
    [ActionScript]
    package {
    import mx.controls.VideoDisplay;
    import mx.core.mx_internal;
    public class MyVideoDisplay extends VideoDisplay {
    public function MyVideoDisplay() {
    //TODO: implement function
    super();
    public function clear():void {
    pause();
    mx_internal::videoPlayer.clear();
    [/ActionScript]
    [MXML]
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    xmlns:custom="*" layout="vertical">
    <custom:MyVideoDisplay id="myVideoDisplay" source="
    http://www.helpexamples.com/flash/video/cuepoints.flv"
    />
    <mx:Button label="clear" click="myVideoDisplay.clear();"
    />
    </mx:Application>
    [/MXML]
    Peter

  • This program rules

    100000%
    every time I discover a new feature in pro7 i'm like 'oh i love this so much'

    "subSE7EN" <[email protected]> wrote in
    message
    news:e43ccq$9nk$[email protected]..
    > I got this from a LiveDocs explaining the VideoDisplay
    component:
    > The VideoDisplay control does not support scan forward
    and scan backward
    > functionality. However, you can achieve this
    functionality by moving the
    > playback sliders...
    >
    > By "playback sliders", do they mean an HSlider binded to
    the VideoDisplay?
    Yes, the VideoDisplay component doesn't have a UI, so you'd
    have to build
    one of your own using the components available in Flex.
    > In which case we'd have to build a full interface using
    components...
    Yups...
    > Is there any way of using those interfaces that you can
    choose from in
    > Flash 8
    > Pro?
    I'm afraid, no.
    Manish Jethani
    Developer, Flex Framework
    Adobe Systems Inc.

  • HPUX on IA64: Error when connecting to SAP via librfc

    Hello,
    I'm trying to develop a C-program to call ABAP-Functions. On Windows this works fine (example program from the book "SAP-Schnittstellenprogrammierung" by Meiners/Nüßer), but on HP-UX on IA64 I get:
    **** Trace file opened at 20060919 115449 MESZ SAP-REL 700,0,61 RFC-VER 3 834459
    resize I/O buffer to 16000 bytes
    >>>> [1] <unknown>    : EXT  <ac: 1> L w2sap >>> OPEN  
    UUID: ab_drvstate create uuid {450FBE6A-BE69-25F1-E100-0000C06D4F88}
    ======> Connect to SAP gateway failed
    Connect_PM  GWHOST=w2sap, GWSERV=sapgw00, SYSNR=00
    LOCATION    CPIC (TCP/IP) on local host
    ERROR       internal error
    TIME        Tue Sep 19 11:54:49 2006
    RELEASE     700
    COMPONENT   NI (network interface)
    VERSION     38
    RC          -1
    MODULE      nixxi.cpp
    LINE        2762
    DETAIL      NiICheckPendConnection
    SYSTEM CALL poll, getsockopt
    ERRNO       2050
    COUNTER     3
    >>>> [1] <unknown>    : EXT  <ac: 2> L w2sap >>> CLOSE abrfcio.c 611 
      -{450FBE6A-BE69-25F1-E100-0000C06D4F88}
    ==== Delta 0   0 LOG DROPPED
    >>> RfcOpenEx ...
    Got following connect_param string:
       CLIENT=000 USER=BCUSER PASSWD=******* LANGUAGE=DE ASHOST=w2sap SYSNR=00 ABAP_DEBUG=0 LCHECK=0 TRACE=1 USE_SAPGUI=0
    <<< RfcOpenEx failed
    I presume it has something to do with 32/64 Bit, because we also had problems with our own programs. On HPUX socklen_t is 64 bit (parameter of getsocket), and perhaps librfc thinks, it only has 32 bit and give an int as parameter.
    Is there anything I can do?
    Thx.
    Roger

    I am also getting this error when using VitalStream. Was an
    answer ever found this this issue? If anybody has any suggestions,
    all help is appreciated.
    Error #2044: Unhandled AsyncErrorEvent:. text=Error #2095:
    flash.net.NetConnection was unable to invoke callback streamInfo.
    error=ReferenceError: Error #1069: Property streamInfo not found on
    mx.controls.videoClasses.NCManagerConnectClient and there is no
    default value.
    at mx.controls.videoClasses::NCManager/::connectRTMP()
    at mx.controls.videoClasses::NCManager/connectToURL()
    at mx.controls.videoClasses::VideoPlayer/::_load()
    at mx.controls.videoClasses::VideoPlayer/load()
    at mx.controls::VideoDisplay/load()
    at mx.controls::VideoDisplay/::autoPlaying()
    at mx.controls::VideoDisplay/::creationCompleteHandler()
    at
    flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.core::UIComponent/dispatchEvent()
    CODE
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:Panel title="VideoDisplay Control Example"
    height="75%" width="75%"
    horizontalAlign="center"
    paddingTop="10" paddingLeft="10" paddingRight="10"
    paddingBottom="10">
    <mx:Text width="75%" color="blue"
    text="Use the buttons to control the video. The Stop button
    resets the video to the beginning."/>
    <mx:VideoDisplay
    id="myVid"
    height="158"
    width="211"
    source="rtmp://LINK REMOVED"
    autoPlay="false"/>
    <mx:HBox>
    <mx:Button label="Play" click="myVid.play();"/>
    <mx:Button label="Pause" click="myVid.pause();"/>
    <mx:Button label="Stop" click="myVid.stop();"/>
    </mx:HBox>
    <mx:HBox>
    <mx:Label text="{myVid.bytesLoaded} of
    {myVid.bytesTotal}" />
    <mx:Label text="{myVid.playheadTime} of
    {myVid.totalTime}" />
    </mx:HBox>
    </mx:Panel>
    </mx:Application>
    Text

  • Help with RSS

    Hi guys
    Basically, I would like to create a panel for Photoshop CS4
    getting an RSS feed of my video tuts. I know how to put the video
    window but I would like the RSS links to show the video once
    clicked. Kind of like what Scott Kelby did
    HERE
    but instead of showing the blog post, it would be the video that
    would play.
    On the back end, would I have to create a separate feed and
    blog page with direct video links?
    Thanks!

    If you know action script and MXML, you can modify the RSS
    sample in the Flex Builder.
    Use the VideoDisplay control show the video.

Maybe you are looking for

  • Access via 'NULL' object reference not possible.

    hi all,                    i am getting the following error in my application(getting data from 2 data base table and kept in internal table and binding that 2 internal table to two context) in st22 i have this. Error analysis     An exception occurr

  • Customer master list report

    Hi, 1) How can I generate the customer master report? 2) How can I generate the blocking/deletion customer mater list report? Can I get any standard report as mentioned above. Thanks Devendra

  • Hotspots created in Framemaker 11 don't work when generating the PDF

    I'm trying to create several hotpots on an image that go to specific locations in a table. I have no problem creating them in Framemaker 11 and the links work fine when I test them using CTL+ALT and the mouse pointer. When I generate the PDF, however

  • Is this safe: install fm9 and fm7.2 on one computer?

    I want to try the frame9 trial version on a computer with 7.2 installed (non-structured, XP/SP3). I have tons of  work to do too and can't afford any cross-pollination (software corruption, driver conflicts, etc.). Anyone tried this? (I know about ba

  • Error message 7 error 126

    When updating to latest itunes program failed to install.  I attempted several times to reinstall the program but error messages kept coming up.  I followed directions to uninstall the program.  I removed most bonjour files and common / apple files m