diff options
author | Sam Potts <sam@potts.es> | 2018-02-05 21:43:32 +1100 |
---|---|---|
committer | Sam Potts <sam@potts.es> | 2018-02-05 21:43:32 +1100 |
commit | 70c9fbdde328141c1d5680536a740da1ca50f0e9 (patch) | |
tree | ccf963c9a902137fac5f368e8fe115fc41eb0e2b /src/js/plugins | |
parent | f3ea31c515dd9631e0268ebd43475e422f9a1ecb (diff) | |
download | plyr-70c9fbdde328141c1d5680536a740da1ca50f0e9.tar.lz plyr-70c9fbdde328141c1d5680536a740da1ca50f0e9.tar.xz plyr-70c9fbdde328141c1d5680536a740da1ca50f0e9.zip |
Removed fetch dependency
Diffstat (limited to 'src/js/plugins')
-rw-r--r-- | src/js/plugins/youtube.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/js/plugins/youtube.js b/src/js/plugins/youtube.js index 429e9eb8..6b4a54bd 100644 --- a/src/js/plugins/youtube.js +++ b/src/js/plugins/youtube.js @@ -59,10 +59,10 @@ const youtube = { if (utils.is.string(key) && !utils.is.empty(key)) { const url = `https://www.googleapis.com/youtube/v3/videos?id=${videoId}&key=${key}&fields=items(snippet(title))&part=snippet`; - fetch(url) - .then(response => (response.ok ? response.json() : null)) + utils + .fetch(url) .then(result => { - if (result !== null && utils.is.object(result)) { + if (utils.is.object(result)) { this.config.title = result.items[0].snippet.title; ui.setTitle.call(this); } |