![]() ![]() There is currently no reliable method that can determine a videos frame rate unless you know the video frame rate in advance you should display it at the maximum display refresh rate possible on browsers. Using setTimeout will also introduce video shearing created because setTimeout can not be synced to the display hardware. ![]() It uses the setTimeout and a rate of 33.333.ms which setTimeout will round down to 33ms this will cause the frames to be dropped every two seconds and may drop many more if the video frame rate is any higher than 30. The previous answers by user372551 is out of date (December 2010) and has a flaw in the rendering technique used. A mute function (under the video click mute/sound on to toggle sound) and some error checking to catch IE9+ and Edge if they don't have the correct drivers. The demo below has some minor differences to the example. The minor differences are to do with onload events and the fact that you need to render the video every frame or you will only see one frame not the animated frames. ![]() Displaying a video is much the same as displaying an image. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |