Changeset 394


Ignore:
Timestamp:
10/04/09 13:16:52 (4 years ago)
Author:
jeroen
Message:

added a color flashvar to the infobox and fixed a few wowza compatibility issues

Files:
10 edited

Legend:

Unmodified
Added
Removed
  • plugins/infobox/com/jeroenwijering/plugins/InfoBox.as

    r332 r394  
    1818        private var back:Sprite; 
    1919        /** Default colors. **/ 
    20         private var colors:Array = new Array('FFFFFF','000000','000000'); 
     20        private var colors:Array = new Array('FFFFFF','000000'); 
    2121        /** Reference to the graphics. **/ 
    2222        public var config:Object = { 
     23                color:undefined, 
    2324                size:85, 
    2425                position:'bottom' 
     
    4748                addChild(back); 
    4849                title = new TextField(); 
    49                 title.defaultTextFormat = new TextFormat("_sans",13,uint('0x'+colors[2]),true); 
     50                title.defaultTextFormat = new TextFormat("_sans",13,uint('0x'+colors[1]),true); 
    5051                title.x = title.y = 5; 
    5152                addChild(title); 
     
    7374                if(view.config['backcolor']) { colors[0] = view.config['backcolor']; } 
    7475                if(view.config['frontcolor']) { colors[1] = colors[2] = view.config['frontcolor']; } 
    75                 if(view.config['lightcolor']) { colors[2] = view.config['lightcolor']; } 
     76                if(config['color']) { colors[1] = config['color']; } 
    7677                view.addControllerListener(ControllerEvent.PLAYLIST,itemHandler); 
    7778                view.addControllerListener(ControllerEvent.ITEM,itemHandler); 
  • plugins/infobox/infobox.xml

    r314 r394  
    1919        <flashvars> 
    2020                <flashvar> 
     21                        <name>color</name> 
     22                        <default /> 
     23                        <description> 
     24                                Color of the texts in the box. By default, the 'frontcolor' parameter of the player is used. 
     25                                Set this flashvar to override the 'frontcolor'. 
     26                        </description> 
     27                </flashvar> 
     28                <flashvar> 
    2129                        <name>position</name> 
    2230                        <default>bottom</default> 
  • testing/files/bitrates.xml

    r390 r394  
    99                        <description>When bitrate switching a progressive download, the only actual switch is done on startup.</description> 
    1010                        <media:group> 
    11                                 <media:content bitrate="1500" width="1080" url="http://content.bitsontherun.com/videos/8Juv1MVa-67727.mp4" /> 
    12                                 <media:content bitrate="1100" width="720" url="http://content.bitsontherun.com/videos/8Juv1MVa-485.mp4" /> 
    13                                 <media:content bitrate="700" width="480" url="http://content.bitsontherun.com/videos/8Juv1MVa-484.mp4" /> 
     11                                <media:content bitrate="1600" width="1080" url="http://content.bitsontherun.com/videos/8Juv1MVa-67727.mp4" /> 
     12                                <media:content bitrate="1200" width="720" url="http://content.bitsontherun.com/videos/8Juv1MVa-485.mp4" /> 
     13                                <media:content bitrate="800" width="480" url="http://content.bitsontherun.com/videos/8Juv1MVa-484.mp4" /> 
    1414                                <media:content bitrate="400" width="320" url="http://content.bitsontherun.com/videos/8Juv1MVa-483.mp4" /> 
    1515                                <media:thumbnail url="http://content.bitsontherun.com/thumbs/8Juv1MVa-480.jpg" /> 
     
    2020                        <title>HTTP streaming</title> 
    2121                        <description>Bitrate switching for HTTP streaming is done on startup and with every seek and fullscreen switch.</description> 
    22                         <media:content bitrate="1500" width="1080" url="http://content.bitsontherun.com/videos/8Juv1MVa-67727.mp4" /> 
    23                         <media:content bitrate="1100" width="720" url="http://content.bitsontherun.com/videos/8Juv1MVa-485.mp4" /> 
    24                         <media:content bitrate="700" width="480" url="http://content.bitsontherun.com/videos/8Juv1MVa-484.mp4" /> 
     22                        <media:content bitrate="1600" width="1080" url="http://content.bitsontherun.com/videos/8Juv1MVa-67727.mp4" /> 
     23                        <media:content bitrate="1200" width="720" url="http://content.bitsontherun.com/videos/8Juv1MVa-485.mp4" /> 
     24                        <media:content bitrate="800" width="480" url="http://content.bitsontherun.com/videos/8Juv1MVa-484.mp4" /> 
    2525                        <media:content bitrate="400" width="320" url="http://content.bitsontherun.com/videos/8Juv1MVa-483.mp4" /> 
    2626                        <media:thumbnail url="http://content.bitsontherun.com/thumbs/8Juv1MVa-480.jpg" /> 
     
    3030 
    3131                <item> 
    32                         <title>RTMP streaming</title> 
     32                        <title>RTMP streaming (Wowza)</title> 
    3333                        <description>Bitrate switching for RTMP streaming is done on startup and with every seek and fullscreen switch.</description> 
    3434                        <media:group> 
    35                                 <media:content bitrate="1500" width="1080" url="videos/8Juv1MVa-67727.mp4" /> 
    36                                 <media:content bitrate="1100" width="720" url="videos/8Juv1MVa-485.mp4" /> 
    37                                 <media:content bitrate="700" width="480" url="videos/8Juv1MVa-484.mp4" /> 
     35                                <media:content bitrate="1600" width="1080" url="vdoxadmin/jeroen/8Juv1MVa-67727.mp4" /> 
     36                                <media:content bitrate="1200" width="720" url="vdoxadmin/jeroen/8Juv1MVa-485.mp4" /> 
     37                                <media:content bitrate="800" width="480" url="vdoxadmin/jeroen/8Juv1MVa-484.mp4" /> 
     38                                <media:content bitrate="400" width="320" url="vdoxadmin/jeroen/8Juv1MVa-483.mp4" /> 
     39                                <media:thumbnail url="http://content.bitsontherun.com/thumbs/8Juv1MVa-480.jpg" /> 
     40                        </media:group> 
     41                        <jwplayer:type>rtmp</jwplayer:type> 
     42                        <jwplayer:streamer>rtmp://fl9.maelstrom.jet-stream.nl:80/vod/</jwplayer:streamer> 
     43                </item> 
     44 
     45                <item> 
     46                        <title>RTMP streaming (FMS)</title> 
     47                        <description>When an FMS 3.5 server is detected, bitrate switching is also continously done while watching the video.</description> 
     48                        <media:group> 
     49                                <media:content bitrate="1600" width="1080" url="videos/8Juv1MVa-67727.mp4" /> 
     50                                <media:content bitrate="1200" width="720" url="videos/8Juv1MVa-485.mp4" /> 
     51                                <media:content bitrate="800" width="480" url="videos/8Juv1MVa-484.mp4" /> 
    3852                                <media:content bitrate="400" width="320" url="videos/8Juv1MVa-483.mp4" /> 
    3953                                <media:thumbnail url="http://content.bitsontherun.com/thumbs/8Juv1MVa-480.jpg" /> 
     
    4357                </item> 
    4458 
    45                 <item> 
    46                         <title>RTMP streaming (fixed GOP)</title> 
    47                         <description>Bitrate switching for RTMP, optimized for dynamic streaming.</description> 
    48                         <media:group> 
    49                                 <media:content bitrate="1500" width="1280" url="videos/bunny_1280.mp4" /> 
    50                                 <media:content bitrate="800" width="720" url="videos/bunny_720.mp4" /> 
    51                                 <media:content bitrate="500" width="480" url="videos/bunny_480.mp4" /> 
    52                                 <media:content bitrate="350" width="320" url="videos/bunny_320.mp4" /> 
    53                                 <media:thumbnail url="http://content.bitsontherun.com/thumbs/nPripu9l-480.jpg" /> 
    54                         </media:group> 
    55                         <jwplayer:type>rtmp</jwplayer:type> 
    56                         <jwplayer:streamer>rtmp://fms.12E5.edgecastcdn.net/0012E5</jwplayer:streamer> 
    57                 </item> 
    58  
    5959        </channel> 
    6060</rss> 
  • testing/index.html

    r390 r394  
    423423                <label>repeat</label> 
    424424                <input type="text" name="repeat" /> 
    425                 <label>rtmp.dynamic</label> 
    426                 <input type="text" name="rtmp.dynamic" /> 
    427425                <label>shuffle</label> 
    428426                <input type="text" name="shuffle" /> 
  • trunk/as3/com/jeroenwijering/models/RTMPModel.as

    r390 r394  
    100100        /** Bandwidth checking for dynamic streaming. **/ 
    101101        private function getBandwidth():void { 
    102                 model.config['bandwidth'] = Math.round(stream.info.maxBytesPerSecond*8/1024); 
     102                try {  
     103                        model.config['bandwidth'] = Math.round(stream.info.maxBytesPerSecond*8/1024); 
     104                } catch(err:Error) {  
     105                        clearInterval(bwinterval); 
     106                } 
    103107                if(getLevel() != model.config['level']) { 
    104108                        swap(); 
     
    195199                        stop(); 
    196200                } 
    197                 if(dat.type == 'bandwidth') { 
    198                         if(dat.bandwidth > 50) { 
    199                                 model.config['bandwidth'] = dat.bandwidth; 
    200                         } 
    201                         if(item['levels'] && !streaming) { 
    202                                 setStream(); 
    203                         } 
     201                if(dat.type == 'bandwidth' && dat.bandwidth > 50) { 
     202                        model.config['bandwidth'] = dat.bandwidth; 
    204203                } 
    205204                if(dat.code == 'NetStream.Play.TransitionComplete') { 
     
    287286                        if(dynamics) { 
    288287                                bwinterval = setInterval(getBandwidth,2000); 
    289                         } else {  
     288                        } else { 
    290289                                bwinterval = setInterval(getBW,20000); 
    291290                        } 
     
    318317                                                TEA.decrypt(evt.info.secureToken,model.config['token'])); 
    319318                                } 
    320                                 checkDynamic(evt.info.data.version); 
     319                                if(evt.info.data) { checkDynamic(evt.info.data.version); } 
    321320                                if(model.config['rtmp.subscribe']) { 
    322321                                        subscribe = setInterval(doSubscribe,1000,getID(item['file'])); 
    323322                                        return; 
    324                                 } else if(item['levels']) { 
    325                                         if(dynamics) { 
    326                                                 setStream(); 
    327                                         } else { 
    328                                                 connection.call("checkBandwidth",null); 
    329                                         } 
    330323                                } else { 
    331324                                        setStream(); 
    332                                         connection.call("getStreamLength",new Responder(streamlengthHandler),getID(item['file'])); 
     325                                        if(!item['levels']) { 
     326                                                connection.call("getStreamLength",new Responder(streamlengthHandler),getID(item['file'])); 
     327                                        } 
    333328                                } 
    334329                                break; 
  • trunk/as3/com/jeroenwijering/player/Model.as

    r388 r394  
    167167        public function sendEvent(typ:String,dat:Object):void { 
    168168                if(typ == ModelEvent.STATE) { 
     169                        if(dat.newstate == config['state']) { return; } 
    169170                        dat['oldstate'] = config['state']; 
    170171                        config['state'] = dat.newstate; 
  • trunk/as3/com/jeroenwijering/player/Player.as

    r391 r394  
    7575                id:undefined, 
    7676                plugins:undefined, 
    77                 version:'4.6.390' 
     77                version:'4.6.394' 
    7878        }; 
    7979        /** Reference to all stage graphics. **/ 
  • trunk/as3/com/jeroenwijering/utils/NetClient.as

    r374 r394  
    2828                dat['type'] = typ; 
    2929                var out:Object = new Object(); 
    30                 for (var i:Object in dat) {  
     30                for (var i:Object in dat) { 
    3131                        out[i] = dat[i]; 
    3232                } 
Note: See TracChangeset for help on using the changeset viewer.