dcsimg
A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Playing progress using Mr-webcam example.

  1. #1
    Junior Member
    Join Date
    Dec 2006
    Posts
    27

    Playing progress using Mr-webcam example.

    Hi,

    thanks to mr-webcam scample recording-playing back video (though i just use audio) i was capable of recording.

    What i haven´t been able is once i am playing back the recording to get information such as time played so i can show the user.

    The parameter "time" which works ok with the recording stream while you are recording doesn´t work when you are playing back.

    I have tried with bufferLength, bufferTime but nothing seems to make the trick.

  2. #2
    flashcom addict
    Join Date
    Feb 2006
    Posts
    45
    check this and see if helps
    FCS , FMS , Red5 and Wowza application demos online
    see our 18 streaming cameras (including 6 wireless IP cameras)
    8 networked computers some running Windows xp pro others running Linux Centos,The main website running on Sun Colbalt RaQ550 with 1.5 gig of ram using strongbolt software and the latest Centos OS

  3. #3
    Junior Member
    Join Date
    Dec 2006
    Posts
    27
    Hi Mr-webcam,

    I am really grateful to you for your help.

    I have run your sample program (thanks for it) adding the function on the page you told me.

    This is your play function now:
    I don´t have a webcam so i have use just audio.

    function playArchive(){
    if(Record_btn.getLabel() != "Record"){return;}
    Live_video.clear()
    Live_video.attachAudio(live_ns)
    live_ns.play(archiveView_tx.text);
    var buffer_interval:Number = setInterval(checkBufferTime, 100, live_ns);
    }

    function checkBufferTime(my_ns:NetStream):Void {
    var bufferPct:Number = Math.min(Math.round(my_ns.bufferLength/my_ns.bufferTime* 100), 100);
    trace("Length: "+my_ns.bufferLength+"\t"+"Time: "+my_ns.bufferTime+"\t"+"Buffer:"+bufferPct+"% ");
    }

    And this is the result of running it:

    Length: 3.713 Time: 0.1 Buffer:100%
    Length: 3.585 Time: 0.1 Buffer:100%
    Length: 3.389 Time: 0.1 Buffer:100%
    Length: 3.192 Time: 0.1 Buffer:100%
    Length: 3.032 Time: 0.1 Buffer:100%
    Length: 2.84 Time: 0.1 Buffer:100%
    Live
    ----------
    Code: NetStream.Buffer.Full

    Length: 2.648 Time: 0.1 Buffer:100%
    Length: 2.52 Time: 0.1 Buffer:100%
    Length: 2.328 Time: 0.1 Buffer:100%
    Length: 2.136 Time: 0.1 Buffer:100%
    Length: 2.008 Time: 0.1 Buffer:100%
    Length: 1.816 Time: 0.1 Buffer:100%
    Live
    ----------
    Code: NetStream.Play.Stop

    Length: 0 Time: 0.1 Buffer:0%
    Length: 0 Time: 0.1 Buffer:0%
    ...
    //////////////////////////////////////////////////////

    Why are the numbers going down? I need to receive the passage of time: 1sec, 2sec, ...
    How can i do that?

    Thanks. Ed.

  4. #4
    Junior Member
    Join Date
    Dec 2006
    Posts
    27
    HI again,

    i would like to add that when running the recording back the last second or so it is not played. So if i record: one two three four. then i only here: one two three.

    Is it necessary the server to play audio?
    In this player: http://66.249.93.104/translate_c?hl=...language_tools
    I don´t think any server is being used and the audio is streamed (i think).

    Thanks.

  5. #5
    Junior Member
    Join Date
    Dec 2006
    Posts
    27
    Hi,

    I have more information. live_ns.time works ok. I found out now.
    What happens is that if you don´t talk (just audio no video) the sound (or silence) is recorded and sent to the server but live_ns.time doesn´t run.
    Let´s say i record 3 seconds with voice. Then i am silent 7 seconds and then I tallk again. In this case the timer stops at 3 seconds and stay still 7 secondsand resumes at second 10.

    This happens both when recording and playing back which is of course not wanted as time must flow continuously on the display.

    Any ideas how to prevent this from happening or why is this hapenning?

    Thanks.

  6. #6
    flashcom addict
    Join Date
    Feb 2006
    Posts
    45
    This is difficult to see whats happening without being able to see the application, You PM mentioned buttons not working ? can you elaborate on that or better still show us the fla so we may take a look and try to figure this out?
    FCS , FMS , Red5 and Wowza application demos online
    see our 18 streaming cameras (including 6 wireless IP cameras)
    8 networked computers some running Windows xp pro others running Linux Centos,The main website running on Sun Colbalt RaQ550 with 1.5 gig of ram using strongbolt software and the latest Centos OS

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center