Is is possible to set the buffer size with mediaelement.js?
Is it possible to set a larger buffer size with mediaelement.js?
The idea would be to experiment with trading off a开发者_开发知识库 smoother playback at the cost of a slightly longer startup time,or visa versa.
This isn't possible with the current implementation of MEJS.
As time has passed and Adaptive Bir Rate (ABR) streaming has become much more common, I think it is worth updating to say that while the original question is still valid, ABR provides a method to allow quicker startup at the cost of video quality, or slower startup and better quality.
ABR format streaming essentially means that there is not just a single bit rate.
Multiple bit rate versions of the video are created and each one is broken down into equal length (by time) chunks - e.g. 10 second chunks.
The client player is then able to select the next chunk from the most appropriate bit rate stream for the current network conditions - if the network gets busy it can drop down to a lower bit rate for the next chunk and visa versa if the network is good.
It also allows a video to start more quickly by selecting a low bit rate initially and then to step up to higher bit rates, network conditions allowing, once the video is playing.
You can see a visualisation of the bit rate steps on YouTube by right clicking and looking at the 'stats for nerds' option - see example below:
You can also see the available bit rates, and force the player to select a single one by clicking on the 'wheel' in the bottom right hand corner.
精彩评论