A progress time bar for the videoplayer plugin

  • Hi all,

    After a lot of scratching the head (I was using the changeorigin(align,edge) before I realized it was not a good way to do *wacko* ), I have finally reached (it seems *wink* ) a working code to create a progress time bar for the videoplayer plugin...
    To make it working, you have to include the videoplayer_timebar.xml file and call the do_time_bar() for example from the onvideoready event of the videoplayer plugin:


    There is some explanation inside the videoplayer_timebar.xml file.
    Here some examples online: ex_1 - ex_2 - ex_3

    Hope you like it... Comments, examples use, improvements are well come...


    @ BBomber
    here a code for video 360:

    SAlut.

  • woah...that´s a nice surprise and even in xml! In times where everybody is taking money for every little thing, it´s really nice to see that there are still people willing to share. Thanks a million *thumbsup*

    Best regards,
    Nupsi

  • Hi all,

    woah...that´s a nice surprise and even in xml! In times where everybody is taking money for every little thing, it´s really nice to see that there are still people willing to share. Thanks a million *thumbsup*

    Best regards,
    Nupsi

    Thank's Nupsi... Sharing is a good the way to learn from others... So *rolleyes* ...

    Really nice! I was just working on something similar for a project. I'll share it also once the deadline is through and I have some more time :P

    I really like the recursive check_for_parents() *thumbsup*

    Graças emediquei... I will wait your own implementation *thumbup* ...

    Hi Tuur *wink* ... ZAPPA was impressive *attention* *thumbsup* ...

    SAlut.

  • OK, first of all...IT WORKS! Man you are a genius! wow....It actually works! very simple and clean! I'm no pro at xml coding and I was able to get this to work on the 1st try!! I cannot thank you enough. I will post a sample 360 video piece for you all later today...I just need to fine tune some things.

    Michel, thank you thank thank you! We all appreciate your hard work and you didn't charge for your time! this is epic!

  • Hello, thank you for the progress bar, it saves my life in the context of my project.

    But I are not understood what the purpose of the parameter% 2
    [code] ifnot (% 2 == null, set (plugin [time_bar]. parent,% 2)) [/ code]

    It serves to position the bar relative to its direct parent? And they are the possible values?

    Then I asked whether it would be possible to run this code on a wonderful video hotspot.

    I would like to combine this with your progress bar code on the flyout from the video.


    Thank you in advance.

  • First of all congratulations for the code.
    It's great. Thank you very much.


    I have tried with krpano 1.0.9 and it doesn't work but with (2011-05-20-krpano10814-viewer-rc3) it works.


    I'm trying to add a pause button in a 360 video.

    I've tried many ways but I can not.
    Below I pass the code I have.



    Where is the mistake?. Can you help?.
    Thank you very much.

  • thank you very much¡¡

    it works¡¡ I'm learning a lot.


    this is the code

  • I´m trying to use your progress bar for the krpano-videoplayer but I can´t get it to work when the parent (the video itself) is aligned to the center. Every other aligning works great, but if I align the video to the center, the seeking is´nt working anymore and the mouseover on the progress bar shows "00:NaN".

    I´ve looked through your code but I just can´t find the problem. It would be really nice if you could help me find the problem. I´m no newbie with krpano, so it´s definitely not that I made something wrong....at least I don´t think so *wink*
    As I said, without setting the video as a parent or aligning the video to the left, top, bottom or right there is no problem. But as soon as I center the video....bamm, not working!

    But the strangest thing is, if I set the video-plugin to the center and offest it just one pixel to the right or left with "x=1/x=-1" it works just fine *confused*

    Thanks a lot and best regards!
    NUPSI

  • Hi Nupsi *smile* ,

    Thanks for your note.
    You are right... But in fact this happen also with all alignment settings not only center as you seem to have experimented *wink* ...
    In fact, (for the parent) any alignment does not work without setting also a value to x... That is because of the align_offset (code between lines 164 to 193) that is calculated by using the plugin[].x value... When x is not set , plugin[].x returns plugin[].x as value, not 0... and that is the reason of the "00:NaN"...
    Also, the use of percent values for x makes bad calculation of the align_offset...
    Conclusion, for the parent, remember to set a value to x (at least 0) and to not use percent...


    nice! will this work for distorted vidos?

    Not as it is... But it is easy to modify the code to make it working for videoplayer as hotspot... If you need it, let me know...


    really great work! and easy to use too!

    Thank you Klaus *smile* , it was a hard challenge for me and has been not easy at all (I was using the changeorigin(align,edge) at first), but it seems I have reached something usable at least... I hope it will work also with the new videoplayer plugin for the krpanoJS...

    SAlut.

    Note: I see that many have downloaded the file, but no one has posted an example usage of it... Please, do not be so timid and shares something to see *cool* ... And better, if some one is able to improve it, please show the result *wink* ...

  • Hi Panomaster,

    I have made similar control panel using draggable plugins. You can watch them at http://ai360.pl/video360/2/......

    I just realized that your example it is also an xml code *smile* ... just great *thumbup* ...

    If I am not in mistake, I think you can enhance it by adding an count_forward() call (after line 39) inside the stopdragging() action:

    Code
    <action name="stopdragging">
    		set(dragging, false);
    		set(seekstop, get(plugin[seek].x));
    		dec(seekstop, 62);
    		div(seekstop, 500);
    		mul(seekstop, get(plugin[video].totaltime));
    		plugin[video].seek(get(seekstop));
    		count_forward();
    		trace(rozpoczynam od: , get(seekstop));
    	</action>


    This way, the seek bar should also be updated after seeking when the player is paused...

    SAlut.

    Edited once, last by michel (August 23, 2011 at 12:40 PM).

  • Thanks a bunch, Michel.


    I cant search anywhere on how to use xml to do the time bar :) so your code helps me learn a lot. So really thank you :)


    However Im facing a prob. As you already know, Your code doesnt support hotspot :( and I kind of want it to.


    I am making a 3D room with TV inside, And As you can guess, the TV will act as a video hotspot where you can watch Video (maybe later I will try to add channels? ;)

    However I would like the TV to have more control other than pause and play. So your time bar is a saver. But it cant be run on hotspot :(  I tried to fix your xml, since you said it is easy to do so :) But I never get close to the result :)) It seems your "easy" is too much for me.


    If you have time, Can you show me how to make it run on hotspots? Thanks A lot.


    PS: While we are at it, Is there a way to make a hotspot link to a video on youtube? If so I think It would be easier to use the video control of youtube? I didnt try it yet, but I think it should be possible?


    Ha

  • Wow!
    This is just impressing! - And another proof for the fact, that literally everything is possible using krpano...

    Big Up to Michel! Really!
    I love this code! (Never thought i would say something like this...)

    When i finished my work on a current project, i will post it for you as an example.
    Double Wow!

    Edit:
    I am done! Here you can see the project I did for Volkswagen, using the amazing plugin:
    http://panographer.de/vw-panorama-fotografien/ (click on the small 360° icon!)

  • Gentlemen, may I ask for another favor?
    I'm trying to build a bit more fancier (following actual standards) version of the time-bar with additional controls in it.
    What I'm missing (and most likely won't get my head around to write it myself) is a code snippet that allows to write the elapsed time (at the beginning) and the total time (at the end) of the bar.
    If I succeed I will be happy to post a complete set including graphics for your convenience.

    Thanks
    Jürgen

  • Hello,

    This is a really great plugin and it was easy to implement but I'm having an issue with flickering time count. Also, it has nothing to do with the plugin but it's probably the same issue, but I noticed that the text for the button to close the video flickers as well. It's something about text displaying at the edge of the video layer.

    I have no idea what it could be and, searching the forums, I haven't seen anyone else complain about it so it must be just something I've done.

    Any help would be most welcome.

    http://www.panowerk.com/panoramas/ganter/tour.html

    http://www.panowerk.com/panoramas/ganter/tour.xml

    http://www.panowerk.com/panoramas/gant…yer_timebar.xml

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!