|
5 | 5 |
|
6 | 6 |  |
7 | 7 |
|
8 | | -## Progress |
9 | | - |
10 | | -- [x] ios (implemented %99 using https://github.com/malkouz/youtube-ios-player-helper-swift) |
11 | | -- [x] android (implemented https://github.com/PierfrancescoSoffritti/android-youtube-player) |
12 | | - |
13 | 8 | ## Note |
14 | | -- your android app needs to be using the androidx libraries instead of the old support libraries. |
15 | | -- iOS under development but you can use |
| 9 | +- Your android app needs to be using the androidx libraries instead of the old support libraries. |
16 | 10 |
|
17 | 11 | ## Video is unavailable problem |
18 | 12 | - Origin is already set up in the library but you will notice that some videos are not playing. This is because the video is shared as not embeddable by provider. |
|
29 | 23 | #### iOS |
30 | 24 |
|
31 | 25 | 1. Drag drop `assets/YTPlayerView.html` to your iOS project |
32 | | -2. Create a blank Swift file with bridge file in your project (to build swift code easily) |
| 26 | +2. Create a blank Swift file with bridge in your project (to build swift code easily) |
33 | 27 |  |
34 | 28 |
|
35 | | -\`soon there will be easier implementation` |
| 29 | +### With CocoaPods (RN > 0.60) |
| 30 | + |
| 31 | +1. `$ react-native link react-native-youtube-sdk` |
| 32 | +2. `$ cd /ios` |
| 33 | +3. `$ pod install` |
| 34 | +4. Create a blank Swift file with bridge in your project (to build swift code easily) |
| 35 | +5. Have fun |
| 36 | + |
36 | 37 |
|
37 | 38 | ### Manual installation |
38 | 39 |
|
@@ -181,5 +182,10 @@ const styles = StyleSheet.create({ |
181 | 182 | | pause | | void | pause the video | |
182 | 183 | | loadVideo | videoId, startTime | void | load a video to the player | |
183 | 184 | | getCurrentTime | | promise | Returns promise that results with the current time of the played video | |
184 | | -| getVideoDuration | | promise | Returns promise that results with the duration of the played video | |
| 185 | +| getVideoDuration | | promise | Returns promise that results with the duration of the played video |
| 186 | + |
| 187 | + |
| 188 | +- [x] iOS (https://github.com/malkouz/youtube-ios-player-helper-swift) |
| 189 | +- [x] Android ('com.pierfrancescosoffritti.androidyoutubeplayer') |
| 190 | + | |
185 | 191 |
|
0 commit comments