Наши проекты:
Журнал · Discuz!ML · Wiki · DRKB · Помощь проекту |
||
ПРАВИЛА | FAQ | Помощь | Поиск | Участники | Календарь | Избранное | RSS |
[98.82.120.188] |
|
Сообщ.
#1
,
|
|
|
Может кто тут знаком с таким зверям как OSMF Как там реализовывать DynamicStream-видео? взял пример м оф сайта! с родной ссылкой: rtmp://cp67126.edgefcs.net/ondemand работает норм. Но как вставляю сторонюю ссылку: http://mediapm.edgesuite.net/osmf/co..._Streaming.f4m или http://81.218.248.24/vod/smil:source...l/manifest.f4m
не кажет ничего! хотя и ошибок не выдаёт! может http надо как то по другому обрабатывать?? package { import flash.display.MovieClip; import org.osmf.media.MediaPlayerSprite; import org.osmf.net.DynamicStreamingItem; import org.osmf.net.DynamicStreamingResource; //Sets the size of the SWF [SWF(width="800", height="600")] public class DynamicStreamSample extends MovieClip { import org.osmf.media.MediaPlayerSprite; import org.osmf.elements.VideoElement; import org.osmf.media.URLResource; import org.osmf.utils.URL; //////////////////////////////////////////////////// //DECLARATIONS //////////////////////////////////////////////////// //URI of the media public var playerSprite:MediaPlayerSprite; //////////////////////////////////////////////////// //CONSTRUCTOR //////////////////////////////////////////////////// public function DynamicStreamSample() { initPlayer(); } protected function initPlayer():void { //sprite that contains a MediaPlayer to manage display and control of MediaElements playerSprite = new MediaPlayerSprite(); //create the base of the dynamic streaming resource - set the connection uri var dynamicStreamResource:DynamicStreamingResource = new DynamicStreamingResource( "rtmp://cp67126.edgefcs.net/ondemand" ); //add the appropriate media to the dynamic streaming resource - path/bitrate/width/height dynamicStreamResource.streamItems.push( new DynamicStreamingItem( "mp4:mediapm/ovp/content/demo/video/elephants_dream/elephants_dream_768x428_24.0fps_408kbps", 408, 768, 428 ) ); dynamicStreamResource.streamItems.push( new DynamicStreamingItem( "mp4:mediapm/ovp/content/demo/video/elephants_dream/elephants_dream_768x428_24.0fps_608kbps", 608, 768, 428 ) ); dynamicStreamResource.streamItems.push( new DynamicStreamingItem( "mp4:mediapm/ovp/content/demo/video/elephants_dream/elephants_dream_1024x522_24.0fps_908kbps", 908, 1024, 522 ) ); dynamicStreamResource.streamItems.push( new DynamicStreamingItem( "mp4:mediapm/ovp/content/demo/video/elephants_dream/elephants_dream_1024x522_24.0fps_1308kbps", 1308, 1024, 522 ) ); dynamicStreamResource.streamItems.push( new DynamicStreamingItem( "mp4:mediapm/ovp/content/demo/video/elephants_dream/elephants_dream_1280x720_24.0fps_1708kbps", 1708, 1280, 720 ) ); //create a video element from the dynamic streaming resource, and set it as the media item for the medoa player sprite playerSprite.media = new VideoElement( dynamicStreamResource ); //Adds the sprite to the stage addChild( playerSprite ); } } } |