diff --git a/package-lock.json b/package-lock.json
index 53a55207..57737553 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -17,7 +17,7 @@
},
"devDependencies": {
"@types/node": "^14.0.24",
- "@types/react": "^17.0.0",
+ "@types/react": "^18.2.79",
"auto-changelog": "^2.0.0",
"builder": "file:./scripts/builder",
"c8": "^8.0.1",
@@ -25,9 +25,9 @@
"cross-env": "^7.0.2",
"esbuild": "^0.19.4",
"npm-run-all": "^4.1.5",
- "react": "^16.13.1",
- "react-dom": "^16.13.1",
- "react-test-renderer": "^16.13.1",
+ "react": "^18.2.0",
+ "react-dom": "^18.2.0",
+ "react-test-renderer": "^18.2.0",
"rimraf": "^3.0.2",
"screenfull": "^5.0.2",
"sinon": "^16.0.0",
@@ -35,11 +35,13 @@
"standard": "^17.1.0",
"tester": "file:./scripts/tester",
"ts-standard": "^12.0.2",
- "typescript": "^4.1.2",
+ "typescript": "^5.4.5",
"zora": "^5.2.0"
},
"peerDependencies": {
- "react": ">=16.6.0"
+ "@types/react": "^17.0.0 || ^18",
+ "react": "^17.0.2 || ^18",
+ "react-dom": "^17.0.2 || ^18"
}
},
"node_modules/@aashutoshrathi/word-wrap": {
@@ -669,22 +671,15 @@
"dev": true
},
"node_modules/@types/react": {
- "version": "17.0.67",
- "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.67.tgz",
- "integrity": "sha512-zE76EIJ0Y58Oy9yDX/9csb/NuKjt0Eq2YgWb/8Wxo91YmuLzzbyiRoaqJE9h8iDlsT7n35GdpoLomHlaB1kFbg==",
+ "version": "18.2.79",
+ "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.79.tgz",
+ "integrity": "sha512-RwGAGXPl9kSXwdNTafkOEuFrTBD5SA2B3iEB96xi8+xu5ddUa/cpvyVCSNn+asgLCTHkb5ZxN8gbuibYJi4s1w==",
"dev": true,
"dependencies": {
"@types/prop-types": "*",
- "@types/scheduler": "*",
"csstype": "^3.0.2"
}
},
- "node_modules/@types/scheduler": {
- "version": "0.16.4",
- "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.4.tgz",
- "integrity": "sha512-2L9ifAGl7wmXwP4v3pN4p2FLhD0O1qsJpvKmNin5VA8+UvNVb447UDaAEV6UdrkA+m/Xs58U1RFps44x6TFsVQ==",
- "dev": true
- },
"node_modules/@types/semver": {
"version": "7.5.3",
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.3.tgz",
@@ -4313,32 +4308,28 @@
]
},
"node_modules/react": {
- "version": "16.14.0",
- "resolved": "https://registry.npmjs.org/react/-/react-16.14.0.tgz",
- "integrity": "sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g==",
+ "version": "18.2.0",
+ "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz",
+ "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==",
"dev": true,
"dependencies": {
- "loose-envify": "^1.1.0",
- "object-assign": "^4.1.1",
- "prop-types": "^15.6.2"
+ "loose-envify": "^1.1.0"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/react-dom": {
- "version": "16.14.0",
- "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.14.0.tgz",
- "integrity": "sha512-1gCeQXDLoIqMgqD3IO2Ah9bnf0w9kzhwN5q4FGnHZ67hBm9yePzB5JJAIQCc8x3pFnNlwFq4RidZggNAAkzWWw==",
+ "version": "18.2.0",
+ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz",
+ "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==",
"dev": true,
"dependencies": {
"loose-envify": "^1.1.0",
- "object-assign": "^4.1.1",
- "prop-types": "^15.6.2",
- "scheduler": "^0.19.1"
+ "scheduler": "^0.23.0"
},
"peerDependencies": {
- "react": "^16.14.0"
+ "react": "^18.2.0"
}
},
"node_modules/react-fast-compare": {
@@ -4351,21 +4342,39 @@
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
"integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
},
- "node_modules/react-test-renderer": {
- "version": "16.14.0",
- "resolved": "https://registry.npmjs.org/react-test-renderer/-/react-test-renderer-16.14.0.tgz",
- "integrity": "sha512-L8yPjqPE5CZO6rKsKXRO/rVPiaCOy0tQQJbC+UjPNlobl5mad59lvPjwFsQHTvL03caVDIVr9x9/OSgDe6I5Eg==",
+ "node_modules/react-shallow-renderer": {
+ "version": "16.15.0",
+ "resolved": "https://registry.npmjs.org/react-shallow-renderer/-/react-shallow-renderer-16.15.0.tgz",
+ "integrity": "sha512-oScf2FqQ9LFVQgA73vr86xl2NaOIX73rh+YFqcOp68CWj56tSfgtGKrEbyhCj0rSijyG9M1CYprTh39fBi5hzA==",
"dev": true,
"dependencies": {
"object-assign": "^4.1.1",
- "prop-types": "^15.6.2",
- "react-is": "^16.8.6",
- "scheduler": "^0.19.1"
+ "react-is": "^16.12.0 || ^17.0.0 || ^18.0.0"
+ },
+ "peerDependencies": {
+ "react": "^16.0.0 || ^17.0.0 || ^18.0.0"
+ }
+ },
+ "node_modules/react-test-renderer": {
+ "version": "18.2.0",
+ "resolved": "https://registry.npmjs.org/react-test-renderer/-/react-test-renderer-18.2.0.tgz",
+ "integrity": "sha512-JWD+aQ0lh2gvh4NM3bBM42Kx+XybOxCpgYK7F8ugAlpaTSnWsX+39Z4XkOykGZAHrjwwTZT3x3KxswVWxHPUqA==",
+ "dev": true,
+ "dependencies": {
+ "react-is": "^18.2.0",
+ "react-shallow-renderer": "^16.15.0",
+ "scheduler": "^0.23.0"
},
"peerDependencies": {
- "react": "^16.14.0"
+ "react": "^18.2.0"
}
},
+ "node_modules/react-test-renderer/node_modules/react-is": {
+ "version": "18.2.0",
+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz",
+ "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==",
+ "dev": true
+ },
"node_modules/read-pkg": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz",
@@ -4625,13 +4634,12 @@
}
},
"node_modules/scheduler": {
- "version": "0.19.1",
- "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.19.1.tgz",
- "integrity": "sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA==",
+ "version": "0.23.0",
+ "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz",
+ "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==",
"dev": true,
"dependencies": {
- "loose-envify": "^1.1.0",
- "object-assign": "^4.1.1"
+ "loose-envify": "^1.1.0"
}
},
"node_modules/screenfull": {
@@ -5458,16 +5466,16 @@
"dev": true
},
"node_modules/typescript": {
- "version": "4.9.5",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz",
- "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==",
+ "version": "5.4.5",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz",
+ "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==",
"dev": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
},
"engines": {
- "node": ">=4.2.0"
+ "node": ">=14.17"
}
},
"node_modules/uglify-js": {
diff --git a/package.json b/package.json
index a714447a..2b5aa1b9 100644
--- a/package.json
+++ b/package.json
@@ -18,9 +18,18 @@
"main": "dist/index.js",
"type": "module",
"exports": {
- ".": "./dist/index.js",
- "./lazy": "./dist/lazy/index.js",
- "./*": "./dist/*.js"
+ ".": {
+ "default": "./dist/index.js",
+ "types": "./dist/index.d.ts"
+ },
+ "./lazy": {
+ "default": "./dist/lazy/index.js",
+ "types": "./dist/lazy/index.d.ts"
+ },
+ "./*": {
+ "default": "./dist/*.js",
+ "types": "./dist/*.d.ts"
+ }
},
"scripts": {
"clean": "rimraf dist demo coverage",
@@ -43,11 +52,13 @@
"postpublish": "npm run clean"
},
"peerDependencies": {
- "react": ">=16.6.0"
+ "@types/react": "^17.0.0 || ^18",
+ "react": "^17.0.2 || ^18",
+ "react-dom": "^17.0.2 || ^18"
},
"devDependencies": {
"@types/node": "^14.0.24",
- "@types/react": "^17.0.0",
+ "@types/react": "^18.2.79",
"auto-changelog": "^2.0.0",
"builder": "file:./scripts/builder",
"c8": "^8.0.1",
@@ -55,9 +66,9 @@
"cross-env": "^7.0.2",
"esbuild": "^0.19.4",
"npm-run-all": "^4.1.5",
- "react": "^16.13.1",
- "react-dom": "^16.13.1",
- "react-test-renderer": "^16.13.1",
+ "react": "^18.2.0",
+ "react-dom": "^18.2.0",
+ "react-test-renderer": "^18.2.0",
"rimraf": "^3.0.2",
"screenfull": "^5.0.2",
"sinon": "^16.0.0",
@@ -65,7 +76,7 @@
"standard": "^17.1.0",
"tester": "file:./scripts/tester",
"ts-standard": "^12.0.2",
- "typescript": "^4.1.2",
+ "typescript": "^5.4.5",
"zora": "^5.2.0"
},
"dependencies": {
diff --git a/src/Player.js b/src/Player.js
index b90afbad..c7f4513f 100644
--- a/src/Player.js
+++ b/src/Player.js
@@ -1,8 +1,8 @@
import React, { Component } from 'react'
import isEqual from 'react-fast-compare'
-import { propTypes, defaultProps } from './props'
-import { isMediaStream } from './utils'
+import { propTypes, defaultProps } from './props.js'
+import { isMediaStream } from './utils.js'
const SEEK_ON_PLAY_EXPIRY = 5000
diff --git a/src/ReactPlayer.js b/src/ReactPlayer.js
index fa1ae2f0..1dcb0821 100644
--- a/src/ReactPlayer.js
+++ b/src/ReactPlayer.js
@@ -3,11 +3,11 @@ import merge from 'deepmerge'
import memoize from 'memoize-one'
import isEqual from 'react-fast-compare'
-import { propTypes, defaultProps } from './props'
-import { omit, lazy } from './utils'
-import Player from './Player'
+import { propTypes, defaultProps } from './props.js'
+import { omit, lazy } from './utils.js'
+import Player from './Player.js'
-const Preview = lazy(() => import(/* webpackChunkName: 'reactPlayerPreview' */'./Preview'))
+const Preview = lazy(() => import(/* webpackChunkName: 'reactPlayerPreview' */'./Preview.js'))
const SUPPORTED_PROPS = Object.keys(propTypes)
const customPlayers = []
diff --git a/src/index.js b/src/index.js
index 6be6972d..a866a503 100644
--- a/src/index.js
+++ b/src/index.js
@@ -1,5 +1,5 @@
-import players from './players'
-import { createReactPlayer } from './ReactPlayer'
+import players from './players/index.js'
+import { createReactPlayer } from './ReactPlayer.js'
// Fall back to FilePlayer if nothing else can play the URL
const fallback = players[players.length - 1]
diff --git a/src/players/DailyMotion.js b/src/players/DailyMotion.js
index 2d0eb239..b87b0c80 100644
--- a/src/players/DailyMotion.js
+++ b/src/players/DailyMotion.js
@@ -1,7 +1,7 @@
import React, { Component } from 'react'
-import { callPlayer, getSDK, parseStartTime } from '../utils'
-import { canPlay, MATCH_URL_DAILYMOTION } from '../patterns'
+import { callPlayer, getSDK, parseStartTime } from '../utils.js'
+import { canPlay, MATCH_URL_DAILYMOTION } from '../patterns.js'
const SDK_URL = 'https://api.dmcdn.net/all.js'
const SDK_GLOBAL = 'DM'
diff --git a/src/players/Facebook.js b/src/players/Facebook.js
index 2782e877..96c40b28 100644
--- a/src/players/Facebook.js
+++ b/src/players/Facebook.js
@@ -1,7 +1,7 @@
import React, { Component } from 'react'
-import { callPlayer, getSDK, randomString } from '../utils'
-import { canPlay } from '../patterns'
+import { callPlayer, getSDK, randomString } from '../utils.js'
+import { canPlay } from '../patterns.js'
const SDK_URL = 'https://connect.facebook.net/en_US/sdk.js'
const SDK_GLOBAL = 'FB'
diff --git a/src/players/FilePlayer.js b/src/players/FilePlayer.js
index a9750fc5..14fb5376 100644
--- a/src/players/FilePlayer.js
+++ b/src/players/FilePlayer.js
@@ -1,7 +1,7 @@
import React, { Component } from 'react'
-import { getSDK, isMediaStream, supportsWebKitPresentationMode } from '../utils'
-import { canPlay, AUDIO_EXTENSIONS, HLS_EXTENSIONS, DASH_EXTENSIONS, FLV_EXTENSIONS } from '../patterns'
+import { getSDK, isMediaStream, supportsWebKitPresentationMode } from '../utils.js'
+import { canPlay, AUDIO_EXTENSIONS, HLS_EXTENSIONS, DASH_EXTENSIONS, FLV_EXTENSIONS } from '../patterns.js'
const HAS_NAVIGATOR = typeof navigator !== 'undefined'
const IS_IPAD_PRO = HAS_NAVIGATOR && navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1
diff --git a/src/players/Kaltura.js b/src/players/Kaltura.js
index 4270b23f..28d4aacf 100644
--- a/src/players/Kaltura.js
+++ b/src/players/Kaltura.js
@@ -1,7 +1,7 @@
import React, { Component } from 'react'
-import { callPlayer, getSDK } from '../utils'
-import { canPlay } from '../patterns'
+import { callPlayer, getSDK } from '../utils.js'
+import { canPlay } from '../patterns.js'
const SDK_URL = 'https://cdn.embed.ly/player-0.1.0.min.js'
const SDK_GLOBAL = 'playerjs'
diff --git a/src/players/Mixcloud.js b/src/players/Mixcloud.js
index 28097062..a81b437e 100644
--- a/src/players/Mixcloud.js
+++ b/src/players/Mixcloud.js
@@ -1,7 +1,7 @@
import React, { Component } from 'react'
-import { callPlayer, getSDK, queryString } from '../utils'
-import { canPlay, MATCH_URL_MIXCLOUD } from '../patterns'
+import { callPlayer, getSDK, queryString } from '../utils.js'
+import { canPlay, MATCH_URL_MIXCLOUD } from '../patterns.js'
const SDK_URL = 'https://widget.mixcloud.com/media/js/widgetApi.js'
const SDK_GLOBAL = 'Mixcloud'
diff --git a/src/players/Mux.js b/src/players/Mux.js
index eaeac153..cda916c9 100644
--- a/src/players/Mux.js
+++ b/src/players/Mux.js
@@ -1,6 +1,6 @@
import React, { Component } from 'react'
-import { canPlay, MATCH_URL_MUX } from '../patterns'
+import { canPlay, MATCH_URL_MUX } from '../patterns.js'
const SDK_URL = 'https://cdn.jsdelivr.net/npm/@mux/mux-player@VERSION/dist/mux-player.mjs'
diff --git a/src/players/SoundCloud.js b/src/players/SoundCloud.js
index 69f84a0f..a87e0d3e 100644
--- a/src/players/SoundCloud.js
+++ b/src/players/SoundCloud.js
@@ -1,7 +1,7 @@
import React, { Component } from 'react'
-import { callPlayer, getSDK } from '../utils'
-import { canPlay } from '../patterns'
+import { callPlayer, getSDK } from '../utils.js'
+import { canPlay } from '../patterns.js'
const SDK_URL = 'https://w.soundcloud.com/player/api.js'
const SDK_GLOBAL = 'SC'
diff --git a/src/players/Streamable.js b/src/players/Streamable.js
index 1c5b0710..5a0d6b47 100644
--- a/src/players/Streamable.js
+++ b/src/players/Streamable.js
@@ -1,7 +1,7 @@
import React, { Component } from 'react'
-import { callPlayer, getSDK } from '../utils'
-import { canPlay, MATCH_URL_STREAMABLE } from '../patterns'
+import { callPlayer, getSDK } from '../utils.js'
+import { canPlay, MATCH_URL_STREAMABLE } from '../patterns.js'
const SDK_URL = 'https://cdn.embed.ly/player-0.1.0.min.js'
const SDK_GLOBAL = 'playerjs'
diff --git a/src/players/Twitch.js b/src/players/Twitch.js
index 3ff8d75f..bf933bd1 100644
--- a/src/players/Twitch.js
+++ b/src/players/Twitch.js
@@ -1,7 +1,7 @@
import React, { Component } from 'react'
-import { callPlayer, getSDK, parseStartTime, randomString } from '../utils'
-import { canPlay, MATCH_URL_TWITCH_CHANNEL, MATCH_URL_TWITCH_VIDEO } from '../patterns'
+import { callPlayer, getSDK, parseStartTime, randomString } from '../utils.js'
+import { canPlay, MATCH_URL_TWITCH_CHANNEL, MATCH_URL_TWITCH_VIDEO } from '../patterns.js'
const SDK_URL = 'https://player.twitch.tv/js/embed/v1.js'
const SDK_GLOBAL = 'Twitch'
diff --git a/src/players/Vidyard.js b/src/players/Vidyard.js
index acabd979..c8c93917 100644
--- a/src/players/Vidyard.js
+++ b/src/players/Vidyard.js
@@ -1,7 +1,7 @@
import React, { Component } from 'react'
-import { callPlayer, getSDK } from '../utils'
-import { canPlay, MATCH_URL_VIDYARD } from '../patterns'
+import { callPlayer, getSDK } from '../utils.js'
+import { canPlay, MATCH_URL_VIDYARD } from '../patterns.js'
const SDK_URL = 'https://play.vidyard.com/embed/v4.js'
const SDK_GLOBAL = 'VidyardV4'
diff --git a/src/players/Vimeo.js b/src/players/Vimeo.js
index 9d4fc27e..a45d8715 100644
--- a/src/players/Vimeo.js
+++ b/src/players/Vimeo.js
@@ -1,7 +1,7 @@
import React, { Component } from 'react'
-import { callPlayer, getSDK } from '../utils'
-import { canPlay } from '../patterns'
+import { callPlayer, getSDK } from '../utils.js'
+import { canPlay } from '../patterns.js'
const SDK_URL = 'https://player.vimeo.com/api/player.js'
const SDK_GLOBAL = 'Vimeo'
diff --git a/src/players/Wistia.js b/src/players/Wistia.js
index bfc06519..daa17ca8 100644
--- a/src/players/Wistia.js
+++ b/src/players/Wistia.js
@@ -1,7 +1,7 @@
import React, { Component } from 'react'
-import { callPlayer, getSDK, randomString } from '../utils'
-import { canPlay, MATCH_URL_WISTIA } from '../patterns'
+import { callPlayer, getSDK, randomString } from '../utils.js'
+import { canPlay, MATCH_URL_WISTIA } from '../patterns.js'
const SDK_URL = 'https://fast.wistia.com/assets/external/E-v1.js'
const SDK_GLOBAL = 'Wistia'
diff --git a/src/players/YouTube.js b/src/players/YouTube.js
index 8498c617..c6482fe8 100644
--- a/src/players/YouTube.js
+++ b/src/players/YouTube.js
@@ -1,7 +1,7 @@
import React, { Component } from 'react'
-import { callPlayer, getSDK, parseStartTime, parseEndTime } from '../utils'
-import { canPlay, MATCH_URL_YOUTUBE } from '../patterns'
+import { callPlayer, getSDK, parseStartTime, parseEndTime } from '../utils.js'
+import { canPlay, MATCH_URL_YOUTUBE } from '../patterns.js'
const SDK_URL = 'https://www.youtube.com/iframe_api'
const SDK_GLOBAL = 'YT'
diff --git a/src/players/index.js b/src/players/index.js
index bc88fa3d..06658717 100644
--- a/src/players/index.js
+++ b/src/players/index.js
@@ -6,73 +6,73 @@ export default [
key: 'youtube',
name: 'YouTube',
canPlay: canPlay.youtube,
- lazyPlayer: lazy(() => import(/* webpackChunkName: 'reactPlayerYouTube' */'./YouTube'))
+ lazyPlayer: lazy(() => import(/* webpackChunkName: 'reactPlayerYouTube' */'./YouTube.js'))
},
{
key: 'soundcloud',
name: 'SoundCloud',
canPlay: canPlay.soundcloud,
- lazyPlayer: lazy(() => import(/* webpackChunkName: 'reactPlayerSoundCloud' */'./SoundCloud'))
+ lazyPlayer: lazy(() => import(/* webpackChunkName: 'reactPlayerSoundCloud' */'./SoundCloud.js'))
},
{
key: 'vimeo',
name: 'Vimeo',
canPlay: canPlay.vimeo,
- lazyPlayer: lazy(() => import(/* webpackChunkName: 'reactPlayerVimeo' */'./Vimeo'))
+ lazyPlayer: lazy(() => import(/* webpackChunkName: 'reactPlayerVimeo' */'./Vimeo.js'))
},
{
key: 'mux',
name: 'Mux',
canPlay: canPlay.mux,
- lazyPlayer: lazy(() => import(/* webpackChunkName: 'reactPlayerMux' */'./Mux'))
+ lazyPlayer: lazy(() => import(/* webpackChunkName: 'reactPlayerMux' */'./Mux.js'))
},
{
key: 'facebook',
name: 'Facebook',
canPlay: canPlay.facebook,
- lazyPlayer: lazy(() => import(/* webpackChunkName: 'reactPlayerFacebook' */'./Facebook'))
+ lazyPlayer: lazy(() => import(/* webpackChunkName: 'reactPlayerFacebook' */'./Facebook.js'))
},
{
key: 'streamable',
name: 'Streamable',
canPlay: canPlay.streamable,
- lazyPlayer: lazy(() => import(/* webpackChunkName: 'reactPlayerStreamable' */'./Streamable'))
+ lazyPlayer: lazy(() => import(/* webpackChunkName: 'reactPlayerStreamable' */'./Streamable.js'))
},
{
key: 'wistia',
name: 'Wistia',
canPlay: canPlay.wistia,
- lazyPlayer: lazy(() => import(/* webpackChunkName: 'reactPlayerWistia' */'./Wistia'))
+ lazyPlayer: lazy(() => import(/* webpackChunkName: 'reactPlayerWistia' */'./Wistia.js'))
},
{
key: 'twitch',
name: 'Twitch',
canPlay: canPlay.twitch,
- lazyPlayer: lazy(() => import(/* webpackChunkName: 'reactPlayerTwitch' */'./Twitch'))
+ lazyPlayer: lazy(() => import(/* webpackChunkName: 'reactPlayerTwitch' */'./Twitch.js'))
},
{
key: 'dailymotion',
name: 'DailyMotion',
canPlay: canPlay.dailymotion,
- lazyPlayer: lazy(() => import(/* webpackChunkName: 'reactPlayerDailyMotion' */'./DailyMotion'))
+ lazyPlayer: lazy(() => import(/* webpackChunkName: 'reactPlayerDailyMotion' */'./DailyMotion.js'))
},
{
key: 'mixcloud',
name: 'Mixcloud',
canPlay: canPlay.mixcloud,
- lazyPlayer: lazy(() => import(/* webpackChunkName: 'reactPlayerMixcloud' */'./Mixcloud'))
+ lazyPlayer: lazy(() => import(/* webpackChunkName: 'reactPlayerMixcloud' */'./Mixcloud.js'))
},
{
key: 'vidyard',
name: 'Vidyard',
canPlay: canPlay.vidyard,
- lazyPlayer: lazy(() => import(/* webpackChunkName: 'reactPlayerVidyard' */'./Vidyard'))
+ lazyPlayer: lazy(() => import(/* webpackChunkName: 'reactPlayerVidyard' */'./Vidyard.js'))
},
{
key: 'kaltura',
name: 'Kaltura',
canPlay: canPlay.kaltura,
- lazyPlayer: lazy(() => import(/* webpackChunkName: 'reactPlayerKaltura' */'./Kaltura'))
+ lazyPlayer: lazy(() => import(/* webpackChunkName: 'reactPlayerKaltura' */'./Kaltura.js'))
},
{
key: 'file',
@@ -81,6 +81,6 @@ export default [
canEnablePIP: url => {
return canPlay.file(url) && (document.pictureInPictureEnabled || supportsWebKitPresentationMode()) && !AUDIO_EXTENSIONS.test(url)
},
- lazyPlayer: lazy(() => import(/* webpackChunkName: 'reactPlayerFilePlayer' */'./FilePlayer'))
+ lazyPlayer: lazy(() => import(/* webpackChunkName: 'reactPlayerFilePlayer' */'./FilePlayer.js'))
}
]
diff --git a/src/standalone.js b/src/standalone.js
index e6fc84c6..ddf56597 100644
--- a/src/standalone.js
+++ b/src/standalone.js
@@ -1,6 +1,6 @@
import React from 'react'
import { render } from 'react-dom'
-import ReactPlayer from './index'
+import ReactPlayer from './index.js'
export default function renderReactPlayer (container, props) {
render(, container)
diff --git a/types/base.d.ts b/types/base.d.ts
index abc45ea4..5076332c 100644
--- a/types/base.d.ts
+++ b/types/base.d.ts
@@ -5,7 +5,7 @@ import {
ComponentType,
ReactNode
} from 'react'
-import ReactPlayer from './'
+import ReactPlayer from './index.js'
interface SourceProps {
media?: string
diff --git a/types/dailymotion.d.ts b/types/dailymotion.d.ts
index 31d15711..067939ba 100644
--- a/types/dailymotion.d.ts
+++ b/types/dailymotion.d.ts
@@ -1,4 +1,4 @@
-import BaseReactPlayer, { BaseReactPlayerProps } from './base'
+import BaseReactPlayer, { BaseReactPlayerProps } from './base.js'
export interface DailyMotionConfig {
params?: Record
diff --git a/types/facebook.d.ts b/types/facebook.d.ts
index 5d1428be..767c7df0 100644
--- a/types/facebook.d.ts
+++ b/types/facebook.d.ts
@@ -1,4 +1,4 @@
-import BaseReactPlayer, { BaseReactPlayerProps } from './base'
+import BaseReactPlayer, { BaseReactPlayerProps } from './base.js'
export interface FacebookConfig {
appId?: string
diff --git a/types/file.d.ts b/types/file.d.ts
index 8df37fc4..557a4396 100644
--- a/types/file.d.ts
+++ b/types/file.d.ts
@@ -1,4 +1,4 @@
-import BaseReactPlayer, { BaseReactPlayerProps } from './base'
+import BaseReactPlayer, { BaseReactPlayerProps } from './base.js'
export interface TrackProps {
kind: string
diff --git a/types/index.d.ts b/types/index.d.ts
index 39af0726..f5e3f770 100644
--- a/types/index.d.ts
+++ b/types/index.d.ts
@@ -1,15 +1,15 @@
-import BaseReactPlayer, { BaseReactPlayerProps } from './base'
+import BaseReactPlayer, { BaseReactPlayerProps } from './base.js'
-import { DailyMotionConfig } from './dailymotion'
-import { FacebookConfig } from './facebook'
-import { FileConfig } from './file'
-import { MixcloudConfig } from './mixcloud'
-import { SoundCloudConfig } from './soundcloud'
-import { TwitchConfig } from './twitch'
-import { VidyardConfig } from './vidyard'
-import { VimeoConfig } from './vimeo'
-import { WistiaConfig } from './wistia'
-import { YouTubeConfig } from './youtube'
+import { DailyMotionConfig } from './dailymotion.js'
+import { FacebookConfig } from './facebook.js'
+import { FileConfig } from './file.js'
+import { MixcloudConfig } from './mixcloud.js'
+import { SoundCloudConfig } from './soundcloud.js'
+import { TwitchConfig } from './twitch.js'
+import { VidyardConfig } from './vidyard.js'
+import { VimeoConfig } from './vimeo.js'
+import { WistiaConfig } from './wistia.js'
+import { YouTubeConfig } from './youtube.js'
export interface Config {
soundcloud?: SoundCloudConfig
diff --git a/types/kaltura.d.ts b/types/kaltura.d.ts
index 003c4cac..1db75804 100644
--- a/types/kaltura.d.ts
+++ b/types/kaltura.d.ts
@@ -1,4 +1,4 @@
-import BaseReactPlayer, { BaseReactPlayerProps } from './base'
+import BaseReactPlayer, { BaseReactPlayerProps } from './base.js'
export interface KalturaPlayerProps extends BaseReactPlayerProps {}
diff --git a/types/lazy/index.d.ts b/types/lazy/index.d.ts
index 000056b8..3df15810 100644
--- a/types/lazy/index.d.ts
+++ b/types/lazy/index.d.ts
@@ -1,2 +1,2 @@
-export * from '../'
-export { default } from '../'
+export * from '../index.js'
+export { default } from '../index.js'
diff --git a/types/mixcloud.d.ts b/types/mixcloud.d.ts
index 03ef55b9..0814e9db 100644
--- a/types/mixcloud.d.ts
+++ b/types/mixcloud.d.ts
@@ -1,4 +1,4 @@
-import BaseReactPlayer, { BaseReactPlayerProps } from './base'
+import BaseReactPlayer, { BaseReactPlayerProps } from './base.js'
export interface MixcloudConfig {
options?: Record
diff --git a/types/soundcloud.d.ts b/types/soundcloud.d.ts
index 36345f9a..20694a94 100644
--- a/types/soundcloud.d.ts
+++ b/types/soundcloud.d.ts
@@ -1,4 +1,4 @@
-import BaseReactPlayer, { BaseReactPlayerProps } from './base'
+import BaseReactPlayer, { BaseReactPlayerProps } from './base.js'
export interface SoundCloudConfig {
options?: Record
diff --git a/types/streamable.d.ts b/types/streamable.d.ts
index 4cf67264..17925bc6 100644
--- a/types/streamable.d.ts
+++ b/types/streamable.d.ts
@@ -1,4 +1,4 @@
-import BaseReactPlayer, { BaseReactPlayerProps } from './base'
+import BaseReactPlayer, { BaseReactPlayerProps } from './base.js'
export interface StreamablePlayerProps extends BaseReactPlayerProps {}
diff --git a/types/twitch.d.ts b/types/twitch.d.ts
index bb849786..6c0778e3 100644
--- a/types/twitch.d.ts
+++ b/types/twitch.d.ts
@@ -1,4 +1,4 @@
-import BaseReactPlayer, { BaseReactPlayerProps } from './base'
+import BaseReactPlayer, { BaseReactPlayerProps } from './base.js'
export interface TwitchConfig {
options?: Record
diff --git a/types/vidyard.d.ts b/types/vidyard.d.ts
index fce9776c..a7dc03eb 100644
--- a/types/vidyard.d.ts
+++ b/types/vidyard.d.ts
@@ -1,4 +1,4 @@
-import BaseReactPlayer, { BaseReactPlayerProps } from './base'
+import BaseReactPlayer, { BaseReactPlayerProps } from './base.js'
export interface VidyardConfig {
options?: Record
diff --git a/types/vimeo.d.ts b/types/vimeo.d.ts
index b136c7d0..50bd5d06 100644
--- a/types/vimeo.d.ts
+++ b/types/vimeo.d.ts
@@ -1,4 +1,4 @@
-import BaseReactPlayer, { BaseReactPlayerProps } from './base'
+import BaseReactPlayer, { BaseReactPlayerProps } from './base.js'
export interface VimeoConfig {
playerOptions?: Record
diff --git a/types/wistia.d.ts b/types/wistia.d.ts
index 594554f0..bd433c41 100644
--- a/types/wistia.d.ts
+++ b/types/wistia.d.ts
@@ -1,4 +1,4 @@
-import BaseReactPlayer, { BaseReactPlayerProps } from './base'
+import BaseReactPlayer, { BaseReactPlayerProps } from './base.js'
export interface WistiaConfig {
options?: Record
diff --git a/types/youtube.d.ts b/types/youtube.d.ts
index a7266369..6fb55da6 100644
--- a/types/youtube.d.ts
+++ b/types/youtube.d.ts
@@ -1,4 +1,4 @@
-import BaseReactPlayer, { BaseReactPlayerProps } from './base'
+import BaseReactPlayer, { BaseReactPlayerProps } from './base.js'
export interface YouTubeConfig {
playerVars?: Record