Skip to content
This repository has been archived by the owner on Jan 31, 2018. It is now read-only.

Update track-container.js #1684

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update track-container.js #1684

wants to merge 1 commit into from

Conversation

itamayo
Copy link

@itamayo itamayo commented Oct 16, 2013

When you resize a video track in the track-container area making it shorter/longer from the left side there is a bug. It is not possible to shorten a video track from the beginning it always does from the end.The same thing happens when you try to make it longer.

Now it is possible to shorten/lengthen the video from both sides :

if (trackEvent.popcornOptions.start - newStart > 0 ) sign=sign_(-1);
popcornOptions.from = Math.abs(
Math.abs(trackEvent.popcornOptions.start - (trackEventView.element.offsetLeft / _container.clientWidth * _media.duration))
+ (trackEvent.popcornOptions.from_sign)
);

When you resize a video track in the track-container area making it shorter/longer from the left side there is a bug. It is not possible to shorten a video track from the beginning it always does from the end.The same thing happens when you try to make it longer.

Now it is possible to shorten/lengthen the video from both sides :

 if (trackEvent.popcornOptions.start - newStart > 0 ) sign=sign*(-1);
          popcornOptions.from = Math.abs(
            Math.abs(trackEvent.popcornOptions.start  - (trackEventView.element.offsetLeft / _container.clientWidth * _media.duration))
            + (trackEvent.popcornOptions.from*sign)
          );
@ScottDowne
Copy link
Contributor

Hm, I see your point, but for better or for worse the current functionality was intended. Not sure where I stand yet, but I'm going to play around with your patch, see how it feels, and then get others to take a look.

@ScottDowne
Copy link
Contributor

Trying your patch, there might be some bugs.

If I add a clip starting from the beginning, and change the left drag handle to be in the middle, then seek to just before the left drag handle, the clip should be off, but it is still on.

Also makes non media clip track events, like text, do similar things.

@itamayo
Copy link
Author

itamayo commented Oct 17, 2013

HI ScottDowne ,

First of all thanks for your quick answer.
I have tried to reproduce the scenario that you describe. However the patch
is working for me (I downloaded the lastest version and applied the
candidate patch).

You can find enclosed the video of the test I carried out:
http://150.241.250.4:7443/1684.ogv

http://www.vicomtech.org/
Iñigo Tamayo Uria Ikertzaile Laguntzailea / Investigador Colaborador /
Contributing ResearcherTelebista Digitala eta Multimedia Zerbitzuak /
Televisión Digital y Servicios Multimedia /
Digital TV & Multimedia Services Donostia - San Sebastián -
Spainhttp://www.vicomtech.es/castellano/html/contacto/index.html
http://www.vicomtech.org/
Tel: +[34] 943 30 92 [email protected]
Aviso Legal - Política de
privacidadhttp://www.vicomtech.es/castellano/html/informacion_legal/index.html
/ Lege Oharra - Pribatutasun
politikahttp://www.vicomtech.es/euskera/html/informacion_legal/index.html
/ Legal Notice - Privacy
policyhttp://www.vicomtech.es/ingles/html/informacion_legal/index.html

On Thu, Oct 17, 2013 at 9:07 AM, Iñigo Tamayo [email protected] wrote:

HI ScottDowne ,

First of all thanks for your quick answer.
I have tried to reproduce the scenario that you describe. However the
patch is working for me (I downloaded the lastest version and applied the
candidate patch).

You can find enclosed the video of the test I carried out.

http://www.vicomtech.org/
Iñigo Tamayo Uria Ikertzaile Laguntzailea / Investigador Colaborador /
Contributing ResearcherTelebista Digitala eta Multimedia Zerbitzuak / Televisión Digital y Servicios Multimedia /
Digital TV & Multimedia Services Donostia - San Sebastián - Spainhttp://www.vicomtech.es/castellano/html/contacto/index.html
http://www.vicomtech.org/
Tel: +[34] 943 30 92 [email protected]
Aviso Legal - Política de privacidadhttp://www.vicomtech.es/castellano/html/informacion_legal/index.html
/ Lege Oharra - Pribatutasun politikahttp://www.vicomtech.es/euskera/html/informacion_legal/index.html
/ Legal Notice - Privacy policyhttp://www.vicomtech.es/ingles/html/informacion_legal/index.html

On Wed, Oct 16, 2013 at 6:09 PM, ScottDowne [email protected]:

Trying your patch, there might be some bugs.

If I add a clip starting from the beginning, and change the left drag
handle to be in the middle, then seek to just before the left drag handle,
the clip should be off, but it is still on.

Also makes non media clip track events, like text, do similar things.


Reply to this email directly or view it on GitHubhttps://github.com//pull/1684#issuecomment-26432314
.

@ScottDowne
Copy link
Contributor

I think I see why it's not working for me. I get a sign is undefined error while in chrome.

I also noticed something... unfortunate, and it's not your fault.

We forked the butter repo and do all our work in https://github.com/mozilla/popcorn.webmaker.org

Might be why when I apply your patch, I start getting errors.

@itamayo
Copy link
Author

itamayo commented Oct 17, 2013

Sorry I forgot to initialized sign variable,

var sign=1; must be before if statement

thanks for you attention

http://www.vicomtech.org/
Iñigo Tamayo Uria Ikertzaile Laguntzailea / Investigador Colaborador /
Contributing ResearcherTelebista Digitala eta Multimedia Zerbitzuak /
Televisión Digital y Servicios Multimedia /
Digital TV & Multimedia Services Donostia - San Sebastián -
Spainhttp://www.vicomtech.es/castellano/html/contacto/index.html
http://www.vicomtech.org/
Tel: +[34] 943 30 92 [email protected]
Aviso Legal - Política de
privacidadhttp://www.vicomtech.es/castellano/html/informacion_legal/index.html
/ Lege Oharra - Pribatutasun
politikahttp://www.vicomtech.es/euskera/html/informacion_legal/index.html
/ Legal Notice - Privacy
policyhttp://www.vicomtech.es/ingles/html/informacion_legal/index.html

On Thu, Oct 17, 2013 at 4:29 PM, ScottDowne [email protected]:

I think I see why it's not working for me. I get a sign is undefined error
while in chrome.

I also noticed something... unfortunate, and it's not your fault.

We forked the butter repo and do all our work in
https://github.com/mozilla/popcorn.webmaker.org

Might be why when I apply your patch, I start getting errors.


Reply to this email directly or view it on GitHubhttps://github.com//pull/1684#issuecomment-26510961
.

@ScottDowne
Copy link
Contributor

Cool, working now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants