包 | org.osmf.net.dvr |
类 | public class DVRCastNetLoader |
继承 | DVRCastNetLoader RTMPDynamicStreamingNetLoader NetLoader LoaderBase EventDispatcher Object |
语言版本: | ActionScript 3.0 |
产品版本: | OSMF 1.0 |
运行时版本: | Flash Player 10, AIR 1.5 |
受保护的方法
示例 如何使用本示例
DVRCastNetLoaderExample.as
package { import flash.display.Sprite; import flash.display.StageAlign; import flash.display.StageScaleMode; import org.osmf.elements.VideoElement; import org.osmf.media.MediaPlayerSprite; import org.osmf.net.StreamType; import org.osmf.net.StreamingURLResource; import org.osmf.net.dvr.DVRCastNetLoader; public class DVRCastNetLoaderExample extends Sprite { public function DVRCastNetLoaderExample() { super(); stage.scaleMode = StageScaleMode.NO_SCALE; stage.align = StageAlign.TOP_LEFT; var mediaPlayerSprite:MediaPlayerSprite = new MediaPlayerSprite(); var netLoader:DVRCastNetLoader = new DVRCastNetLoader(); var videoElement:VideoElement = new VideoElement(null, netLoader); var urlResource:StreamingURLResource = new StreamingURLResource("rtmp://example.com/dvrcast_origin/mystream", StreamType.DVR); videoElement.resource = urlResource; addChild(mediaPlayerSprite); mediaPlayerSprite.media = videoElement; } } }
Tue Jun 12 2018, 11:04 AM Z