{"_id":"@dhvarchilkova/react-jw-player","_rev":"1-598a3e37015a68caa5835672f67662af","name":"@dhvarchilkova/react-jw-player","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@dhvarchilkova/react-jw-player","version":"1.0.0","description":"A React component for launching JW Player instances on the client.","main":"dist/react-jw-player.js","scripts":{"build":"babel src --out-dir dist","clean":"rimraf dist","lint":"eslint .","prepublish":"npm run lint && npm run test && npm run clean && npm run build","test":"npm run lint && npm run test:unit && npm run test:browser","test:unit":"babel-tape-runner ./test/*.test.js* | faucet","test:browser":"babel-tape-runner ./test/*.browser-test.js* | faucet","watch":"babel src --out-dir dist --watch"},"repository":{"type":"git","url":"git+https://github.com/micnews/react-jw-player.git"},"keywords":["react","jwplayer","jw-player","video","autoplay","events"],"author":{"name":"Mic Network, Inc."},"license":"MIT","bugs":{"url":"https://github.com/micnews/react-jw-player/issues"},"homepage":"https://github.com/micnews/react-jw-player#readme","devDependencies":{"babel-cli":"^6.18.0","babel-eslint":"^7.2.3","babel-plugin-transform-object-assign":"^6.22.0","babel-preset-es2015":"^6.18.0","babel-preset-react":"^6.16.0","babel-tape-runner":"^2.0.1","enzyme":"^2.7.0","eslint":"^3.15.0","eslint-config-airbnb":"^13.0.0","eslint-config-mic":"^1.0.0","eslint-plugin-babel":"^4.1.2","eslint-plugin-flowtype":"^2.39.1","eslint-plugin-import":"^2.8.0","eslint-plugin-jsx-a11y":"^2.2.3","eslint-plugin-react":"^6.10.3","faucet":"0.0.1","jsdom":"^9.9.1","jsdom-global":"^2.1.1","miclint":"^4.1.0","prop-types":"^15.5.10","react":"^15.4.1","react-addons-test-utils":"^15.4.1","react-dom":"^15.4.2","react-test-renderer":"^15.4.2","rimraf":"^2.6.3","tape":"^4.6.3"},"peerDependencies":{"prop-types":"^15.5.10","react":"^15.4.1 || ^16.0.0|| ^17.0.0"},"dependencies":{"react-fast-compare":"^2.0.1"},"gitHead":"1d001d7cf18daf32ae8fb26ca70992ff093b846d","_id":"@dhvarchilkova/react-jw-player@1.0.0","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"integrity":"sha512-/Ta8b2aV9H0zlianUk9nuzHvfIDipzwNYm2vunc6LoSbOaelgpbYnCa2y9Dcn7BKKDrxNJqKyCD5L8EEdtSdPA==","shasum":"1b86ca9bff618e328d1c2141cffb2bf2f0ae668f","tarball":"https://registry.npmjs.org/@dhvarchilkova/react-jw-player/-/react-jw-player-1.0.0.tgz","fileCount":24,"unpackedSize":35776,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEN9AC1KPxDue85wXJfSh4PAT9bcNtAH03UunHNklZRUAiEAm7IyCGVL5s4EJ09LwywZ4KGySrEqG4LD71uJyd2fkGg="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi7RsBACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo0Kw//filSAEzSZaXAiUsGK9/5hTG2qK5ALotMkoRmP5Bv2zqHfPez\r\nmIAO5domHyNm0ki+IchS+fdBb3HEiNwP3zIVqdIu2zyvuV4k9ba57W9IpFIE\r\no/LY3XiEGcYndVuNY4i7uC+BQx5UKq3Yfs7oa4ynua92s4Vs8lhUI0WhcwzZ\r\nE3ioD7Z8c0XDyPIFPcZiNda+7x00BhNUVI9m/5KVencfVfrfcmOHNFNDyW3B\r\nDdmBcRQhatQ0GkMEP8f0VDbmR7YnQ6HeNnBMOxJ9yNh3APCfsVu14fQLnWJn\r\nCzqdWbL7H+7V4RZEICUTBPclN8oNJ9ltnoUZhvMZQpjl0BHVZvMzUjngkAe7\r\n6oFrBZ02T0vbMg8y4peYYl6OX6TH9zqVE6bYmAm861h0Tk0J+S7fO2zr4KKm\r\ncWbR1vmYAW5Uta6mMaPgDwAeZcJScvEOKHsGsiaa0PawKKl+GxsWnIpak+Jm\r\nya8Bk1KCu2X7cK67C9evppl1X/86fnur+PKJffP6iMn2tB4wf9p55hsN5lmx\r\nmhwQuClW1vEwWxumi+18T+5n4CSiNltmXbQ3Qz/7oxH2lGsDr9zYgpCsj+c2\r\najvZjZDVRNSez9IGngA+AsYfaPb9sX1LGfvJcvH+DciQtLLgd0VdEiYk5sra\r\nND8SBtNQpAhBt0Ip3ZwgkesqMqa8mFonKrA=\r\n=Fuym\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"dhvarchilkova","email":"dhvarchilkova@gmail.com"},"directories":{},"maintainers":[{"name":"dhvarchilkova","email":"dhvarchilkova@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-jw-player_1.0.0_1659706113252_0.8723785175287437"},"_hasShrinkwrap":false},"1.0.1":{"name":"@dhvarchilkova/react-jw-player","version":"1.0.1","description":"A React component for launching JW Player instances on the client.","main":"dist/react-jw-player","scripts":{"build":"babel src --out-dir dist","clean":"rimraf dist","lint":"eslint .","prepublish":"npm run lint && npm run test && npm run clean && npm run build","test":"npm run lint && npm run test:unit && npm run test:browser","test:unit":"babel-tape-runner ./test/*.test.js* | faucet","test:browser":"babel-tape-runner ./test/*.browser-test.js* | faucet","watch":"babel src --out-dir dist --watch"},"repository":{"type":"git","url":"git+https://github.com/micnews/react-jw-player.git"},"keywords":["react","jwplayer","jw-player","video","autoplay","events"],"author":{"name":"Mic Network, Inc."},"license":"MIT","bugs":{"url":"https://github.com/micnews/react-jw-player/issues"},"homepage":"https://github.com/micnews/react-jw-player#readme","devDependencies":{"babel-cli":"^6.18.0","babel-eslint":"^7.2.3","babel-plugin-transform-object-assign":"^6.22.0","babel-preset-es2015":"^6.18.0","babel-preset-react":"^6.16.0","babel-tape-runner":"^2.0.1","enzyme":"^2.7.0","eslint":"^3.15.0","eslint-config-airbnb":"^13.0.0","eslint-config-mic":"^1.0.0","eslint-plugin-babel":"^4.1.2","eslint-plugin-flowtype":"^2.39.1","eslint-plugin-import":"^2.8.0","eslint-plugin-jsx-a11y":"^2.2.3","eslint-plugin-react":"^6.10.3","faucet":"0.0.1","jsdom":"^9.9.1","jsdom-global":"^2.1.1","miclint":"^4.1.0","prop-types":"^15.5.10","react":"^15.4.1","react-addons-test-utils":"^15.4.1","react-dom":"^15.4.2","react-test-renderer":"^15.4.2","rimraf":"^2.6.3","tape":"^4.6.3"},"peerDependencies":{"prop-types":"^15.5.10","react":"^15.4.1 || ^16.0.0|| ^17.0.0"},"dependencies":{"react-fast-compare":"^2.0.1"},"gitHead":"1d001d7cf18daf32ae8fb26ca70992ff093b846d","_id":"@dhvarchilkova/react-jw-player@1.0.1","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"integrity":"sha512-VaNLMAukwaoMoyAspDTuHhOZt/P0sYm5JswDn8IpdfdxHMyPaEHxR5UZoC1mlUMd1Ph1E65h6ab8dN/pQU9OuQ==","shasum":"1558b60df4118b6ee251eb672ab7407dbeb612b2","tarball":"https://registry.npmjs.org/@dhvarchilkova/react-jw-player/-/react-jw-player-1.0.1.tgz","fileCount":24,"unpackedSize":35773,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCZ+coiCuBrXnAPyj7ELfxDXuEWp3iM6d/x3pL70icHogIgSv+NGpstvBd7g5xjZ5a5l86Tc75KWlguRwRURm7p670="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi7SdAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpXSRAAgYyAk30TI+gmUdBUe1QpdvrvYZ9sylsUqr17Gg4OduhIG+QU\r\nHgf69r1hfRa45vPB9ClLugrXDhee07a1EzGDGcDVCl3kOfmtoCNcUxTdKF9x\r\nDqh1E/RufK2K5joDoBlntgJr5tF/+JOLkpMJQ7GDDncUplmD/VqQYk7e8xAu\r\nMhW2DylfVWR+AGTIzOpJIe9dVVLhskpPDwlietJbvzhjmFuBQCpmxEjc7IIu\r\n3m1k4HVpquSauCAyHBxUbMQV9ZdnSJRjRnGs75QL0oyXbr3au2A0He5gOtfc\r\nVHkAhsnhGp6UX4DPcAn4blcl+KolS9zK8dweJoYv+OG2eKoRKgYba+9UIjRC\r\nOx4HXYAPYo/b4jdyYvP7ZXhmd1GSZN2S7nnVyeuq6t//L1NGLtP1F13uA41/\r\nUGWlaYn8IQEKRnmnwFwjz7CfkvZjzXWpcSlVaNE+aTBwsM5GrGXbkjoHsY9T\r\n5buqvJMz5Ghjv3CKROpdwXWy/DiOjqr5YUT4V9loK2pi33nQsnLHSMbC9lmH\r\nyXVgTVG6Ooce1lY7iRtiG/xCvJmycgGLhEmPbAAbLTT2jYpWFmNTuhLkxD4y\r\nSSNkh7HB0eUyzYSklGe2kqNjggfL8QhpJVQ6Zrre72avzpVmkWPQZi2y/aro\r\nen/PXwwCSPKeLYbN9ZkjSvMhTxqoX7HrESo=\r\n=qKRo\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"dhvarchilkova","email":"dhvarchilkova@gmail.com"},"directories":{},"maintainers":[{"name":"dhvarchilkova","email":"dhvarchilkova@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-jw-player_1.0.1_1659709248048_0.7245712239919349"},"_hasShrinkwrap":false}},"time":{"created":"2022-08-05T13:28:33.185Z","1.0.0":"2022-08-05T13:28:33.389Z","modified":"2022-08-05T14:20:48.308Z","1.0.1":"2022-08-05T14:20:48.210Z"},"maintainers":[{"name":"dhvarchilkova","email":"dhvarchilkova@gmail.com"}],"description":"A React component for launching JW Player instances on the client.","homepage":"https://github.com/micnews/react-jw-player#readme","keywords":["react","jwplayer","jw-player","video","autoplay","events"],"repository":{"type":"git","url":"git+https://github.com/micnews/react-jw-player.git"},"author":{"name":"Mic Network, Inc."},"bugs":{"url":"https://github.com/micnews/react-jw-player/issues"},"license":"MIT","readme":"# react-jw-player :movie_camera: [![Build Status](https://travis-ci.com/micnews/react-jw-player.svg?token=oCXvx519mb3xud77T3xi&branch=master)](https://travis-ci.com/micnews/react-jw-player)\r\n\r\n`<ReactJWPlayer>` is a React Component for initializing client-side instances of JW Player. Simply give `<ReactJWPlayer>` the id of your player script, and the id of a JW Player video or playlist. The component comes with several event hooks that can be accessed through component props.\r\n\r\n## Contents\r\n\r\n* [Installation](#installation)\r\n* [Usage](#usage)\r\n* Props\r\n  * [Required Props](#required-props)\r\n  * Optional Props\r\n    * [Configuration](#optional-configuration-props)\r\n    * [Event Hooks](#event-hooks)\r\n      * [Advertising](#optional-advertising-event-hook-props)\r\n      * [Player Events](#optional-player-event-hook-props)\r\n      * [Time Events](#optional-time-event-hook-props)\r\n* [Example Container Component](#example-container-component)\r\n* [Contributing](#contributing)\r\n\r\n## Installation\r\n\r\n```shell\r\nnpm install react-jw-player\r\n```\r\n\r\n## Usage\r\n\r\nAt the mininum, you can just use something like the three following code snippets:\r\n\r\n### Playing a JW Player JSON Playlist\r\n``` javascript\r\nimport React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport ReactJWPlayer from 'react-jw-player';\r\n\r\nReactDOM.render(\r\n  <ReactJWPlayer\r\n    playerId='my-unique-id'\r\n    playerScript='https://link-to-my-jw-player/script.js'\r\n    playlist='https://link-to-my-playlist.json'\r\n  />,\r\n  document.getElementById('my-root-div');\r\n);\r\n```\r\n\r\n### Playing a custom Playlist\r\n``` javascript\r\nimport React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport ReactJWPlayer from 'react-jw-player';\r\n\r\nconst playlist = [{\r\n  file: 'https://link-to-my-video.mp4',\r\n  image: 'https://link-to-my-poster.jpg',\r\n  tracks: [{\r\n    file: 'https://link-to-subtitles.vtt',\r\n    label: 'English',\r\n    kind: 'captions',\r\n    'default': true\r\n  }],\r\n},\r\n{\r\n  file: 'https://link-to-my-other-video.mp4',\r\n  image: 'https://link-to-my-other-poster.jpg',\r\n}];\r\n\r\nReactDOM.render(\r\n  <ReactJWPlayer\r\n    playerId='my-unique-id'\r\n    playerScript='https://link-to-my-jw-player/script.js'\r\n    playlist={playlist}\r\n  />,\r\n  document.getElementById('my-root-div');\r\n);\r\n```\r\n\r\n### Playing a Specific File\r\n``` javascript\r\nimport React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport ReactJWPlayer from 'react-jw-player';\r\n\r\nReactDOM.render(\r\n  <ReactJWPlayer\r\n    playerId='my-unique-id'\r\n    playerScript='https://link-to-my-jw-player/script.js'\r\n    file='https://link-to-my-video.mp4'\r\n  />,\r\n  document.getElementById('my-root-div');\r\n);\r\n```\r\n\r\nFor more complex interaction, check out the container component example [here](#example-container-component)\r\n\r\nTo generate preroll, supply the player with the `generatePrerollUrl` prop. This prop just needs to be a function that returns a valid VAST tag! See [Optional Configuration Props](#optional-configuration-props) for more info.\r\n\r\n## Required Props\r\n\r\nThese are props that modify the basic behavior of the component.\r\n* `playerId`\r\n  * A unique Id for the player instance. Used to distinguish the container divs.\r\n  * Type: `string`\r\n  * Example: `playerId=\"my-jw-player-instance\"`\r\n* `playerScript`\r\n  * Link to a valid JW Player script.\r\n  * Type: `string`\r\n  * Example: `https://content.jwplatform.com/libraries/abCD1234.js`\r\n* `playlist` OR `file`\r\n  * Link to a valid JW Player playlist or video file, or playlist array. Cool tip: JW Player automatically generates JSON feeds for individual videos if you use the video id in place of `abCD1234`. You can use this to get meta data on the videos without loading an actual playlist.\r\n  * Type: `string` (for `file` and `playlist`) or `array` (for `playlist`)\r\n  * Example: `https//content.jwplatform.com/feeds/abCD1234.json`\r\n\r\n## Optional Configuration Props\r\n* `aspectRatio`\r\n  * An optional aspect ratio to give the video player. Can be 'inherit', `1:1` or `16:9` currently.\r\n  * Defaults to 'inherit'.\r\n* `className`\r\n  * An optional class name to give the container div.\r\n  * Type: `string`\r\n* `customProps`\r\n  * An optional object containing properties to be applied directly to the JW Player instance. Add anything in the API, like skins, into this object. `customProps={{ skin: { name: 'six' } }}`.\r\n  * Type: `object`\r\n* `isAutoPlay`\r\n  * Determines whether the player starts automatically or not.\r\n  * Type: `boolean`\r\n* `isMuted`\r\n  * Determines whether the player starts muted or not.\r\n  * Type: `boolean`\r\n* `generatePrerollUrl(video)`\r\n  * Supply a function that returns a VAST or GOOGIMA tag for use in generating a preroll advertisement.\r\n  * Arguments:\r\n    * `video`\r\n      * This is a video object for the current item loaded in the player. You can use it to help generate your preroll tags.\r\n* `image`\r\n  * URL to a poster image to display before playback starts\r\n  * Type: `string`\r\n* `licenseKey`\r\n  * License Key as supplied in the jwplayer dashboard, under: Players > Tools > Downloads > JW Player X (Self-Hosted)\r\n  * Type: `string`\r\n* `useMultiplePlayerScripts`\r\n  * EXPERIMENTAL - Allows you to load multiple player scripts and still load the proper configuration. Expect bugs, but report them!\r\n  * Type: `boolean`\r\n\r\n# Event Hooks\r\n\r\n`react-jw-player` dynamically supports all events in JW Player. Simply preface the event name with `on` and pass it in as a prop.\r\n\r\nExamples:\r\n* `ready` => `onReady`\r\n* `setupError` => `onSetupError`\r\n\r\n`react-jw-player` has layered some different functionality on some of these events, so please check the docs below if you find any unexpected behavior!\r\n\r\n## Optional Advertising Event Hook Props\r\n* `onAdPause(event)`\r\n  * A function that is run when the user pauses the preroll advertisement.\r\n  * Type: `function`\r\n  * Arguments:\r\n    * `event`\r\n      * This is the event object passed back from JW Player itself.\r\n* `onAdPlay(event)`\r\n  * A function that is run once, when the preroll advertisement first starts to play.\r\n  * Type: `function`\r\n  * Arguments:\r\n    * `event`\r\n      * This is the event object passed back from JW Player itself.\r\n* `onAdResume(event)`\r\n  * A function that is run when the user resumes playing the preroll advertisement.\r\n  * Type: `function`\r\n  * Arguments:\r\n    * `event`\r\n      * This is the event object passed back from JW Player itself.\r\n* `onAdSkipped(event)`\r\n  * A function that is run when the user skips an advertisement.\r\n  * Type: `function`\r\n  * Arguments:\r\n    * `event`\r\n      * This is the event object passed back from JW Player itself.\r\n* `onAdComplete(event)`\r\n  * A function that is run when an ad has finished playing.\r\n  * Type: `function`\r\n  * Arguments:\r\n    * `event`\r\n      * This is the event object passed back from JW Player itself.\r\n\r\n## Optional Player Event Hook Props\r\n* `onAutoStart(event)`\r\n  * A function that is run once, when an autoplaying player starts to play a video.\r\n  * Type: `function`\r\n  * Arguments:\r\n    * `event`\r\n      * This is the event object passed back from JW Player itself.\r\n* `onEnterFullScreen(event)`\r\n  * A function that is run when the user fullscreens a video.\r\n  * Type: `function`\r\n  * Arguments:\r\n    * `event`\r\n      * This is the event object passed back from JW Player itself.\r\n* `onError(event)`\r\n  * A function that is run when the player errors.\r\n  * Type: `function`\r\n  * Arguments:\r\n    * `event`\r\n      * This is the event object passed back from JW Player itself.\r\n* `onExitFullScreen(event)`\r\n  * A function that is run when the user un-fullscreens a video.\r\n  * Type: `function`\r\n  * Arguments:\r\n    * `event`\r\n      * This is the event object passed back from JW Player itself.\r\n* `onMute(event)`\r\n  * A function that is run when the user mutes the player.\r\n  * Type: `function`\r\n  * Arguments:\r\n    * `event`\r\n      * This is the event object passed back from JW Player itself.\r\n* `onPause(event)`\r\n  * A function that is run when the user pauses the player during a video.\r\n  * Type: `function`\r\n  * Arguments:\r\n    * `event`\r\n      * This is the event object passed back from JW Player itself.\r\n* `onPlay(event)`\r\n  * A function that is run when a video first starts to play.\r\n  * Type: `function`\r\n  * Arguments:\r\n    * `event`\r\n      * This is the event object passed back from JW Player itself.\r\n* `onReady(event)`\r\n  * A function that is run once when the video player is ready.\r\n  * Type: `function`\r\n  * Arguments:\r\n    * `event`\r\n      * This is the event object passed back from JW Player itself.\r\n* `onResume(event)`\r\n  * A function that is run when the user plays a video after pausing it.\r\n  * Type: `function`\r\n  * Arguments:\r\n    * `event`\r\n      * This is the event object passed back from JW Player itself.\r\n* `onSetupError(event)`\r\n  * A function that is run when the player errors during setup.\r\n  * Type: `function`\r\n  * Arguments:\r\n    * `event`\r\n      * This is the event object passed back from JW Player itself.\r\n* `onTime(event)`\r\n  * A function that is run whenever the playback position gets updated.\r\n  * Type: `function`\r\n  * Arguments:\r\n    * `event`\r\n      * This is the event object passed back from JW Player itself.\r\n* `onUnmute(event)`\r\n  * A function that is run when the user unmutes the player.\r\n  * Type: `function`\r\n  * Arguments:\r\n    * `event`\r\n      * This is the event object passed back from JW Player itself.\r\n* `onVideoLoad(event)`\r\n  * A function that is run whenever a new video is loaded into the player.\r\n  * Type: `function`\r\n  * Arguments:\r\n    * `event`\r\n      * This is the event object passed back from JW Player itself.\r\n\r\n## Optional Time Event Hook Props\r\n* `onThreeSeconds(event)`\r\n  * A function that is run when the playhead reaches passed the 3 second mark.\r\n  * Type: `function`\r\n  * Arguments:\r\n    * `event`\r\n      * This is the event object passed back from JW Player itself.\r\n* `onTenSeconds(event)`\r\n  * A function that is run when the playhead reaches passed the 10 second mark.\r\n  * Type: `function`\r\n  * Arguments:\r\n    * `event`\r\n      * This is the event object passed back from JW Player itself.\r\n* `onThirtySeconds(event)`\r\n  * A function that is run when the playhead reaches passed the 30 second mark.\r\n  * Type: `function`\r\n  * Arguments:\r\n    * `event`\r\n      * This is the event object passed back from JW Player itself.\r\n* `onTwentyFivePercent(event)`\r\n  * A function that is run when the playhead reaches passed the 25% mark.\r\n  * Type: `function`\r\n  * Arguments:\r\n    * `event`\r\n      * This is the event object passed back from JW Player itself.\r\n* `onFiftyPercent(event)`\r\n  * A function that is run when the playhead reaches passed the 50% mark.\r\n  * Type: `function`\r\n  * Arguments:\r\n    * `event`\r\n      * This is the event object passed back from JW Player itself.\r\n* `onSeventyFivePercent(event)`\r\n  * A function that is run when the playhead reaches passed the 75% mark.\r\n  * Type: `function`\r\n  * Arguments:\r\n    * `event`\r\n      * This is the event object passed back from JW Player itself.\r\n* `onNinetyFivePercent(event)`\r\n  * A function that is run when the playhead reaches passed the 95% mark.\r\n  * Type: `function`\r\n  * Arguments:\r\n    * `event`\r\n      * This is the event object passed back from JW Player itself.\r\n* `onOneHundredPercent(event)`\r\n  * A function that is run when the a video ends.\r\n  * Type: `function`\r\n  * Arguments:\r\n    * `event`\r\n      * This is the event object passed back from JW Player itself.\r\n\r\n## Example Container Component\r\n``` javascript\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport ReactJWPlayer from 'react-jw-player';\r\n\r\nconst displayName = 'ReactJWPlayerContainer';\r\n\r\nconst propTypes = {\r\n  playlist: PropTypes.string.isRequired,\r\n  playerScript: PropTypes.string.isRequired\r\n};\r\n\r\nclass ReactJWPlayerContainer extends React.Component {\r\n  constructor(props) {\r\n    super(props);\r\n    this.state = {\r\n      videoTitle: '',\r\n    };\r\n\r\n    this.onAdPlay = this.onAdPlay.bind(this);\r\n    this.onReady = this.onReady.bind(this);\r\n    this.onVideoLoad = this.onVideoLoad.bind(this);\r\n\r\n    // each instance of <ReactJWPlayer> needs a unique id.\r\n    // we randomly generate it here and assign to the container instance.\r\n    this.playerId = someFunctionToRandomlyGenerateId();\r\n  }\r\n  onReady(event) {\r\n    // interact with JW Player API here\r\n    const player = window.jwplayer(this.playerId);\r\n  }\r\n  onAdPlay(event) {\r\n    // track the ad play here\r\n  }\r\n  onVideoLoad(event) {\r\n    this.setState({\r\n      videoTitle: event.item.description // this only works with json feeds!\r\n    });\r\n  }\r\n  render() {\r\n    return (\r\n      <div className='react-jw-player-container'>\r\n        <h1>{ this.state.videoTitle }</h1>\r\n        <ReactJWPlayer\r\n          playlist={this.props.playlist}\r\n          licenseKey='your-license-key'\r\n          onAdPlay={this.onAdPlay}\r\n          onReady={this.onReady}\r\n          onVideoLoad={this.onVideoLoad}\r\n          playerId={this.playerId} // bring in the randomly generated playerId\r\n          playerScript='https://link-to-your-jw-player-script.js'\r\n        />\r\n      </div>\r\n    );\r\n  }\r\n}\r\n\r\nReactJWPlayerContainer.propTypes = propTypes;\r\nReactJWPlayerContainer.defaultProps = defaultProps;\r\nReactJWPlayerContainer.displayName = displayName;\r\nexport default ReactJWPlayerContainer;\r\n```\r\n\r\n## Contributing\r\n\r\n**Just do it!**\r\n\r\n![shia](https://media.giphy.com/media/87xihBthJ1DkA/giphy.gif)\r\n","readmeFilename":"README.md"}