Optimization of Flash Platform Technology (15th) circular buffer and Smart Search

Source: Internet
Author: User

Loop buffer

When loading media content on a mobile device, there may be almost no problems on the desktop computer. For example, you may encounter disk space or memory exhaustion. When a video is loaded, the desktop version of Flash Player 10.1 downloads the entire FLV file (or MP4 File) and caches it to the hard drive. Then play the video from the cached file. Disk Space is seldom used up. In this case, the desktop player stops playing the video. Mobile devices may use up disk space more easily. If the disk space of the device is exhausted, flash player does not stop playing as in the desktop player. Instead, the cached files are repeatedly used from the beginning of the cached file. You can continue watching the video. You cannot search for the video area that has been re-written, except for the beginning of the file. Loop buffering is not enabled by default. Loop buffering can be started during playback. If the video is larger than the disk space or RAM, it can also be started at the start of playback. Flash Player requires that Ram be at least 4 MB and disk space be at least 20 mb.

Note: If the device has sufficient disk space, the mobile version of Flash Player is the same as that on the desktop. Remember that if the device does not have a disk or the disk is full, the buffer in Ram will be used as a rollback. You can set the cache file and RAM buffer size limit during compilation. The structure of some MP4 files requires that the entire file be downloaded before playing. If the disk space is insufficient and MP4 files cannot be played, Flash Player detects these files and stops downloading. It is best not to request to download these files.
As a developer, remember that you can only search within the boundary of the cache stream. If the offset is out of the range, netstream. Seek () sometimes fails.
Netstream. Seek. invalidtime event.


Smart Search

Note: The Smart Search function requires Adobe Flash Media Server 3.5.3.
Flash Player 10.1 introduces a new behavior called smart search, which can improve the user experience when playing video streams. If you search for a target within the buffer boundary, flash player will reuse the buffer to provide instant search. In earlier versions of Flash Player, the buffer zone is not reused. For example, if you play a video from the streaming server and set the buffer time to 20 seconds (netstream. buffertime), the user tries to search 10 seconds in advance, then flash player will discard all the buffered data, instead of reusing the data loaded in the 10 seconds. This behavior forces Flash Player to request new data more frequently from the server, resulting in poor playing performance when the connection speed is slow.

When a user searches forward or backward, Smart Search will reuse the buffer zone, so the playback experience is faster and smoother. One of the advantages of this new behavior is that it can save the bandwidth of video publishers. However, if the search is performed outside the buffer range, a standard action occurs. Flash Player requests new data from the server.
Note: This behavior does not apply to progressive video downloads.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.