{"_id":"@afraz-malik/hello_ant_media_web_player","_rev":"1-1c2328580c8e758c2389138bb1fae4c6","name":"@afraz-malik/hello_ant_media_web_player","dist-tags":{"latest":"2.0.100"},"versions":{"2.0.11":{"name":"@afraz-malik/hello_ant_media_web_player","version":"2.0.11","author":{"name":"Ant Media"},"license":"ISC","_id":"@afraz-malik/hello_ant_media_web_player@2.0.11","maintainers":[{"name":"afraz-malik","email":"afrazmalik321@gmail.com"}],"homepage":"https://github.com/ant-media/Web-Player#readme","bugs":{"url":"https://github.com/ant-media/Web-Player/issues"},"dist":{"shasum":"a68da8e9ae128f868595ff8acad43a77725357f4","tarball":"https://registry.npmjs.org/@afraz-malik/hello_ant_media_web_player/-/hello_ant_media_web_player-2.0.11.tgz","fileCount":41,"integrity":"sha512-6yvXkttaQOw4BmOKWk1kPkcgCoEaQRTJVbYxMiI03y8eM6QdtDPgANNQq2hfqgrA/fCU0R+5c8OSS33l+nyb8w==","signatures":[{"sig":"MEYCIQDlHQfugb6GafWUOQkpzOq/rZAWgL/sWQDu0vZBhvS4dwIhAK00Rueve07XbXh3rkxKtnL5l9WGm6HKADoICkb0T+t/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11482112},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","module":"dist/es/index.js","gitHead":"e0698e1d4ce5adda15a7fa006971d92433c669dc","scripts":{"test":"karma start karma.conf.cjs","codecov":"codecov","compile":"npm run cleanup:tsbuild && npm run compile:js && npm run compile:ts && copy-files-from-to && npm run cleanup:tsbuild","compile:js":"rollup -c rollup.config.module.cjs && rollup -c rollup.config.browser.cjs ","compile:ts":"tsc -p ./tsconfig.json && api-extractor run","cleanup:tsbuild":"rimraf ./tsbuild"},"_npmUser":{"name":"afraz-malik","email":"afrazmalik321@gmail.com"},"copyFiles":[{"to":"./dist/index.d.ts","from":"./dist/es/index.d.ts"}],"repository":{"url":"git+https://github.com/ant-media/Web-Player.git","type":"git"},"_npmVersion":"10.2.3","description":"Ant Media Server Player that can play WebRTC, HLS, DASH","directories":{"test":"test"},"_nodeVersion":"20.10.0","dependencies":{"aframe":"1.5.0","dashjs":"^4.7.4","rimraf":"^5.0.5","video.js":"^8.17.3","@rollup/plugin-json":"6.1.0","@antmedia/webrtc_adaptor":"^2.11.3","videojs-quality-selector-hls":"^1.1.1","@antmedia/videojs-webrtc-plugin":"^1.3.1"},"publishConfig":{"registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.3.7","jsdoc":"^3.6.10","karma":"^6.4.2","mocha":"^10.2.0","sinon":"^15.0.4","eslint":"^8.9.0","rimraf":"^3.0.2","rollup":"^3.21.2","codecov":"^3.8.3","karma-chai":"^0.1.0","typescript":"^5.1.3","@babel/core":"^7.21.5","karma-mocha":"^2.0.1","karma-sinon":"^1.0.5","karma-coverage":"^2.2.0","@types/video.js":"^7.3.58","@babel/preset-env":"^7.21.5","copy-files-from-to":"^3.9.0","@rollup/plugin-babel":"^6.0.3","@rollup/plugin-image":"^3.0.3","@rollup/plugin-terser":"^0.4.4","karma-chrome-launcher":"^3.2.0","rollup-plugin-replace":"^2.2.0","@rollup/plugin-commonjs":"^25.0.7","@microsoft/api-extractor":"^7.36.1","rollup-plugin-import-css":"^3.4.0","@rollup/plugin-node-resolve":"^15.2.3"},"_npmOperationalInternal":{"tmp":"tmp/hello_ant_media_web_player_2.0.11_1729801198343_0.14931254838902275","host":"s3://npm-registry-packages"}},"2.0.100":{"name":"@afraz-malik/hello_ant_media_web_player","version":"2.0.100","description":"Ant Media Server Player that can play WebRTC, HLS, DASH","main":"dist/index.js","module":"dist/es/index.js","type":"module","scripts":{"compile":"npm run cleanup:tsbuild && npm run compile:js && npm run compile:ts && copy-files-from-to && npm run cleanup:tsbuild","compile:js":"rollup -c rollup.config.module.cjs && rollup -c rollup.config.browser.cjs ","compile:ts":"tsc -p ./tsconfig.json && api-extractor run","cleanup:tsbuild":"rimraf ./tsbuild","test":"karma start karma.conf.cjs","codecov":"codecov"},"copyFiles":[{"from":"./dist/es/index.d.ts","to":"./dist/index.d.ts"}],"author":{"name":"Ant Media"},"repository":{"type":"git","url":"git+https://github.com/ant-media/Web-Player.git"},"publishConfig":{"registry":"https://registry.npmjs.org/"},"license":"ISC","dependencies":{"@antmedia/videojs-webrtc-plugin":"^1.3.1","@antmedia/webrtc_adaptor":"^2.11.3","@rollup/plugin-json":"6.1.0","aframe":"1.5.0","dashjs":"^4.7.4","rimraf":"^5.0.5","video.js":"^8.17.3","videojs-quality-selector-hls":"^1.1.1"},"devDependencies":{"@babel/core":"^7.21.5","@babel/preset-env":"^7.21.5","@microsoft/api-extractor":"^7.36.1","@rollup/plugin-babel":"^6.0.3","@rollup/plugin-commonjs":"^25.0.7","@rollup/plugin-image":"^3.0.3","@rollup/plugin-node-resolve":"^15.2.3","@rollup/plugin-terser":"^0.4.4","@types/video.js":"^7.3.58","chai":"^4.3.7","codecov":"^3.8.3","copy-files-from-to":"^3.9.0","eslint":"^8.9.0","jsdoc":"^3.6.10","karma":"^6.4.2","karma-chai":"^0.1.0","karma-chrome-launcher":"^3.2.0","karma-coverage":"^2.2.0","karma-mocha":"^2.0.1","karma-sinon":"^1.0.5","mocha":"^10.2.0","rimraf":"^3.0.2","rollup":"^3.21.2","rollup-plugin-import-css":"^3.4.0","rollup-plugin-replace":"^2.2.0","sinon":"^15.0.4","typescript":"^5.1.3"},"types":"./dist/index.d.ts","bugs":{"url":"https://github.com/ant-media/Web-Player/issues"},"homepage":"https://github.com/ant-media/Web-Player#readme","directories":{"test":"test"},"_id":"@afraz-malik/hello_ant_media_web_player@2.0.100","gitHead":"e0698e1d4ce5adda15a7fa006971d92433c669dc","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-XSlxtl3ynGyBd+jQnZ6FWlv93dC5Phg1E+SiDwViSB26nhjp6HJkKOoBhalFm+sWElawqsyEb1NDVFdrOXe8Gg==","shasum":"c8a54f8e86335a641fdae6c0ceebb4af17a0fd02","tarball":"https://registry.npmjs.org/@afraz-malik/hello_ant_media_web_player/-/hello_ant_media_web_player-2.0.100.tgz","fileCount":41,"unpackedSize":11483088,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDXM61zfI0m0rGHcwSrsBZYmcLTaKbmqTLl5A4OthUcBQIhAMNCPt2TqYvZt3R6tWB6mr1SajW7g5kAPR4WVRPdJy0M"}]},"_npmUser":{"name":"afraz-malik","email":"afrazmalik321@gmail.com"},"maintainers":[{"name":"afraz-malik","email":"afrazmalik321@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hello_ant_media_web_player_2.0.100_1729878525334_0.8784238938940452"},"_hasShrinkwrap":false}},"time":{"created":"2024-10-24T20:19:58.215Z","modified":"2024-10-25T17:48:45.826Z","2.0.11":"2024-10-24T20:19:58.954Z","2.0.100":"2024-10-25T17:48:45.665Z"},"bugs":{"url":"https://github.com/ant-media/Web-Player/issues"},"author":{"name":"Ant Media"},"license":"ISC","homepage":"https://github.com/ant-media/Web-Player#readme","repository":{"type":"git","url":"git+https://github.com/ant-media/Web-Player.git"},"description":"Ant Media Server Player that can play WebRTC, HLS, DASH","maintainers":[{"name":"afraz-malik","email":"afrazmalik321@gmail.com"}],"readme":"# Web Player for Ant Media Server\n\nWeb Player is a powerful, versatile player for Ant Media Server, designed to embed and play streams directly in web applications. It supports various stream types including WebRTC, HLS, DASH, and VR 360, ensuring broad compatibility and high performance. The player can be easily configured via URL parameters or directly in your code, offering both flexibility and ease of use.\n\n## Features\n\n- Supports WebRTC, HLS, DASH, and VR 360 streams.\n- Configurable through URL parameters or directly in the code.\n- Supports token-based security for stream access.\n- Autoplay and mute options for a seamless user experience.\n- Customizable play order and types for different stream technologies and formats.\n- Adjustable target latency for DASH players.\n- 360-degree video playback capability.\n\n## Installation\n\nInstall the Web Player package using npm:\n\n```bash\nnpm i @antmedia/web_player\n```\n\n## Usage\n\n### Basic Usage\n\nTo use the Web Player, import it and initialize it with the parameters received from the URL. Refer to the Configuration Parameters section below for more details.\n\n1. In your web application, create a div with the id video_container. This will serve as the container for the player.\n\n  ```\n  <div id=\"video_container\" ></div>\n  ````\n  \n2. Initialize the player as follows:\n  ```javascript\n  import { WebPlayer } from \"@antmedia/web_player\";\n\n  var embeddedPlayer = new WebPlayer(window, document.getElementById(\"video_container\"), null);\n\n  embeddedPlayer.initialize().then(() => {\n    embeddedPlayer.play();\n  });\n  ```\n\nThe sample for this usage is available in [play.html in StreamApp](https://github.com/ant-media/StreamApp/blob/master/src/main/webapp/play.html)\n\n### Advanced Usage\nAlternatively, you can pass the parameters as an object to the WebPlayer constructor.\n\n\n1. In your web application, create a div with the id video_container. This will serve as the container for the player.\n  ```\n  <div id=\"video_container\" ></div>\n  ````\n\n2. Initialize the player as follows\n  ```javascript\n  var player = new WebPlayer({\n    streamId: \"myStreamId\",\n    httpBaseURL: \"http://example.antmedia.io:5080/WebRTCAppEE/\", //Remember to add trailing slash(/)\n  }, document.getElementById(\"video_container\"), null);\n\n  player.initialize().then(() => {\n    player.play();\n  }).catch((error) => {\n    console.error(\"Error while initializing embedded player: \" + error);\n  });\n  ```\n\nThe sample for this usage is available in [app.page.component.ts in Ant-Media-Management-Console](https://github.com/ant-media/Ant-Media-Management-Console/blob/master/src/app/app.page/app.page.component.ts)\n\n\n## Configuration Parameters\n\nThe player accepts several configuration parameters, either through the URL or directly in the code:\n\n1. `id` (String): The stream ID to play. This parameter is mandatory.\n2. `token` (String): The token for stream access. It's mandatory if token security is enabled on the server side.\n3. `autoplay` (Boolean): Autoplay the stream if available. Optional. Default value is `true`.\n4. `mute` (Boolean): Start playing in mute mode if the stream is available. Optional. Default value is `true`.\n5. `playOrder` (String): The order of technologies used for playing. Optional. Default value is `\"webrtc,hls\"`. Possible values include `\"hls,webrtc\"`, `\"webrtc\"`, `\"hls\"`, `\"vod\"`, `\"dash\"`.\n6. `playType` (String): The order of play types used for playing. Optional. Default value is `\"mp4,webm\"`. Possible values include `\"webm,mp4\"`, `\"mp4\"`, `\"webm\"`, `\"mov\"`.\n7. `targetLatency` (Number): The target latency for the DASH player. Optional. Default value is `3`.\n8. `is360` (Boolean): Enable playback in 360 mode. Optional. Default value is `false`.\n\n\n## Support\nFor support and further inquiries, please visit [Ant Media Server's community](https://github.com/orgs/ant-media/discussions). If you are an enterprise user, you can receive support by sending an email to support@antmedia.io.\n\n## Issues\nFor reporting issues, please create them on the [Ant-Media-Server issues page](https://github.com/ant-media/Ant-Media-Server/issues).\n\n## Contributing\nContributions are warmly welcomed. If you would like to help improve the Web Player, please submit your pull requests to the repository or report any issues you encounter.\n\nEnjoy streaming with the Ant Media Server's Web Player!\n\n","readmeFilename":"README.md"}