You will recieve your password to this address. Address is not made public.

Your preferred username that is used when logging in.

Forum user: jjinux In this life we cannot do great things. We can only do small things with great love. -- Mother Teresa http://jjinux.blogspot.com/

Basic information

Registered Oct 29, 2009
Last login Aug 8, 2011
Forum posts 23
Direct URL http://www.flowplayer.org/forum/users/17900

Latest forum posts

Posts:

Registered:

Maybe, maybe not

Posted: Nov 28, 2009

I could try that. However, if I interpret the diff correctly that was used to address this issue, it says, "wait .1 seconds and then call init()". Is that correct? My experience is that "that way lies madness." If you add fixed wait points like that, you're almost always going to end up with weird timing issues. Sorry. I sympathize.

Posts:

Registered:

Use UNIX line endings (CODE PROVIDED)

Posted: Nov 25, 2009

I noticed that a lot of the Flowplayer files use UNIX line endings, whereas some of them use Mac OS 9 CR-only line endings. This breaks a lot of tools like diff. Hence, it's hard for me to see what has changed when changes are made to Flowplayer.

I figured out how to change all the files without breaking anything. I blogged the solution here:http://jjinux.blogspot.com/2009/11/linux-convert-mac-to-unix-line-endings.html . It's actually very simple.

Posts:

Registered:

Yep, same problem

Posted: Nov 25, 2009

I downloaded the latest release.

I hacked the example HTML to add the following which is a good test to see if wmode is working:


<div class="share">
  <a class="addthis_button" href="http://addthis.com/bookmark.php?v=250&pub=xa-4ac5174e21e91a11">
        <img src="http://s7.addthis.com/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/>

  </a>
  <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js?pub=xa-4ac5174e21e91a11"></script>
</div>

Then, I hacked the call to Flowplayer:


	flowplayer("player", {src: "../flowplayer-3.1.5.swf"});

That works. Then I tried:


	flowplayer("player", {src: "../flowplayer-3.1.5.swf",
						  wmode: 'opaque'});

The player just gives me a blank screen.

By the way, I'm viewing the Flowplayer page using a simple Web server. I'm running "python -m SimpleHTTPServer" from within the flowplayer directory. It's working, as long as I don't add wmode.

Posts:

Registered:

BuiltInConfig.as uses unnecessary full imports

Posted: Nov 23, 2009

I'm looking at flowplayer.core's BuiltInConfig.as:


package  {
import org.flowplayer.controls.Controls;
public class BuiltInConfig {
private var controls:org.flowplayer.controls.Controls;
public static const config:Object = {"plugins":{"controls":{"url":"org.flowplayer.controls.Controls"}}}
}
}

I'm pretty new to ActionScript. However, I'm pretty sure you don't need to do an import *and* use a full path in "private var controls:org.flowplayer.controls.Controls". You can do one or the other.

By the way, what happened to the indentation in this file?

Anyway, this isn't a big deal, so feel free to ignore me ;)

Posts:

Registered:

PATCH: Allow plugins to listen for log messages as events

Posted: Nov 23, 2009

Hi, I think it makes sense to make some changes to the way logging works.

First of all, INFO messages should be "lower" than WARN messages. Hence, if you ask for warnings or higher, you shouldn't get info messages.

