From 79b1691fc4c490ceed494ba6d7dcfbfd93bdf7b2 Mon Sep 17 00:00:00 2001 From: Pete Cook Date: Thu, 6 Oct 2016 08:30:27 +0100 Subject: [PATCH] Tidy up youtube ref usage --- src/players/YouTube.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/players/YouTube.js b/src/players/YouTube.js index 6dcf221d..1532fdce 100644 --- a/src/players/YouTube.js +++ b/src/players/YouTube.js @@ -61,7 +61,7 @@ export default class YouTube extends Base { } this.loadingSDK = true this.getSDK().then(YT => { - this.player = new YT.Player(this.refNode, { + this.player = new YT.Player(this.container, { width: '100%', height: '100%', videoId: id, @@ -132,9 +132,6 @@ export default class YouTube extends Base { if (!this.isReady || !this.player.getVideoLoadedFraction) return null return this.player.getVideoLoadedFraction() } - setRefNode = (node) => { - this.refNode = node - } render () { const style = { height: '100%', @@ -142,7 +139,7 @@ export default class YouTube extends Base { } return (
-
+
{ this.container = container }} />
) }