From 6b281a35335a13cb6f36dbccc51d73c8a38396c9 Mon Sep 17 00:00:00 2001 From: webmiraclepro Date: Mon, 10 Apr 2017 08:52:08 +0800 Subject: [PATCH] Call player.load() when loading files Fixes https://github.com/CookPete/react-player/issues/177 --- src/players/FilePlayer.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/players/FilePlayer.js b/src/players/FilePlayer.js index 8de60e1..7c928bf 100644 --- a/src/players/FilePlayer.js +++ b/src/players/FilePlayer.js @@ -37,6 +37,9 @@ export default class FilePlayer extends Base { } load (url) { this.player.src = url + if (this.props.playing) { + this.player.load() + } } play () { this.player.play()