(Sorry the indentation looks a little strange. There's some tabs vs. spaces fighting going on.)


+    public static const LEVEL_DEBUG:int = 1;
+    public static const LEVEL_INFO:int = 2;
+    public static const LEVEL_WARN:int = 3;
+    public static const LEVEL_ERROR:int = 4;
+    public static const LEVEL_SUPPRESS:int = 5;

Secondly, it'd be nice if the logger could post log messages as events. That way plugins could listen for log messages as events and do useful things like post them to a server for debugging, etc.


commit 645687cfed12f450150f679d1aec09e953f68c74
Author: Shannon -jj Behrens <jjinux@gmail.com>
Date:   Sat Nov 21 19:32:20 2009 -0800

    Improved the way log levels and log events work.

diff --git a/flowplayer.core/src/actionscript/org/flowplayer/util/Log.as b/flowplayer.core/src/actionscript/org/flowplayer/util/Log.as
index 89ff7d4..f33239b 100644
--- a/flowplayer.core/src/actionscript/org/flowplayer/util/Log.as
+++ b/flowplayer.core/src/actionscript/org/flowplayer/util/Log.as
@@ -29,12 +29,20 @@ package org.flowplayer.util {
 	 */
 	public class Log extends EventDispatcher{
 
-		private static const LEVEL_DEBUG:int = 0;
-		private static const LEVEL_WARN:int = 1;
-		private static const LEVEL_INFO:int = 2;
-		private static const LEVEL_ERROR:int = 3;
-		private static const LEVEL_SUPPRESS:int = 4;
+		public static const LEVEL_DEBUG:int = 1;
+		public static const LEVEL_INFO:int = 2;
+		public static const LEVEL_WARN:int = 3;
+		public static const LEVEL_ERROR:int = 4;
+		public static const LEVEL_SUPPRESS:int = 5;
 	
+        public static const LOG_LEVELS:Object = {
+            debug:    LEVEL_DEBUG,
+            info:     LEVEL_INFO,
+            warn:     LEVEL_WARN,
+            error:    LEVEL_ERROR,
+            suppress: LEVEL_SUPPRESS
+        };
+
 		private static var _level:int = LEVEL_ERROR;
 		private static var _filter:String = "*";
 		private static var _instances:Array = new Array();
@@ -83,17 +91,17 @@ package org.flowplayer.util {
 			}
 		}
 
+        public static function lookupLevel(level:String):int {
+            level = level.toLowerCase();
+            if (LOG_LEVELS.hasOwnProperty(level)) {
+                return LOG_LEVELS[level];
+            } else {
+                return LEVEL_ERROR;
+            }
+        }
+
 		public static function set level(level:String):void {
-			if (level == "debug") 
-				_level = LEVEL_DEBUG;
-			else if (level == "warn")
-				_level = LEVEL_WARN;
-			else if (level == "info")
-				_level = LEVEL_INFO;
-			else if (level == "suppress")
-				_level = LEVEL_SUPPRESS;
-			else
-				_level = LEVEL_ERROR;
+            _level = lookupLevel(level);
 		}
 		
 		public static function set filter(filterValue:String):void {
@@ -125,8 +133,6 @@ package org.flowplayer.util {
 		}
 		
 		private function write(writeFunc:Function, msg:String, levelStr:String, rest:Array):void {
-			dispatchEvent(new LogEvent(LogEvent.ON_LOG_EVENT,
-                                       {msg: msg, level: levelStr, rest: rest}));
             if (traceEnabled) {
                 doTrace(msg, levelStr, rest);
             }
@@ -139,6 +145,12 @@ package org.flowplayer.util {
 				trace(msg);
 				trace(e.message);
 			}
+
+            var level:int = lookupLevel(levelStr);
+            var event:LogEvent = new LogEvent(
+                LogEvent.ON_LOG_EVENT, 
+                {msg: msg, levelStr: levelStr, level: level, rest: rest});
+			dispatchEvent(event);
 		}
 
         private function doTrace(msg:String, levelStr:String, rest:Array):void {

This relies on a new file flowplayer.core/src/actionscript/org/flowplayer/util/LogEvent.as:


package org.flowplayer.util {
    import flash.events.Event;

    /**
     * This subclass of Event is used to transmit log messages across the
     * system as events.
     *
     * See also: Log
     */
    public class LogEvent extends Event {
        public static const ON_LOG_EVENT:String = "ON_LOG_EVENT";

        /**
         * This is an object containing: msg, levelStr, level (as an int), and
         * rest.
         */
        public var params:Object;

        public function LogEvent(eventType:String, params:Object) {
            super(eventType);
            this.params = params;
        }
    }
}

(By the way, my two buddies Dan and Jason Seigler came up with this idea.)

Posts:

Registered:

Yep, thanks!

Posted: Nov 23, 2009

Yep, that appears to do the trick. Thanks!

(By the way, the "<include" tag should have a "/>" at the end.)

Posts:

Registered:

Thanks!

Posted: Nov 18, 2009

Thanks!

Posts:

Registered:

Thanks!

Posted: Nov 18, 2009

Thanks for the update!

Posts:

Registered:

Yes, just build-biz

Posted: Nov 17, 2009

> Is this only when you build-biz?

Yes, I think you're right. If I do a one letter change, it'll recompile with "build" but not "build-biz".

> Take a look at the check-uptodate target, and you'll see the src-as-builtin section needs to be added to the uptodate.commercial stanza.

I'm looking, but I don't see what you mean.

Thanks!

Posts:

Registered:

Yes, just build-biz

Posted: Nov 17, 2009

> Is this only when you build-biz?

Yes, I think you're right. If I do a one letter change, it'll recompile with "build" but not "build-biz".

> Take a look at the check-uptodate target, and you'll see the src-as-builtin section needs to be added to the uptodate.commercial stanza.

I'm looking, but I don't see what you mean.

Thanks!

Posts:

Registered:

still suffering

Posted: Nov 14, 2009

Hi, thanks for looking into this.

I updated from svn today, and the problem is still happening for me. I'm using:


$f('player', {
  src: '/flash/flowplayer.swf',
  width: 550,
  height: 322,
  wmode: 'opaque'
}, {...});

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.15) Gecko/2009102815 Ubuntu/9.04 (jaunty) Firefox/3.0.15

flash_player_10_linux_dev.tar.gz

If I remove the wmode, everything works fine. If I don't, I get the spinning circle of death ;)

I looked at the diff. If I interpret it correctly, it said, "wait .1 seconds and then call init()". Don't ya just hate timing bugs? ;)

Posts:

Registered:

Thanks

Posted: Nov 11, 2009

Me too. Thanks for your response.

Posts:

Registered:

Type was not found or was not a compile-time constant: FullScreenOnButton

Posted: Nov 11, 2009

When I build Flowplayer, I stumbled across error messages like:

[exec] Loading configuration file /usr/local/flex_sdk_3.4/frameworks/flex-config.xml
[exec] /home/jj/Work/247fps/git/projector/flowplayer.controls/src/actionscript/org/flowplayer/controls/button/SkinClasses.as(21): col: 32 Error: Type was not found or was not a compile-time constant: FullScreenOnButton.
[exec] 
[exec]             private var foo:fp.FullScreenOnButton;
[exec]                                ^
[exec] 
[exec] /home/jj/Work/247fps/git/projector/flowplayer.controls/src/actionscript/org/flowplayer/controls/button/SkinClasses.as(22): col: 32 Error: Type was not found or was not a compile-time constant: FullScreenOffButton.
[exec] 
[exec]             private var bar:fp.FullScreenOffButton;
[exec]                                ^
[exec] 
[exec] /home/jj/Work/247fps/git/projector/flowplayer.controls/src/actionscript/org/flowplayer/controls/button/SkinClasses.as(23): col: 33 Error: Type was not found or was not a compile-time constant: NextButton.
[exec] 
[exec]             private var next:fp.NextButton;
[exec]        
I don't have my own version of controls or anything like that. I finally figured out that in my build.properties file, I have:

plugin.buildfiles=flowplayer.controls/build.xml,flowplayer.controls/build-tube.xml,flowplayer.controls/build-skinless.xml
plugin.buildfiles isn't mentioned eitherhttp://flowplayer.org/documentation/developer/development-environment.html orhttp://flowplayer.org/documentation/developer/writing-flash-plugins.html. However, the tutorial suggests you have things like flowplayer.controls at the same level as flowplayer.core.

Setting the following fixed my problem:

plugin.buildfiles=../flowplayer.controls/build.xml, 
                  ../flowplayer.controls/build-tube.xml, 
		  ../flowplayer.controls/build-skinless.xml
It might make sense to document this on one of those two pages.

Hopefully that helps other people out there who stumble across this same problem :)

Posts:

Registered:

Editing BuiltInConfig.as does not cause a recompile

Posted: Nov 4, 2009

  1. Compile flowplayer.core.
  2. Edit BuiltInConfig.as in a way that makes it syntactically invalid.
  3. Run "ant" to compile flowplayer.core again.

The compile completes successfully. It should fail. For some reason, ant isn't recognizing that BuiltInConfig.as has changed. If I "touch src/actionscript/org/flowplayer/controller/BufferingState.as", ant does recompile everything. I think somehow it'd be good to tell the build file that stuff depends on BuildInConfig.as.

Posts:

Registered:

What is "props" for?

Posted: Nov 1, 2009

Looking at the code, I also can't figure out what "props" is for. It's being set, but I don't see any place where it's being used.