T1911 #754

Merged
merged 2 commits into from Aug 16, 2012

3 participants

@dseif
Mozilla member

No description provided.

@jbuck
Mozilla member

/botio check

@ghost

From: Bot.io (butyr.org)


Received

Command cmd_check from @jbuck received. Current queue size: 0

Live output at: http://botio.butyr.org:8000/bb978d1de7d42b9/output.txt

@jbuck
Mozilla member

/botio preview

@ghost

From: Bot.io (butyr.org)


Received

Command cmd_preview from @jbuck received. Current queue size: 1

Live output at: http://botio.butyr.org:8000/3c16a5c5cb01b66/output.txt

@ghost

From: Bot.io (butyr.org)


Failed

Full output at http://botio.butyr.org:8000/bb978d1de7d42b9/output.txt

Total script time: 0.65 mins

@ghost

From: Bot.io (butyr.org)


Success

Full output at http://botio.butyr.org:8000/3c16a5c5cb01b66/output.txt

Total script time: 0.92 mins

Server is running on http://pr754.butyr.org/templates/basic/

@jbuck
Mozilla member

/botio check

@ghost

From: Bot.io (butyr.org)


Received

Command cmd_check from @jbuck received. Current queue size: 0

Live output at: http://botio.butyr.org:8000/4c0d8e490ade9c4/output.txt

@ghost

From: Bot.io (butyr.org)


Success

Full output at http://botio.butyr.org:8000/4c0d8e490ade9c4/output.txt

Total script time: 0.96 mins

@jbuck jbuck and 1 other commented on an outdated diff Aug 9, 2012
templates/assets/plugins/stop/popcorn.stop.js
@@ -0,0 +1,46 @@
+(function( Popcorn ) {
+ Popcorn.plugin( "stop", function() {
+ var _this = this;
+ return {
+ _setup: function( options ) {
+ options.toString = function() {
+ return "Stop " + ( options.duration > 0 ? options.duration : "forever" );
+ };
+ },
+ start: function( event, options ) {
+ this.pause();
@jbuck
Mozilla member
jbuck added a note Aug 9, 2012

_this?

@dseif
Mozilla member
dseif added a note Aug 13, 2012

I only need _this for inside the setTimeout, otherwise I just use this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@jbuck jbuck commented on an outdated diff Aug 9, 2012
templates/assets/plugins/stop/popcorn.stop.js
+ var _this = this;
+ return {
+ _setup: function( options ) {
+ options.toString = function() {
+ return "Stop " + ( options.duration > 0 ? options.duration : "forever" );
+ };
+ },
+ start: function( event, options ) {
+ this.pause();
+ if ( +options.duration > 0 ) {
+ setTimeout(function() {
+ _this.play();
+ }, options.duration * 1000 );
+ }
+ },
+ end: function( event, options ) {
@jbuck
Mozilla member
jbuck added a note Aug 9, 2012

Is it possible to remove this empty end() function?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@jbuck jbuck and 1 other commented on an outdated diff Aug 13, 2012
templates/basic/config.json
@@ -36,7 +40,8 @@
"zoink",
"googlemap",
"twitter",
- "image"
+ "image",
+ "pause"
@jbuck
Mozilla member
jbuck added a note Aug 13, 2012

Shouldn't this be "stop" to match with above?

@dseif
Mozilla member
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@jbuck jbuck commented on the diff Aug 15, 2012
templates/assets/plugins/stop/popcorn.stop.js
+ this.off( "seeked", _seekedFunc );
+ };
+ return {
+ _setup: function( options ) {
+ options.toString = function() {
+ return "Stop " + ( options.duration > 0 ? options.duration : "forever" );
+ };
+ },
+ start: function( event, options ) {
+ // we need to add this on start as well because we can run into a race condition where 'seeked' is fired before
+ // end is fired, or vice versa
+ this.on( "seeked", _seekedFunc );
+ this.pause();
+ if ( +options.duration > 0 ) {
+ _timeout = setTimeout(function() {
+ _this.play();
@jbuck
Mozilla member
jbuck added a note Aug 15, 2012

Add a this.off( ... ) call here too so that the normal case doesn't leak.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@mjschranz mjschranz and 1 other commented on an outdated diff Aug 16, 2012
templates/assets/plugins/stop/popcorn.stop.js
+ "label": "In"
+ },
+ "end": {
+ "elem": "input",
+ "type": "text",
+ "label": "Out"
+ },
+ "duration": {
+ "elem": "input",
+ "type": "number",
+ "label": "Pause Duration (0 = forever)",
+ "units": "seconds",
+ "default": "0"
+ },
+ "target": {
+ "default": "overlay"

remove this and change it to

hidden: true

The plugin itself doesn't use a target, and having this here would confuse the user when a target list is appearing in the editor.

@dseif
Mozilla member
dseif added a note Aug 16, 2012

ah good call, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@mjschranz mjschranz commented on an outdated diff Aug 16, 2012
src/editor/default.js
}
}
}, null, optionsContainer, null, [ "target" ] );
- targetList = _this.createTargetsList( _targets );
- selectElement = targetList.querySelector( "select" );
- // Attach the onchange handler to trackEvent is updated when <select> is changed
- _this.attachSelectChangeHandler( selectElement, trackEvent, "target" );
- optionsContainer.appendChild( targetList );
+ if ( trackEvent.manifest.options.target[ "default" ] !== "hidden" ) {

you mistook my comment for how I wanted it defined :( See below

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@mjschranz mjschranz commented on an outdated diff Aug 16, 2012
templates/assets/plugins/repeat/popcorn.repeat.js
@@ -40,7 +39,7 @@
"label": "Out"
},
"target": {
- "default": "overlay"
+ "default": "hidden"

You don't really want the default here. You just need to specify if you want the target manifest ignored completely.

target: {
  hidden: true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@mjschranz

/botio check

@ghost

From: Bot.io (butyr.org)


Received

Command cmd_check from @mjschranz received. Current queue size: 0

Live output at: http://botio.butyr.org:8000/7b0b37193f8c45e/output.txt

@ghost

From: Bot.io (butyr.org)


Success

Full output at http://botio.butyr.org:8000/7b0b37193f8c45e/output.txt

Total script time: 1.30 mins

@mjschranz

/botio preview

@ghost

From: Bot.io (butyr.org)


Received

Command cmd_preview from @mjschranz received. Current queue size: 0

Live output at: http://botio.butyr.org:8000/4fb866ceb0a978d/output.txt

@ghost

From: Bot.io (butyr.org)


Success

Full output at http://botio.butyr.org:8000/4fb866ceb0a978d/output.txt

Total script time: 0.66 mins

Server is running on http://pr754.butyr.org/templates/basic/
Run the Test Suite: http://pr754.butyr.org/test/

@dseif dseif merged commit 1cb311f into mozilla:master Aug 16, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment