diff --git a/README.md b/README.md index 07100f6dd..19d7f7d42 100644 --- a/README.md +++ b/README.md @@ -200,12 +200,30 @@ You can find us as part of the [React Native Track Player](https://discordapp.co - `#show-and-tell` - Tell the community about the app you made with this project! - `#news-and-releases` - Stay updated about the latest releases and dev efforts on the project. -### Web Notes +## Web -https://github.com/shaka-project/shaka-player/blob/7772099029acb47e6905a688f6cfc9c8738c6ff2/docs/tutorials/faq.md +RNTP is available on web. The web implementation leverages [shaka-player](https://github.com/shaka-project/shaka-player) +which is an optional peer dependency of the RNTP. If you want to deploy the web +platform you'll need to install `shaka-player` directly in your project: + +```sh +yarn add shaka-player +``` + +### Web FAQ + +See [`shaka-player`'s FAQ](https://github.com/shaka-project/shaka-player/blob/7772099029acb47e6905a688f6cfc9c8738c6ff2/docs/tutorials/faq.md) + +### Web HLS Q: Why doesn't my HLS content work? -A: If your HLS content uses MPEG2-TS, you may need to enable transmuxing. The only browsers capable of playing TS natively are Edge and Chromecast. You will get a CONTENT_UNSUPPORTED_BY_BROWSER error on other browsers due to their lack of TS support. +A: If your HLS content uses MPEG2-TS, you may need to enable transmuxing. The +only browsers capable of playing TS natively are Edge and Chromecast. You will +get a CONTENT_UNSUPPORTED_BY_BROWSER error on other browsers due to their lack +of TS support. -You can enable transmuxing by including mux.js v5.6.3+ in your application. If Shaka Player detects that mux.js has been loaded, we will use it to transmux TS content into MP4 on-the-fly, so that the content can be played by the browser. +You can enable transmuxing by including [mux.js](https://www.npmjs.com/package/mux.js) +v5.6.3+ in your application. If Shaka Player detects that mux.js has been +loaded, we will use it to transmux TS content into MP4 on-the-fly, so that the +content can be played by the browser. diff --git a/example/package.json b/example/package.json index 577670424..b5ae918dd 100644 --- a/example/package.json +++ b/example/package.json @@ -37,7 +37,8 @@ "react-native-vector-icons": "^10.0.0", "react-native-web": "^0.18.10", "react-native-windows": "0.71.12", - "react-scripts": "5.0.1" + "react-scripts": "5.0.1", + "shaka-player": "^4.7.9" }, "devDependencies": { "@babel/core": "^7.20.0", diff --git a/example/yarn.lock b/example/yarn.lock index 19f580067..2e768fb9b 100644 --- a/example/yarn.lock +++ b/example/yarn.lock @@ -12144,10 +12144,10 @@ setprototypeof@1.2.0: resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== -shaka-player@^4.3.2: - version "4.5.0" - resolved "https://registry.yarnpkg.com/shaka-player/-/shaka-player-4.5.0.tgz#99950e3be672e7ca23e751a85e2e373ad1ca2099" - integrity sha512-fEy4AW3lQQboOzpn0mJfCoVQ+T0sl8VZ+CWfa6w/6nsY+4z8i8dtQf1raihDYqY5vNvSmjYFrFVqE6iulUYMGg== +shaka-player@^4.7.9: + version "4.7.9" + resolved "https://registry.yarnpkg.com/shaka-player/-/shaka-player-4.7.9.tgz#5c283ba51781b5eb548c4db20d02944dffd44a85" + integrity sha512-eGaBZCYeYLejSM1vN5te0rjLKWrIs93Vr8i94DVLjRENyeNGZIeG4wHdhMcuTn1FaedMHOfb0k+GEIqA3LLbPw== dependencies: eme-encryption-scheme-polyfill "^2.1.1" diff --git a/package.json b/package.json index 22bacd16c..6f9bf4134 100644 --- a/package.json +++ b/package.json @@ -73,17 +73,18 @@ "bugs": { "url": "https://github.com/doublesymmetry/react-native-track-player/issues" }, - "dependencies": { - "shaka-player": "^4.3.2" - }, "peerDependencies": { "react": ">=16.8.6", "react-native": ">=0.60.0-rc.2", - "react-native-windows": ">=0.63.0" + "react-native-windows": ">=0.63.0", + "shaka-player": "^4.7.9" }, "peerDependenciesMeta": { "react-native-windows": { "optional": true + }, + "shaka-player": { + "optional": true } }, "devDependencies": { @@ -101,6 +102,7 @@ "react-native": "0.68.5", "react-native-windows": "^0.65.0-0", "rimraf": "^2.6.2", + "shaka-player": "^4.7.9", "typescript": "^4.8.2" }, "funding": "https://github.com/doublesymmetry/react-native-track-player?sponsor=1", diff --git a/yarn.lock b/yarn.lock index 6db7fd7d5..b944562b3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6200,7 +6200,7 @@ setprototypeof@1.2.0: resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== -shaka-player@^4.3.2: +shaka-player@^4.7.9: version "4.7.9" resolved "https://registry.yarnpkg.com/shaka-player/-/shaka-player-4.7.9.tgz#5c283ba51781b5eb548c4db20d02944dffd44a85" integrity sha512-eGaBZCYeYLejSM1vN5te0rjLKWrIs93Vr8i94DVLjRENyeNGZIeG4wHdhMcuTn1FaedMHOfb0k+GEIqA3LLbPw==