• SEARCH
  • DOWNLOADS
  • MY ACCOUNT
  • Buy (0)
  • CONTACT
  • Free Trial
Wowza Logo
  • PRODUCTS
    • Products

      • Wowza ClearCaster
      • Facebook Live appliance
      • Wowza Streaming Cloud
      • Cloud streaming services
      • Wowza Streaming Engine
      • Streaming server software
      • Wowza GoCoder & SDK
      • Mobile capture and encoding app
    • Capabilities

      • CDN
      • Ultra Low Latency
      • SRT
      • Player
      • WebRTC
      • Live Transcoding
      • See All Capabilities
  • DOCS & APIS

      Docs & APIs

      • Getting Started
      • User Guides
      • Technical Articles
      • Video Tutorials
      • API & SDK Docs
  • SOLUTIONS
    • Streaming Types

      • Live Video Streaming
      • Video on Demand
      • Audio-Only Streaming
      • IP Camera Streaming
      • VR and 360° Streaming
      • Chat
    • Industries

      • Broadcast & OTT
      • Education
      • Enterprise
      • Government
      • Live Events
      • Live Sports
      • Religious Organizations
    • Streaming Solutions

      • MediaDS—Integrated Streaming Device
      • Streaming Service Providers
      • Live Mobile Broadcasting
  • PRICING
    • Wowza ClearCaster

      • Facebook Live appliance
      • Starting at $2,995
      • Add to Cart
      • Request a Demo
    • Wowza Streaming Cloud

      • Cloud streaming services
      • Starter Plan: $49/month
      • Add to Cart
      • See All Plans
    • Wowza Streaming Engine

      • Streaming server software
      • Annual Plan: $65/month
      • Add to Cart
      • See All Plans
    • Wowza GoCoder SDK

      • SDK for mobile streaming
      • Talk to a Streaming Expert
      • Contact Us
      • Free Trial
  • RESOURCES

      Resources

      • Blog
      • Case Studies
      • Webinars
      • Videos
      • Podcasts
      • Test Players
      • Developer Tools
  • SUPPORT
    • Support

      • Forums
      • Software Updates
      • Open a Support Ticket
    • Plans & Services

      • Support Plans
      • Advisory Services
      • Live Event Support
  • My Account
  • Buy (0)
  • SEARCH
  • Ask a question
  • Forums
    • Wowza ClearCaster
    • Wowza Streaming Engine
    • Wowza Streaming Cloud
    • Wowza Player
    • Wowza GoCoder SDK
    • Wowza Developer Dojo
    • Topics
    • Questions
    • Users
    • Badges
  • Sign in
  • Community Home /
  • Wowza Streaming Engine /
  • Tutorials /
avatar image
Question by Phil jackson · Mar 17, 2013 at 03:42 PM · tutorials

The simplest example, I cant get it to work in flex.

Hi,

Im just starting out and Im feeling really dumb because I'm having trouble getting really simple examples to work.

Im trying to make a flex version of the simple video stream that opens when wowza starts. Im using the code from page 46 of the user guide.

There are lots of examples, and they look great, but they are all .fla files which I cant open in flash builder.

Here is my mxml file that Im using at the moment, which is the best I have been able to do, I am getting sound out of this but video is black.

Any help would be really appreciated, I think I just need something really simple that I can play around with to get started.

<?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" minWidth="955" minHeight="600"
			   initialize="init()">
	<fx:Declarations>
		<!-- Place non-visual elements (e.g., services, value objects) here -->
	</fx:Declarations>
	
	<fx:Script>
		<![CDATA[
			
			private var myCam:Camera;
			//private var camVideo:Video;
			private var wowzaVideo:Video;
			private var nc:NetConnection = new NetConnection();
			private var ns:NetStream = null;
			private function init():void
			{
				nc.addEventListener(NetStatusEvent.NET_STATUS, ncOnStatus);
				nc.connect("rtmp://localhost/vod");
				
				myCam = Camera.getCamera();
				camVideoDisplay.attachCamera(myCam);
			}
			private function ncOnStatus(infoObject:NetStatusEvent):void
			{
				if (infoObject.info.code == "NetConnection.Connect.Success")
				{
					ns = new NetStream(nc);
					
					ns.bufferTime = 3;
					
					//wowzaVideo.attachNetStream(ns);
					//wowzaVideoDisplay.addChild(wowzaVideo);
					
					ns.play("mp4:sample.mp4")
						
					wowzaVideo.attachNetStream(ns);
					wowzaVideoDisplay.addChild(wowzaVideo);
				}
				
			}
			
			
		]]>
	</fx:Script>
	
	<mx:VideoDisplay id="wowzaVideoDisplay" x="404" y="48" width="282" height="222"/>
	<mx:VideoDisplay id="camVideoDisplay" x="74" y="48" width="282" height="222"/>
	
</s:Application>
Comment

People who like this

0 Show 0
10 |600 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image

Answer by Jay Charles · Mar 18, 2013 at 07:50 AM

You can't add a video object as a child of a VideoDisplay in flex. You can add the video object to a UIComponent, or you can attach the netstream to the VideoDisplay's mx_internal::videoPlayer. See http://stackoverflow.com/questions/42333/how-to-display-a-live-streaming-video-using-videodisplay-in-flex for details.
Comment

People who like this

0 Show 2 · Share
10 |600 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Richard Lanham · Mar 18, 2013 at 01:24 PM 0
Share
You can use this for reference:

http://wowza.com/downloads/examples/flex/SimpleVideoStreaming.zip

Richard
avatar image Phil jackson Richard Lanham · Mar 19, 2013 at 08:49 PM 0
Share
Thankyou both!

thats all I was really after I can get it to work now.
avatar image

Answer by Richard Lanham · Apr 29, 2013 at 03:38 PM

You need direct link for each example. These are all of them:

http://wowza.com/downloads/examples/flex/LiveVideoStreaming.zip

http://wowza.com/downloads/examples/flex/SimpleVideoStreaming.zip

http://wowza.com/downloads/examples/flex/VideoChat.zip

http://wowza.com/downloads/examples/flex/VideoRecording.zip

Richard
Comment

People who like this

0 Show 0 · Share
10 |600 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image

Answer by Anthony Guglielmo · Apr 29, 2013 at 10:28 AM

Thankyou both!

thats all I was really after I can get it to work now.


I tried to navigate to the root directory of flex examples for http://wowza.com/downloads/examples/flex/SimpleVideoStreaming.zip at http://wowza.com/downloads/examples/flex/ and I get a 404 type error. Is there a new link for them?
Comment

People who like this

0 Show 0 · Share
10 |600 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

2 People are following this question.

avatar image avatar image

Related Questions

Using JW Player 4 with Wowza Server 4 Answers

How to use smart phone as multi camera production 0 Answers

My Multi-bit rate Adaptive/Dynamic Streaming for Flash Video on Demand (VOD) Journey 3 Answers

Wowza 3.0 and VBrick Windows Media (WM) Appliance 2 Answers

Wowza Intergrate with Kaltura current version 1 Answer

Hot Topics
  • AWS Hosting
  • Mobile SDK
  • Deployment Options
  • Load Balancing
  • Content Security
Product Sign-in
  • Wowza Streaming Cloud
  • Wowza Player
Under the Hood
  • Developer Tools
  • Wowza System Status
  • Test Players
  • Developer IDE
Resellers
  • Find a Reseller
  • Reseller Portal
  • Become a Reseller
Company
  • About Us
  • Blog
  • News
  • Events
  • Careers
  • Customers
  • Partners
  • Contact Us
Stay Connected
Get Monthly Newsletter
Select a Language
  • English
    • English
    • Español
    • 日本語
    • 한국어
    • हिन्दी भाषा
    • 中文
    • русский язык

© 2005–2018 Wowza Media Systems, LLC. All rights reserved.   Terms | Privacy | Trademarks | Legal


Enterprise
Social Q&A

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Forums
  • Wowza ClearCaster
  • Wowza Streaming Engine
  • Wowza Streaming Cloud
  • Wowza Player
  • Wowza GoCoder SDK
  • Wowza Developer Dojo
  • Explore
  • Topics
  • Questions
  • Users
  • Badges