Video - Js - Issue #5581: Requirements
Video - Js - Issue #5581: Requirements
js – Issue #5581
This issue was brought up because autoplay does not work when used with data-setup
or in the video tag itself. In the image below is an example of how to reproduce this
problem:
Requirements
It occurs in Chrome 70 and in the 7.0.4 version of video.js where it only shows a frame
of the video without automatically reproducing it like the image below displays:
Figure 2 - Example of the state of the video even with autoplay activated
Source Code Files
The next file is the one that contains the autoplay functionality and for that reason is
vital to the understanding of the issue:
System Architecture
In order to understand the system in which we are going to work on, we designed this
simple but easily understandable diagram where we can observe the different relations
between every component.
Figure 3 - Videojs system architecture diagram (including files related to the issue)
Design of the fix
In order to automatically start playing the video the autoplay option needs to be
properly defined. The following is a code snippet related to autoplay:
Requirements
It occurs in the 7.2.4 version of video.js where, as we can see below, the screen is
completely black throughout the video and we can only hear it:
player.js – Main class that englobes most of the objects related to the player itself.
video.js – Function used to call the videojs player.
These last files we think are the way to go in order to fix the issue:
System Architecture
In order to understand the system in which we are going to work on, we designed this
simple but easily understandable diagram where we can observe the different relations
between every component.
Figure 8 - Videojs system architecture diagram (including files related to the issue)
Design of the fix
What happens in this issue is that the initial bandwidth is low enough and the video
playlist’s bandwidth is high enough that the initial playlist selector is choosing the
audio-only playlist by default. Once this happens, the source-buffers are made only once
and it only creates an audio source buffer.
Daniel Gomes
Diogo Mendes
Matheus Kozuki