T1911 #754

Merged
merged 2 commits into from Aug 16, 2012

Projects

None yet

3 participants

@dseif
Member
dseif commented Aug 9, 2012

No description provided.

@jbuck
Member
jbuck commented Aug 9, 2012

/botio check

@ghost
ghost commented Aug 9, 2012

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
Member
jbuck commented Aug 9, 2012

/botio preview

@ghost
ghost commented Aug 9, 2012

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
ghost commented Aug 9, 2012

From: Bot.io (butyr.org)


Failed

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

Total script time: 0.65 mins

@ghost
ghost commented Aug 9, 2012

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
Member
jbuck commented Aug 9, 2012

/botio check

@ghost
ghost commented Aug 9, 2012

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
ghost commented Aug 9, 2012

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
jbuck Aug 9, 2012 Mozilla member

_this?

@dseif
dseif Aug 13, 2012 Mozilla member

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

@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
jbuck Aug 9, 2012 Mozilla member

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

@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
jbuck Aug 13, 2012 Mozilla member

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

@dseif
dseif Aug 13, 2012 Mozilla member

my bad, will fix

On Mon, Aug 13, 2012 at 3:56 PM, Jon Buckley notifications@github.comwrote:

In templates/basic/config.json:

@@ -36,7 +40,8 @@
"zoink",
"googlemap",
"twitter",

  •  "image"
    
  •  "image",
    
  •  "pause"
    

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


Reply to this email directly or view it on GitHubhttps://github.com/mozilla/butter/pull/754/files#r1365871.

@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
jbuck Aug 15, 2012 Mozilla member

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

@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"
@mjschranz
mjschranz Aug 16, 2012

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
dseif Aug 16, 2012 Mozilla member

ah good call, thanks

@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" ) {
@mjschranz
mjschranz Aug 16, 2012

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

@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"
@mjschranz
mjschranz Aug 16, 2012

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

target: {
  hidden: true
}
@mjschranz

/botio check

@ghost
ghost commented Aug 16, 2012

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
ghost commented Aug 16, 2012

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
ghost commented Aug 16, 2012

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
ghost commented Aug 16, 2012

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