Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9167801
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:28:46+00:00 2026-06-17T15:28:46+00:00

I am trying to play a flv video file in flex 4.5 with netStream

  • 0

I am trying to play a flv video file in flex 4.5 with netStream byteArray. What I am doing is below:

  1. Creating a netStream and video object
  2. Attaching a netStream with video
  3. Reading flv file in byteArray
  4. Append byteArray in netStream using “appendBytes” method
  5. Playing video

In this scenario Play, Pause, Stop functionalities are working fine with video.

But when I am trying to seeking in video then it is not working.

You can follow the code what I am doing by clicking on the link http://pastebin.com/fZp0mKDs

Can anybody tell me, where am I am going wrong to implement seeking.

Any code sample or any kind of help would be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T15:28:48+00:00Added an answer on June 17, 2026 at 3:28 pm

    I got, the code below worked in my case

    // onmetadata function get all timestamp and corresponding fileposition..
    function onMetaData(informationObject:Object):void 
    {
        for (var propertyName:String in informationObject) 
        {
            if (propertyName == "keyframes")
            {
                var kfObject:Object = informationObject[propertyName];
                var timeArray:Array = kfObject["times"];
                var filePositionArray:Array = kfObject["filepositions"];
    
                for(var i:int=0;i<timeArray.length;i++)
                {
                    var tagPosition:int = filePositionArray[i];//Read the tag size;
                    var timestamp:Number = timeArray[i];//read the timestamp;
                    tags.push({timestamp:timestamp,tagPosition:tagPosition});
                }
            }
        }
    }
    
    // onseek click get approximate timestamp and its fileposition
    protected function seek_click(seektime:Number):void
    {
        var currentTime:Number = 0;
        var previousTime:Number = 0;
    
        for (var i:int=1; i<tags.length; i++)
        {
            currentTime = tags[i].timestamp;
            previousTime = tags[i-1].timestamp;
    
            if(previousTime < seektime)
            {
                if(seektime < currentTime)
                {
                    seekPos = tags[i-1].tagPosition;
                    stream.seek(previousTime);
                    break;
                }
            }
        }
    }
    
    
    // append bytes on seekposition
    private function netStatusHandler(event:NetStatusEvent):void 
    {
        switch (event.info.code) 
        {
            case "NetStream.Seek.Notify" :
    
            stream.appendBytesAction(NetStreamAppendBytesAction.RESET_SEEK);
            totalfilePositionArray.position = seekPos;
    
            var bytes:filePositionArray = new filePositionArray();
    
            totalfilePositionArray.readBytes(bytes);
            stream.appendBytes(bytes);
    
            stream.resume();
    
            break;
        }
    }
    

    For inject MetaData keyframes into flv file.Use some injector tool, fe. FLV MetaData Injector

    http://www.buraks.com/flvmdi/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to play a video file using JMF but it gives me
I've been trying to set a video as background, I have the flv-file and
I am trying to play a video file with the .mov extension. It is
I'm trying to play a video in a VideoView and I'm failing miserably. I'm
I'm trying to play a youtube video on my Android app, but I can't
I am trying to play a sound in my javascript file document.getElementById(sound).innerHTML = <embed
So I'm trying to play a video and the following code has worked for
I´m trying to play a file located on network at address: string filePath =
I am trying to play video on Direct3D 9 device, using: nVLC - for
PHP + javascript code + flv player: I am trying to play a .flv

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.