-
1. Re: Stop video audio when jumping to another label?
TimJaramillo Apr 26, 2013 9:59 AM (in response to rossfranks)Hey pancreas,
If you want to completely remove the video, (which will stop video and sound), you can use this (you may have to adjust how you reference the "videoHolder" depending on where you're calling it):
sym.$("videoHolder").children().remove();
If you don't want to completely remove the video, this should work:
sym.$("videoHolder")[0].stop(); -
2. Re: Stop video audio when jumping to another label?
rossfranks Apr 30, 2013 4:53 PM (in response to TimJaramillo)Thanks Tim,
you're help is once again appreciated.
The
sym.$("videoHolder").children().remove();
code worked although the other didn't. But you've solved my problem so thanks for that.
-
3. Re: Stop video audio when jumping to another label?
rossfranks Apr 30, 2013 10:08 PM (in response to rossfranks)Actually sorry it's not working.
Say I'm on the 1st video label and I click back to the main menu, then yes the audio stops playing. When I'm at the 2nd video label (which the video has no audio) the 1st video audio does stop, but when I click to the 3rd video label then back to the 2nd video label the 1st video label audio starts playing again
The button to the main menu has code on itself as an object. But the next and back buttons are controlled from the main timeline code, ie...
main menu button is:
sym.$("videoHolder").children().remove();
sym.stop("main");
where as the next button is:
sym.$('btn_next').click(function(){
sym.$("videoHolder").children().remove();
sym.stop("videoLabel2");
});
-
4. Re: Stop video audio when jumping to another label?
TimJaramillo May 1, 2013 9:21 AM (in response to rossfranks)Hey pancreas, it sounds like the code does is in fact work to stop the audio and video, right?
But perhaps in your particular setup, you have multiple videos, so you need to target each video for "stopping", depending on which one is active.
-
5. Re: Stop video audio when jumping to another label?
rossfranks May 1, 2013 4:37 PM (in response to TimJaramillo)Ok tried that too and it's not working either
Here's my file if you want to have a look...
https://dl.dropboxusercontent.com/u/5569346/edge/videoAudio.zip
-
6. Re: Stop video audio when jumping to another label?
TimJaramillo May 1, 2013 5:50 PM (in response to rossfranks)Long story short, my code to stop the video works. The issue is that your click events are getting all mixed up. If you put console.logs in each of your click events, you'll see that once you're at the third video, you are actually calling all three click events (they're stacking up, since they're not being removed).
You need to restructure your file. At Stage.compositionReady, add one click listener to each of your buttons. Add a variable to keep track of "currentVideo", and use that variable to control your functionality on click.
-
7. Re: Stop video audio when jumping to another label?
rossfranks May 1, 2013 6:49 PM (in response to TimJaramillo)Sorry I'm a graphic designer more than a programmer.
Is there any tutorials on how to set listeners up for buttons in the Stage.compositionReady and how to track the "currentVideo" ?
Sorry for my lack of programming skills.
-
8. Re: Stop video audio when jumping to another label?
richard9799 May 9, 2013 1:44 PM (in response to TimJaramillo)I'm having a similar issue...
a bit of newbee as well..
i have poster... when you click on it... go to another part of the timeline... The video in the videoholder loads up. I have an action script....this works great...
// sym.$("name") resolves an Edge Animate element name to a DOM
// element that can be used with jQuery
var element = sym.$("stealin2");
element.html('<video width="715" height="382" \
src="http://www.richardburnschannel.com/storage/stealinmovieLarge.mov" \
type="video/mp4" controls="controls" \
></video>');
above the videoholder, I created a graphic box with an x for stopping the video.
I create a trigger so the when you click on the X the action goes back start location where the videoholder is gone. Thus, back to the poster. However, the video continues to play. Here's the trigger i use, which works to get rid of the videoholder but not stopping the audio in the video.
// play the timeline from the given position (ms or label)
sym.play("start");
I've tried a bunch of these solition but no luck..
rb
-
9. Re: Stop video audio when jumping to another label?
TimJaramillo May 10, 2013 9:46 AM (in response to richard9799)Hi Pancreas,
Here is your revised file. I restructured your project so that all code is at Stage.compositionReady, and the back/next buttons call the code there. This makes debugging much easier, than trying to keep track of code scattered throughout the timeline.
Let me know if you have any Q's.
example:
http://www.timjaramillo.com/code/edge/video_gallery/showreel.html
source:
http://www.timjaramillo.com/code/edge/_source/video_gallery.zip
-
10. Re: Stop video audio when jumping to another label?
rossfranks May 12, 2013 6:44 PM (in response to TimJaramillo)Thanks Tim,
that works great. Now I just gotta work out how to set it up with 4 categories, ie there's 3 more than just "General".
Where do sym.onClickBack = function() and sym.onClickNext = function() get called cause I might need to do four of them, ie sym.onClickNextGen = function(), etc...
-
11. Re: Stop video audio when jumping to another label?
TimJaramillo May 13, 2013 9:18 AM (in response to rossfranks)Hi Pancreas,
"onClickBack" and "onClickNext" are called by the "click" events of your "btn_genNavBack" and "btn_genNavNext" buttons.
-
12. Re: Stop video audio when jumping to another label?
rossfranks May 13, 2013 8:46 PM (in response to TimJaramillo)Ah yes, I swear I checked the code on the buttons and saw nothing, oh well I'm a gumby
Thanks for you're patience and effort Tim, you're a champ!
-
13. Re: Stop video audio when jumping to another label?
TimJaramillo May 13, 2013 9:29 PM (in response to rossfranks)No problem, glad to help!


