1
0
mirror of https://github.com/videojs/video.js.git synced 2025-01-02 06:32:07 +02:00

update loader to support src attribute

This commit is contained in:
Gary Katsevman 2019-01-03 17:21:54 -05:00
parent 0de4757595
commit fb0e6d4923

View File

@ -32,6 +32,15 @@ class MediaLoader extends Component {
super(player, options_, ready);
// if no sources are provides but we have a src attribute, use it. In the source
// loading process, we try to figure out the type, so, use it directly here.
if (
(!options.playerOptions.sources || options.playerOptions.sources.length === 0) &&
options.playerOptions.src
) {
options.playerOptions.sources = [options.playerOptions.src];
}
// If there are no sources when the player is initialized,
// load the first supported playback technology.