Skip to content

Commit

Permalink
Example Project - Docs, HLS, & Livestream (#1536)
Browse files Browse the repository at this point in the history
* docs(example): add documentation to the example project on debugging native iOS code

* chore(example): add a HLS and live stream to the example project
  • Loading branch information
jspizziri authored May 17, 2022
1 parent 8d159e1 commit c25eedf
Show file tree
Hide file tree
Showing 32 changed files with 84 additions and 0 deletions.
Binary file added docs/static/example/hls/whip/file0.m4a
Binary file not shown.
Binary file added docs/static/example/hls/whip/file1.m4a
Binary file not shown.
Binary file added docs/static/example/hls/whip/file10.m4a
Binary file not shown.
Binary file added docs/static/example/hls/whip/file11.m4a
Binary file not shown.
Binary file added docs/static/example/hls/whip/file12.m4a
Binary file not shown.
Binary file added docs/static/example/hls/whip/file13.m4a
Binary file not shown.
Binary file added docs/static/example/hls/whip/file14.m4a
Binary file not shown.
Binary file added docs/static/example/hls/whip/file15.m4a
Binary file not shown.
Binary file added docs/static/example/hls/whip/file16.m4a
Binary file not shown.
Binary file added docs/static/example/hls/whip/file17.m4a
Binary file not shown.
Binary file added docs/static/example/hls/whip/file18.m4a
Binary file not shown.
Binary file added docs/static/example/hls/whip/file19.m4a
Binary file not shown.
Binary file added docs/static/example/hls/whip/file2.m4a
Binary file not shown.
Binary file added docs/static/example/hls/whip/file20.m4a
Binary file not shown.
Binary file added docs/static/example/hls/whip/file21.m4a
Binary file not shown.
Binary file added docs/static/example/hls/whip/file22.m4a
Binary file not shown.
Binary file added docs/static/example/hls/whip/file23.m4a
Binary file not shown.
Binary file added docs/static/example/hls/whip/file3.m4a
Binary file not shown.
Binary file added docs/static/example/hls/whip/file4.m4a
Binary file not shown.
Binary file added docs/static/example/hls/whip/file5.m4a
Binary file not shown.
Binary file added docs/static/example/hls/whip/file6.m4a
Binary file not shown.
Binary file added docs/static/example/hls/whip/file7.m4a
Binary file not shown.
Binary file added docs/static/example/hls/whip/file8.m4a
Binary file not shown.
Binary file added docs/static/example/hls/whip/file9.m4a
Binary file not shown.
54 changes: 54 additions & 0 deletions docs/static/example/hls/whip/playlist.m3u8
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-ALLOW-CACHE:YES
#EXT-X-TARGETDURATION:8
#EXTINF:7.012433,
file0.m4a
#EXTINF:6.989200,
file1.m4a
#EXTINF:7.012433,
file2.m4a
#EXTINF:6.989200,
file3.m4a
#EXTINF:7.012433,
file4.m4a
#EXTINF:6.989211,
file5.m4a
#EXTINF:7.012433,
file6.m4a
#EXTINF:6.989211,
file7.m4a
#EXTINF:7.012433,
file8.m4a
#EXTINF:6.989211,
file9.m4a
#EXTINF:7.012422,
file10.m4a
#EXTINF:6.989211,
file11.m4a
#EXTINF:7.012422,
file12.m4a
#EXTINF:6.989211,
file13.m4a
#EXTINF:6.989211,
file14.m4a
#EXTINF:7.012433,
file15.m4a
#EXTINF:6.989200,
file16.m4a
#EXTINF:7.012433,
file17.m4a
#EXTINF:6.989200,
file18.m4a
#EXTINF:7.012433,
file19.m4a
#EXTINF:6.989200,
file20.m4a
#EXTINF:7.012433,
file21.m4a
#EXTINF:6.989200,
file22.m4a
#EXTINF:3.300133,
file23.m4a
#EXT-X-ENDLIST
Binary file added docs/static/example/hls/whip/whip.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/static/example/hls/whip/whip.mp3
Binary file not shown.
Binary file added docs/static/example/smooth-jazz-24-7.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/static/img/debugging/debug-ios-rntp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,21 @@ the files from the `example/node_modules/react-native-track-player` directory
up to the top level project. You would want to use this approach if you're
making your changes directly to the code in the `example/node_modules/react-native-track-player`
folder.

## Debugging/Updating Native Code


#### iOS

First opening the Xcode Project (`open ios/example.xcworkspace`). Then you can
simply navigate to the native dependencies, open their source files, modify
them, or add breakpoints. See the screenshots below for specifically how to
navigate to react-native-track-player and SwiftAudioEx dependencies (see
screenshots below).

![Xcode RNTP](https://react-native-track-player.js.org/img/debugging/debug-ios-rntp.png)
![Xcode SwiftAudioEx](https://react-native-track-player.js.org/img/debugging/debug-ios-swift-audio-ex.png)

#### Android

TODO
12 changes: 12 additions & 0 deletions example/src/assets/data/playlist.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,17 @@
"artist": "David Chavez",
"artwork": "https://react-native-track-player.js.org/example/Rhythm%20City%20(Demo).jpeg",
"duration": 106
},
{
"url": "https://react-native-track-player.js.org/example/hls/whip/playlist.m3u8",
"title": "Whip",
"artist": "prazkhanal",
"artwork": "https://react-native-track-player.js.org/example/hls/whip/whip.jpeg"
},
{
"url": "https://ais-sa5.cdnstream1.com/b75154_128mp3",
"title": "Smooth Jazz 24/7 (Live Radio)",
"artist": "New York, NY",
"artwork": "https://react-native-track-player.js.org/example/smooth-jazz-24-7.jpeg"
}
]

0 comments on commit c25eedf

Please sign in to comment.