Changeset 1214
- Timestamp:
- 08/18/10 10:40:46 (3 years ago)
- Location:
- trunk/fl5
- Files:
-
- 8 edited
-
doc/publishers/javascriptapi.rst (modified) (15 diffs)
-
player.swf (modified) (previous)
-
src/com/longtailvideo/jwplayer/events/MediaEvent.as (modified) (1 diff)
-
src/com/longtailvideo/jwplayer/player/JavascriptAPI.as (modified) (12 diffs)
-
src/com/longtailvideo/jwplayer/player/JavascriptCompatibilityAPI.as (modified) (6 diffs)
-
src/com/longtailvideo/jwplayer/player/PlayerV4Emulation.as (modified) (1 diff)
-
src/com/longtailvideo/jwplayer/player/PlayerVersion.as (modified) (1 diff)
-
src/com/longtailvideo/jwplayer/utils/JavascriptSerialization.as (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/fl5/doc/publishers/javascriptapi.rst
r1135 r1214 119 119 Currently active bitrate level, in case multipe bitrates are supplied to the player. This is only useful for :ref:`httpstreaming` and :ref:`rtmpstreaming`. Note that *0* always refers to the highest quality bitrate. 120 120 121 .. describe:: position122 123 current playback position, in seconds (e.g. *13.2*).124 125 121 .. describe:: state 126 122 … … 192 188 193 189 194 .. describe:: item( index:Number )190 .. describe:: ITEM ( index:Number ) 195 191 196 192 Start playback of a specific item in the playlist. If *index* isn't set, the current playlistitem will start. 197 193 198 .. describe:: link( index:Number )194 .. describe:: LINK ( index:Number ) 199 195 200 196 Navigate to the *link* of a specific item in the playlist. If *index* is not set, the player will navigate to the link of the current playlistitem. 201 197 202 .. describe:: load( url:String )198 .. describe:: LOAD ( url:String ) 203 199 204 200 Load a new media file or playlist into the player. The *url* must always be sent. 205 201 206 .. describe:: mute( state:Boolean )202 .. describe:: MUTE ( state:Boolean ) 207 203 208 204 Mute or unmute the player's sound. If the *state* is not set, muting will be toggled. 209 205 210 .. describe:: next206 .. describe:: NEXT 211 207 212 208 Jump to the next entry in the playlist. No parameters. 213 209 214 .. describe:: play( state:Boolean )210 .. describe:: PLAY ( state:Boolean ) 215 211 216 212 Play (set *state* to *true*) or pause (set *state* to *false*) playback. If the *state* is not set, the player will toggle playback. 217 213 218 .. describe:: prev214 .. describe:: PREV 219 215 220 216 Jump to the previous entry in the playlist. No parameters. 221 217 222 .. describe:: seek( position:Number )218 .. describe:: SEEK ( position:Number ) 223 219 224 220 Seek to a certain position in the currently playing media file. The *position* must be in seconds (e.g. *65* for one minute and five seconds). … … 228 224 Seeking does not work if the player is in the *IDLE* state. Make sure to check the *state* variable before attempting to seek. Additionally, for the *video* media :ref:`provider <mediaformats>`, the player can only seek to portions of the video that are already loaded. Other media providers do not have this additional restriction. 229 225 230 .. describe:: stop226 .. describe:: STOP 231 227 232 228 Stop playback of the current playlist entry and unload it. The player will revert to the *IDLE* state and the poster image will be shown. No parameters. 233 229 234 .. describe:: volume( percentage:Number )230 .. describe:: VOLUME ( percentage:Number ) 235 231 236 232 Change the audio volume of the player to a certain percentage (e.g. *90*). If the player is muted, it will automatically be unmuted when a volume event is sent. … … 243 239 ----------------- 244 240 245 In order to let JavaScript respond to player updates, you can assign listener functions to various events the player fires. An example of such event is the * volume* one, when the volume of the player is changed. The player will call the listener function with one parameter, a *key:value* populated object that contains more info about the event.241 In order to let JavaScript respond to player updates, you can assign listener functions to various events the player fires. An example of such event is the *VOLUME* event, when the volume of the player is changed. The player will call the listener function with one parameter, a *key:value* populated object that contains more info about the event. 246 242 247 243 In the naming of the listener functions, the internal architecture of the JW Player sines through a little. Internally, the player is built using a Mode-View-Controller design pattern: … … 258 254 alert('the playback state is changed from '+obj.oldstate+' to '+obj.newstate); 259 255 }; 260 player.addModelListener(" state","stateTracker");256 player.addModelListener("STATE","stateTracker"); 261 257 262 258 function volumeTracker(obj) { 263 259 alert('the audio volume is changed to: '+obj.percentage'+ percent'); 264 260 }; 265 player.addControllerListener(" volume","volumeTracker");261 player.addControllerListener("VOLUME","volumeTracker"); 266 262 267 263 If you only need to listen to a certain event for a limited amount of time (or just once), use the *removeModelListener()* and removeControllerListener()* functions to unsubscribe your listener function. The syntax is exactly the same: … … 269 265 .. code-block:: html 270 266 271 player.removeModelListener(" state","stateTracker");272 player.removeControllerListener(" volume","volumeTracker");267 player.removeModelListener("STATE","stateTracker"); 268 player.removeControllerListener("VOLUME","volumeTracker"); 273 269 274 270 .. note:: … … 281 277 Here's an overview of all events the *Model* sends. Note that the data of every event contains the *id*, *version* and *client* parameters that are also sent on :ref:`playerReady <javascriptapi>`. 282 278 283 .. describe:: error279 .. describe:: ERROR 284 280 285 281 Fired when a playback error occurs (e.g. when the video is not found or the stream is dropped). Data: … … 287 283 * *message* ( String ): the error message, e.g. *file not found* or *no suiteable playback codec found*. 288 284 289 .. describe:: loaded 290 291 Fired while the player is busy loading the currently playing media item. This event is never sent for :ref:`rtmpstreaming`, since that protocol does not preload content. Data: 292 293 * *loaded* ( Number ): the number of bytes of the media file that are currently loaded. 294 * *total* ( Number ): the total filesize of the media file, in bytes. 295 * *offset* (Number): the byte position of the media file at which loading started. This is always 0, except when using :ref:`httpstreaming`. 296 297 .. describe:: meta 285 .. describe:: BUFFER 286 287 Fired when the player loads some media into its buffer. 288 289 * *percentage* ( Number ): The percentage (0-100) of seconds buffered versus the media's duration. i.e. if the media is 60 seconds long, and half of the video has been buffered, a buffer event will be fired with percentage=50. 290 291 .. describe:: META 298 292 299 293 Fired when metadata on the currently playing media file is received. The exact metadata that is sent with this event varies per individual media file. Here are some examples: … … 334 328 Here's an overview of all events the *Controller* sends. Note that the data of every event contains the *id*, *version* and *client* parameters that are also sent on :ref:`playerReady <javascriptapi>`. 335 329 336 .. describe:: item330 .. describe:: ITEM 337 331 338 332 Fired when the player switches to a new playlist entry. The new item will immediately start playing. Data: … … 340 334 * *index* ( Number ): playlist index of the media file that starts playing. 341 335 342 .. describe:: mute336 .. describe:: MUTE 343 337 344 338 Fired when the player's audio is muted or unmuted. Data: … … 346 340 * *state* ( Boolean ): the new mute state. If *true*, the player is muted. 347 341 348 .. describe:: play342 .. describe:: PLAY 349 343 350 344 Fired when the player toggles playback (playing/paused). Data: … … 352 346 * *state* ( Boolean ): the new playback state. If *true*, the player plays. If *false*, the player pauses. 353 347 354 .. describe:: playlist348 .. describe:: PLAYLIST 355 349 356 350 Fired when a new playlist (a single file is also pushed as a playlist!) has been loaded into the player. Data: … … 358 352 * *playlist* ( Array ): The new playlist. It has exactly the same structure as the return of the *getPlaylist()* call. 359 353 360 .. describe:: resize354 .. describe:: RESIZE 361 355 362 356 Fired when the player is resized. This includes entering/leaving fullscreen mode. Data: … … 366 360 * *width* ( Number ): The overall width of the player. 367 361 368 .. describe:: seek362 .. describe:: SEEK 369 363 370 364 Fired when the player is seeking to a new position in the video/sound/image. Parameters: … … 372 366 * *position* ( Number ): the new position in the file, in seconds (e.g. *150* for two and a half minute). 373 367 374 .. describe:: stop368 .. describe:: STOP 375 369 376 370 Fired when the player stops loading and playing. The playback state will turn to *IDLE* and the position of a video will be set to 0. No data. 377 371 378 .. describe:: volume372 .. describe:: VOLUME 379 373 380 374 Fired when the volume level is changed. Data: -
trunk/fl5/src/com/longtailvideo/jwplayer/events/MediaEvent.as
r960 r1214 163 163 public var bufferPercent:Number = -1; 164 164 public var duration:Number = -1; 165 public var metadata:Object = {};165 public var metadata:Object = null; 166 166 public var position:Number = -1; 167 167 public var offset:Number = 0; -
trunk/fl5/src/com/longtailvideo/jwplayer/player/JavascriptAPI.as
r1207 r1214 33 33 34 34 /** Delay the response to PlayerReady to allow the external interface to initialize in some browsers **/ 35 pr ivatefunction playerReady(evt:PlayerEvent):void {35 protected function playerReady(evt:PlayerEvent):void { 36 36 var timer:Timer = new Timer(50, 1); 37 37 timer.addEventListener(TimerEvent.TIMER_COMPLETE, function(timerEvent:TimerEvent):void { … … 74 74 try { 75 75 // Event handlers 76 ExternalInterface.addCallback(" addEventListener", js_addEventListener);77 ExternalInterface.addCallback(" removeEventListener", js_removeEventListener);76 ExternalInterface.addCallback("jwAddEventListener", js_addEventListener); 77 ExternalInterface.addCallback("jwRemoveEventListener", js_removeEventListener); 78 78 79 79 // Getters 80 ExternalInterface.addCallback(" getBandwidth", js_getBandwidth);81 ExternalInterface.addCallback(" getBuffer", js_getBuffer);82 ExternalInterface.addCallback(" getDuration", js_getDuration);83 ExternalInterface.addCallback(" getFullscreen", js_getFullscreen);84 ExternalInterface.addCallback(" getHeight", js_getHeight);85 ExternalInterface.addCallback(" getLevel", js_getLevel);86 ExternalInterface.addCallback(" getLockState", js_getLockState);87 ExternalInterface.addCallback(" getMute", js_getMute);88 // ExternalInterface.addCallback("getPlaylist", js_getPlaylist); // This is handled by the compatibility API 89 ExternalInterface.addCallback(" getPosition", js_getPosition);90 ExternalInterface.addCallback(" getState", js_getState);91 ExternalInterface.addCallback(" getWidth", js_getWidth);92 ExternalInterface.addCallback(" getVersion", js_getVersion);93 ExternalInterface.addCallback(" getVolume", js_getVolume);80 ExternalInterface.addCallback("jwGetBandwidth", js_getBandwidth); 81 ExternalInterface.addCallback("jwGetBuffer", js_getBuffer); 82 ExternalInterface.addCallback("jwGetDuration", js_getDuration); 83 ExternalInterface.addCallback("jwGetFullscreen", js_getFullscreen); 84 ExternalInterface.addCallback("jwGetHeight", js_getHeight); 85 ExternalInterface.addCallback("jwGetLevel", js_getLevel); 86 ExternalInterface.addCallback("jwGetLockState", js_getLockState); 87 ExternalInterface.addCallback("jwGetMute", js_getMute); 88 ExternalInterface.addCallback("jwGetPlaylist", js_getPlaylist); 89 ExternalInterface.addCallback("jwGetPosition", js_getPosition); 90 ExternalInterface.addCallback("jwGetState", js_getState); 91 ExternalInterface.addCallback("jwGetWidth", js_getWidth); 92 ExternalInterface.addCallback("jwGetVersion", js_getVersion); 93 ExternalInterface.addCallback("jwGetVolume", js_getVolume); 94 94 95 95 // Player API Calls 96 ExternalInterface.addCallback(" play", js_play);97 ExternalInterface.addCallback(" pause", js_pause);98 ExternalInterface.addCallback(" stop", js_stop);99 ExternalInterface.addCallback(" seek", js_seek);100 ExternalInterface.addCallback(" load", js_load);101 ExternalInterface.addCallback(" playlistItem", js_playlistItem);102 ExternalInterface.addCallback(" playlistNext", js_playlistNext);103 ExternalInterface.addCallback(" playlistPrev", js_playlistPrev);104 ExternalInterface.addCallback(" mute", js_mute);105 ExternalInterface.addCallback(" volume", js_volume);96 ExternalInterface.addCallback("jwPlay", js_play); 97 ExternalInterface.addCallback("jwPause", js_pause); 98 ExternalInterface.addCallback("jwStop", js_stop); 99 ExternalInterface.addCallback("jwSeek", js_seek); 100 ExternalInterface.addCallback("jwLoad", js_load); 101 ExternalInterface.addCallback("jwPlaylistItem", js_playlistItem); 102 ExternalInterface.addCallback("jwPlaylistNext", js_playlistNext); 103 ExternalInterface.addCallback("jwPlaylistPrev", js_playlistPrev); 104 ExternalInterface.addCallback("jwMute", js_mute); 105 ExternalInterface.addCallback("jwVolume", js_volume); 106 106 107 107 … … 117 117 ***********************************************/ 118 118 119 pr ivatefunction js_addEventListener(eventType:String, callback:String):void {119 protected function js_addEventListener(eventType:String, callback:String):void { 120 120 if (!_listeners[eventType]) { 121 121 _listeners[eventType] = []; … … 125 125 } 126 126 127 pr ivatefunction js_removeEventListener(eventType:String, callback:String):void {127 protected function js_removeEventListener(eventType:String, callback:String):void { 128 128 var callbacks:Array = _listeners[eventType]; 129 129 if (callbacks) { … … 137 137 138 138 139 pr ivatefunction listenerCallback(evt:PlayerEvent):void {139 protected function listenerCallback(evt:PlayerEvent):void { 140 140 var args:Object; 141 141 142 142 if (evt is MediaEvent) 143 143 args = listnerCallbackMedia(evt as MediaEvent); 144 else if (evt is Play listEvent)144 else if (evt is PlayerStateEvent) 145 145 args = listenerCallbackState(evt as PlayerStateEvent); 146 146 else if (evt is ViewEvent && (evt as ViewEvent).data != null) … … 157 157 } 158 158 159 pr ivatefunction merge(obj1:Object, obj2:Object):Object {159 protected function merge(obj1:Object, obj2:Object):Object { 160 160 var newObj:Object = {}; 161 161 … … 171 171 } 172 172 173 private function listnerCallbackMedia(evt:MediaEvent):Object { 174 switch(evt.type) { 175 case MediaEvent.JWPLAYER_MEDIA_BUFFER: 176 return { 177 bufferPercent: evt.bufferPercent, 178 offset: evt.offset, 179 duration: evt.duration, 180 position: evt.position 181 }; 182 break; 183 case MediaEvent.JWPLAYER_MEDIA_TIME: 184 return { 185 offset: evt.offset, 186 duration: evt.duration, 187 position: evt.position 188 }; 189 break; 190 case MediaEvent.JWPLAYER_MEDIA_VOLUME: 191 return { 192 volume: evt.volume 193 }; 194 break; 195 case MediaEvent.JWPLAYER_MEDIA_MUTE: 196 return { 197 mute: evt.mute 198 }; 199 break; 200 case MediaEvent.JWPLAYER_MEDIA_ERROR: 201 return { 202 message: evt.mute 203 }; 204 break; 205 case MediaEvent.JWPLAYER_MEDIA_META: 206 Logger.log("got metadata: " + Strings.print_r(evt.metadata)); 207 208 return {metadata: evt.metadata}; 209 break; 210 } 211 return {}; 212 } 213 214 215 private function listenerCallbackState(evt:PlayerStateEvent):Object { 173 protected function listnerCallbackMedia(evt:MediaEvent):Object { 174 var returnObj:Object = {}; 175 176 if (evt.bufferPercent >= 0) returnObj.bufferPercent = evt.bufferPercent; 177 if (evt.duration >= 0) returnObj.duration = evt.duration; 178 if (evt.message != undefined) returnObj.message = evt.message; 179 if (evt.metadata != null) returnObj.metadata = evt.metadata; 180 if (evt.offset >= 0) returnObj.offset = evt.offset; 181 if (evt.position >= 0) returnObj.position = evt.position; 182 183 if (evt.type == MediaEvent.JWPLAYER_MEDIA_MUTE) 184 returnObj.mute = evt.mute; 185 186 if (evt.type == MediaEvent.JWPLAYER_MEDIA_VOLUME) 187 returnObj.volume = evt.volume; 188 189 return returnObj; 190 } 191 192 193 protected function listenerCallbackState(evt:PlayerStateEvent):Object { 216 194 if (evt.type == PlayerStateEvent.JWPLAYER_PLAYER_STATE) { 217 195 return { newstate: evt.newstate, oldstate: evt.oldstate }; … … 219 197 } 220 198 221 222 223 199 /*********************************************** 224 200 ** GETTERS ** 225 201 ***********************************************/ 226 202 227 pr ivatefunction js_getBandwidth():Number {203 protected function js_getBandwidth():Number { 228 204 return _player.config.bandwidth; 229 205 } 230 206 231 pr ivatefunction js_getBuffer():Number {207 protected function js_getBuffer():Number { 232 208 return _playerBuffer; 233 209 } 234 210 235 pr ivatefunction js_getDuration():Number {211 protected function js_getDuration():Number { 236 212 return _player.playlist.currentItem.duration; 237 213 } 238 214 239 pr ivatefunction js_getFullscreen():Boolean {215 protected function js_getFullscreen():Boolean { 240 216 return _player.config.fullscreen; 241 217 } 242 218 243 pr ivatefunction js_getHeight():Number {219 protected function js_getHeight():Number { 244 220 return _player.config.height; 245 221 } 246 222 247 pr ivatefunction js_getLevel():Number {223 protected function js_getLevel():Number { 248 224 return _player.playlist.currentItem.currentLevel; 249 225 } 250 226 251 pr ivatefunction js_getLockState():Boolean {227 protected function js_getLockState():Boolean { 252 228 return _player.locked; 253 229 } 254 230 255 pr ivatefunction js_getMute():Boolean {231 protected function js_getMute():Boolean { 256 232 return _player.config.mute; 257 233 } 258 234 259 pr ivatefunction js_getPlaylist():Array {235 protected function js_getPlaylist():Array { 260 236 return JavascriptSerialization.playlistToArray(_player.playlist); 261 237 } 262 238 263 pr ivatefunction js_getPosition():Number {239 protected function js_getPosition():Number { 264 240 return _playerPosition; 265 241 } 266 242 267 pr ivatefunction js_getState():String {243 protected function js_getState():String { 268 244 return _player.state; 269 245 } 270 246 271 pr ivatefunction js_getWidth():Number {247 protected function js_getWidth():Number { 272 248 return _player.config.width; 273 249 } 274 250 275 pr ivatefunction js_getVersion():String {251 protected function js_getVersion():String { 276 252 return _player.version; 277 253 } 278 254 279 pr ivatefunction js_getVolume():Number {255 protected function js_getVolume():Number { 280 256 return _player.config.volume; 281 257 } … … 285 261 ***********************************************/ 286 262 287 pr ivatefunction js_play(playstate:*=null):void {263 protected function js_play(playstate:*=null):void { 288 264 if (playstate != null && playstate != "") { 289 265 if ((playstate is Boolean && playstate === true) || String(playstate).toLowerCase() == "true") { … … 299 275 300 276 301 pr ivatefunction js_pause():void {277 protected function js_pause():void { 302 278 playToggle(); 303 279 } 304 280 305 pr ivatefunction playToggle():void {281 protected function playToggle():void { 306 282 if (_player.state == PlayerState.IDLE || _player.state == PlayerState.PAUSED) { 307 283 _player.play(); … … 311 287 } 312 288 313 pr ivatefunction js_stop():void {289 protected function js_stop():void { 314 290 _player.stop(); 315 291 } 316 292 317 pr ivatefunction js_seek(position:Number=0):void {293 protected function js_seek(position:Number=0):void { 318 294 _player.seek(position); 319 295 } 320 296 321 pr ivatefunction js_load(toLoad:*):void {297 protected function js_load(toLoad:*):void { 322 298 _player.load(toLoad); 323 299 } 324 300 325 pr ivatefunction js_playlistItem(item:Number):void {301 protected function js_playlistItem(item:Number):void { 326 302 _player.playlistItem(item); 327 303 } 328 304 329 pr ivatefunction js_playlistNext():void {305 protected function js_playlistNext():void { 330 306 _player.playlistNext(); 331 307 } 332 308 333 pr ivatefunction js_playlistPrev():void {309 protected function js_playlistPrev():void { 334 310 _player.playlistPrev(); 335 311 } 336 312 337 pr ivatefunction js_mute(mutestate:*=null):void {313 protected function js_mute(mutestate:*=null):void { 338 314 if (mutestate is Boolean) { 339 315 if (Boolean(mutestate)) { … … 347 323 } 348 324 349 pr ivatefunction js_volume(volume:Number):void {325 protected function js_volume(volume:Number):void { 350 326 _player.volume(volume); 351 327 } -
trunk/fl5/src/com/longtailvideo/jwplayer/player/JavascriptCompatibilityAPI.as
r1207 r1214 5 5 import com.jeroenwijering.events.ViewEvent; 6 6 import com.longtailvideo.jwplayer.events.PlayerEvent; 7 import com.longtailvideo.jwplayer.utils.JavascriptSerialization; 7 8 import com.longtailvideo.jwplayer.utils.Logger; 8 9 … … 37 38 ExternalInterface.addCallback("removeViewListener",removeJSViewListener); 38 39 ExternalInterface.addCallback("getConfig",getConfig); 39 ExternalInterface.addCallback("getPlaylist", getPlaylist);40 ExternalInterface.addCallback("getPlaylist",super.js_getPlaylist); 40 41 ExternalInterface.addCallback("getPluginConfig",getJSPluginConfig); 41 42 ExternalInterface.addCallback("loadPlugin",loadPlugin); … … 116 117 117 118 private function getConfig():Object { 118 return stripDots(_emu.config); 119 } 120 121 private function stripDots(obj:Object):Object { 122 var newObj:Object = (obj is Array) ? new Array() : new Object(); 123 for (var i:String in obj) { 124 if (i.indexOf(".") < 0) { 125 if (typeof(obj[i]) == "object") { 126 newObj[i] = stripDots(obj[i]); 127 } else { 128 newObj[i] = obj[i]; 129 } 130 } 131 } 132 return newObj; 133 } 134 135 private function getPlaylist():Object { 136 var arry:Array = []; 137 for each (var obj:Object in _emu.playlist) { 138 arry.push(stripDots(obj)); 139 } 140 return arry; 119 return JavascriptSerialization.stripDots(_emu.config); 141 120 } 142 121 … … 157 136 for each (var callback:String in controllerCallbacks[evt.type]) { 158 137 if (ExternalInterface.available) { 159 ExternalInterface.call(callback, stripDots(evt.data));138 ExternalInterface.call(callback, JavascriptSerialization.stripDots(evt.data)); 160 139 } 161 140 } … … 167 146 for each (var callback:String in modelCallbacks[evt.type]) { 168 147 if (ExternalInterface.available) { 169 ExternalInterface.call(callback, stripDots(evt.data));148 ExternalInterface.call(callback, JavascriptSerialization.stripDots(evt.data)); 170 149 } 171 150 } … … 177 156 for each (var callback:String in viewCallbacks[evt.type]) { 178 157 if (ExternalInterface.available) { 179 ExternalInterface.call(callback, stripDots(evt.data));158 ExternalInterface.call(callback, JavascriptSerialization.stripDots(evt.data)); 180 159 } 181 160 } -
trunk/fl5/src/com/longtailvideo/jwplayer/player/PlayerV4Emulation.as
r1207 r1214 234 234 235 235 public override function addModelListener(type:String, listener:Function):void { 236 modelEventDispatcher.addEventListener(type , listener);236 modelEventDispatcher.addEventListener(type.toUpperCase(), listener); 237 237 } 238 238 public override function removeModelListener(type:String, listener:Function):void { 239 modelEventDispatcher.removeEventListener(type , listener);239 modelEventDispatcher.removeEventListener(type.toUpperCase(), listener); 240 240 } 241 241 242 242 public override function addViewListener(type:String, listener:Function):void { 243 viewEventDispatcher.addEventListener(type , listener);243 viewEventDispatcher.addEventListener(type.toUpperCase(), listener); 244 244 } 245 245 public override function removeViewListener(type:String, listener:Function):void { 246 viewEventDispatcher.removeEventListener(type , listener);246 viewEventDispatcher.removeEventListener(type.toUpperCase(), listener); 247 247 } 248 248 249 249 public override function addControllerListener(type:String, listener:Function):void { 250 controllerEventDispatcher.addEventListener(type , listener);250 controllerEventDispatcher.addEventListener(type.toUpperCase(), listener); 251 251 } 252 252 public override function removeControllerListener(type:String, listener:Function):void { 253 controllerEventDispatcher.removeEventListener(type , listener);253 controllerEventDispatcher.removeEventListener(type.toUpperCase(), listener); 254 254 } 255 255 -
trunk/fl5/src/com/longtailvideo/jwplayer/player/PlayerVersion.as
r1207 r1214 3 3 4 4 public class PlayerVersion { 5 protected static var _version:String = "5.3.12 07";5 protected static var _version:String = "5.3.1214"; 6 6 7 7 public static function get version():String { -
trunk/fl5/src/com/longtailvideo/jwplayer/utils/JavascriptSerialization.as
r1207 r1214 47 47 } 48 48 49 return obj;49 return stripDots(obj); 50 50 } 51 52 public static function stripDots(obj:Object):Object { 53 var newObj:Object = (obj is Array) ? new Array() : new Object(); 54 for (var i:String in obj) { 55 if (i.indexOf(".") < 0) { 56 if (typeof(obj[i]) == "object") { 57 newObj[i] = stripDots(obj[i]); 58 } else { 59 newObj[i] = obj[i]; 60 } 61 } 62 } 63 return newObj; 64 } 65 66 51 67 } 52 68 }
Note: See TracChangeset
for help on using the changeset viewer.
