Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-20495

Adobe AIR VideoDisplay doesn't fail on 404 paths

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Adobe Flex SDK 3.3 (Release)
    • None
    • mx: Video
    • None
    • Affected OS(s): All OS Platforms
      Affected OS(s): All OS Platforms
      Language Found: English

    Description

      Steps to reproduce:
      1. Copy and paste the following code into a NEW AIR Application withing Flex Builder
      <?xml version="1.0" encoding="utf-8"?>
      <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="750" height="350">

      <mx:Script>
      <![CDATA[
      import mx.events.MetadataEvent;
      import mx.events.VideoEvent;

      private function urlEnter(event:Event):void

      { launchVideo(); }

      private function clickGo():void { launchVideo(); }

      private function launchVideo() : void {
      try {
      if (txtURL.text != "")

      { videoDisplay.close(); videoDisplay.source = txtURL.text; videoDisplay.play(); }
      } catch (e:ErrorEvent) { trace(e); }
      }

      private function onVideoStateChange(evt:VideoEvent) : void {
      switch (evt.state) { case "connectionError": videoDisplay.close(); break; }

      textArea.text += evt.state + "\n";
      }

      private function onMetadataReceived(evt:MetadataEvent) : void { trace(evt); }
      ]]
      >
      </mx:Script>
      <mx:VBox width="100%" height="100%">
      <mx:HBox>
      <mx:Label id="lblURL" text="URL:" />
      <mx:TextInput id="txtURL" text="http://www.adobe.com/DOES_NOT_EXIST.mov" width="500" enter="urlEnter(event)"/>
      <mx:Button label="Go" id="btnGo" width="40" click="clickGo()"/>
      </mx:HBox>
      <mx:HBox width="100%" height="100%">
      <mx:VideoDisplay id="videoDisplay" stateChange="onVideoStateChange(event)" width="480" height="270" metadataReceived="onMetadataReceived(event)" />
      <mx:TextArea id="textArea" width="250" height="270" />
      </mx:HBox>
      </mx:VBox>
      </mx:WindowedApplication>



      2. Run the air app and click GO


      3. Now create a new Flex WEB Application and paste the following code:
      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="750" height="350">

      <mx:Script>
      <![CDATA[
      import mx.events.MetadataEvent;
      import mx.events.VideoEvent;

      private function urlEnter(event:Event):void { launchVideo(); }

      private function clickGo():void { launchVideo(); }

      private function launchVideo() : void {
      try {
      if (txtURL.text != "") { videoDisplay.close(); videoDisplay.source = txtURL.text; videoDisplay.play(); }

      } catch (e:ErrorEvent)

      { trace(e); }

      }

      private function onVideoStateChange(evt:VideoEvent) : void {
      switch (evt.state)

      { case "connectionError": videoDisplay.close(); break; }

      textArea.text += evt.state + "\n";
      }

      private function onMetadataReceived(evt:MetadataEvent) : void

      { trace(evt); }

      ]]
      >
      </mx:Script>
      <mx:VBox width="100%" height="100%">
      <mx:HBox>
      <mx:Label id="lblURL" text="URL:" />
      <mx:TextInput id="txtURL" text="http://www.adobe.com/DOES_NOT_EXIST.mov" width="500" enter="urlEnter(event)"/>
      <mx:Button label="Go" id="btnGo" width="40" click="clickGo()"/>
      </mx:HBox>
      <mx:HBox width="100%" height="100%">
      <mx:VideoDisplay id="videoDisplay" stateChange="onVideoStateChange(event)" width="480" height="270" metadataReceived="onMetadataReceived(event)" />
      <mx:TextArea id="textArea" width="250" height="270" />
      </mx:HBox>
      </mx:VBox>
      </mx:Application>

      4. Run the Flex Web Application

      Actual Results:
      Within the AIR appliation, the Text Area will never show a connectionError. It never gets triggered by the VideoDisplay. However, the same code running in the Flex Web App, triggers the connectionError error.

      Expected Results:
      Adobe AIR should trigger the connectionError just as the same application within the web-browser does.

      Workaround (if any):
      None that I know of. If anyone can suggest one, please do.

      Attachments

        Activity

          People

            Unassigned Unassigned
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: