(Beta)
Package | fl.video |
Class | public class NCManager |
Inheritance | NCManager ![]() |
Implements | INCManager |
Subclasses | NCManagerNative |
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS3 |
Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 |
NetConnection
object for the VideoPlayer class, a
helper class for that user facing class.
The NCManager class searches a URL and assumes the following:
- If the URL string host starts with a valid FMS streaming protocol (such as rtmp://, rtmps://, or rtmpt://) it infers that the URL is streaming from an FMS.
- If it does not stream from an FMS and if the URL contains a question mark (?), it infers that the URL points to an SMIL file.
- If it does not stream from an FMS and if it does not contain a question mark (?), the NCManager class checks to see whether it ends in .flv. If it ends in .flv, it infers it is for a progressive download FLV. Otherwise, it is an SMIL file to download and parse.
Public Properties
Property | Defined By | ||
---|---|---|---|
![]() | constructor : Object
A reference to the class object or constructor function for a given object instance. | Object |
Public Methods
Method | Defined By | ||
---|---|---|---|
![]() |
Indicates whether an object has a specified property defined. | Object | |
![]() |
Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter. | Object | |
![]() |
Indicates whether the specified property exists and is enumerable. | Object | |
![]() |
Sets the availability of a dynamic property for loop operations. | Object | |
![]() |
Returns the string representation of this object, formatted according to locale-specific conventions. | Object | |
![]() |
Returns the string representation of the specified object. | Object | |
![]() |
Returns the primitive value of the specified object. | Object |
Public Constants
Constant | Defined By |
---|
Property Detail
Constructor Detail
Method Detail
Constant Detail
Examples How to use this example
NCManagerExample.as
This example demonstrates how to access the NCManager object of a VideoPlayer object
to determine whether a video is streaming or downloading progressively.
To run the example, follow these steps:
- Add the FLVPlayback component in the library.
- Replace
testVideoPath
with an absolute or relative path to an FLV file. - Save this code as NCManagerExample.as in the same directory as your FLA file.
- Set the Document class in the FLA file to NCManagerExample.
package { import fl.video.VideoEvent; import fl.video.VideoPlayer; import flash.display.Sprite; public class NCManagerExample extends Sprite { private var videoPath:String = "http://www.helpexamples.com/flash/video/sheep.flv" private var player:VideoPlayer; public function NCManagerExample() { player = new VideoPlayer(); player.play(videoPath); player.addEventListener(VideoEvent.READY,announceRTMS); addChild(player); } private function announceRTMS(e:VideoEvent):void { var player:VideoPlayer = e.target as VideoPlayer; if(player.ncMgr.isRTMP) { trace("Video is streaming"); } else { trace("Video is progressively downloading"); } } } }
Wed Nov 21 2018, 06:34 AM -08:00