We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5518a84 commit 5f7da6eCopy full SHA for 5f7da6e
src/index.js
@@ -14,8 +14,12 @@ const getConfig = (playerOptions = {}, cloudinaryConfig) => {
14
});
15
};
16
17
-const getVideoPlayer = config => (id, playerOptions, ready) =>
18
- new VideoPlayer(id, getConfig(playerOptions, config), ready);
+const getVideoPlayer = config => (id, playerOptions, ready) => {
+ if (playerOptions?.profile) {
19
+ return createVideoPlayerProfile(id, getConfig(playerOptions, config), ready);
20
+ }
21
+ return new VideoPlayer(id, getConfig(playerOptions, config), ready);
22
+};
23
24
const getVideoPlayers = config => (selector, playerOptions, ready) =>
25
VideoPlayer.all(selector, getConfig(playerOptions, config), ready);
0 commit comments