With the development of the video industry, many users have a higher demand for the viewing experience, the previous habit is to download the good in the watch, and now is the hope that 1 minutes do not wait, zui good side watching while downloading, and so the video is finished downloading, that is, we often say "video side download side Play", Previously shared in the Android phone under the use of BT to achieve the edge of the video on the side of the problem, then under the iOS video download side playback can be achieved? Recently received a few inquiries are all about this, so here is a unified note:
Although the original peer-to-face video is PC-side, but in recent years, Android, iOS also have a lot of customers in the gradual use, the effect is much better than the simple HTTP mode, the approximate principle is to achieve this:
1) When playing the magnetic chain, or torrrent file, the player calls the dot-to-peer engine, through the torrent or magnetic chain information, to find the neighboring peer neighbors through tracker, DHT, and then fetch the data.
2) peer gets to the data, through the player can support the protocol, back to the player, the player to see, this is a standard mp4/flv and other video files, so he can play normally
3) When the player is dragging, the peer engine automatically switches the download location and returns the data.
These are not the Android, iOS or PC, but on the mobile side may download speed, detect whether WiFi and other strategic differences. This also benefited from the mobile phone hardware capabilities, because the single hardware, now the mobile phone than many years ago, BT application of the computer environment is still better: before the computer Celeron 1g+128m memory +40g hard disk, now Android phone 6g+128g almost also have 4g+32g, So iOS video edge-to-peer technology hardware environment is completely OK, and many problems in software has long been solved.
iOS video side download side play