diff --git a/example/.buckconfig b/example/.buckconfig deleted file mode 100644 index 934256c..0000000 --- a/example/.buckconfig +++ /dev/null @@ -1,6 +0,0 @@ - -[android] - target = Google Inc.:Google APIs:23 - -[maven_repositories] - central = https://repo1.maven.org/maven2 diff --git a/example/.eslintrc.js b/example/.eslintrc.js index f410a74..187894b 100644 --- a/example/.eslintrc.js +++ b/example/.eslintrc.js @@ -1,7 +1,4 @@ module.exports = { root: true, - extends: '@react-native-community', - rules: { - 'prettier/prettier': 'off', - }, + extends: '@react-native', }; diff --git a/example/.flowconfig b/example/.flowconfig deleted file mode 100644 index 3782e44..0000000 --- a/example/.flowconfig +++ /dev/null @@ -1,66 +0,0 @@ -[ignore] -; We fork some components by platform -.*/*[.]android.js - -; Ignore "BUCK" generated dirs -/\.buckd/ - -; Ignore polyfills -node_modules/react-native/Libraries/polyfills/.* - -; Flow doesn't support platforms -.*/Libraries/Utilities/LoadingView.js - -.*/node_modules/resolve/test/resolver/malformed_package_json/package\.json$ - -[untyped] -.*/node_modules/@react-native-community/cli/.*/.* - -[include] - -[libs] -node_modules/react-native/interface.js -node_modules/react-native/flow/ - -[options] -emoji=true - -exact_by_default=true - -format.bracket_spacing=false - -module.file_ext=.js -module.file_ext=.json -module.file_ext=.ios.js - -munge_underscores=true - -module.name_mapper='^react-native/\(.*\)$' -> '/node_modules/react-native/\1' -module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '/node_modules/react-native/Libraries/Image/RelativeImageStub' - -suppress_type=$FlowIssue -suppress_type=$FlowFixMe -suppress_type=$FlowFixMeProps -suppress_type=$FlowFixMeState - -[lints] -sketchy-null-number=warn -sketchy-null-mixed=warn -sketchy-number=warn -untyped-type-import=warn -nonstrict-import=warn -deprecated-type=warn -unsafe-getters-setters=warn -unnecessary-invariant=warn - -[strict] -deprecated-type -nonstrict-import -sketchy-null -unclear-type -unsafe-getters-setters -untyped-import -untyped-type-import - -[version] -^0.182.0 diff --git a/example/.gitignore b/example/.gitignore index 2423126..0cab2ac 100644 --- a/example/.gitignore +++ b/example/.gitignore @@ -31,6 +31,8 @@ local.properties *.iml *.hprof .cxx/ +*.keystore +!debug.keystore # node.js # @@ -38,12 +40,6 @@ node_modules/ npm-debug.log yarn-error.log -# BUCK -buck-out/ -\.buckd/ -*.keystore -!debug.keystore - # fastlane # # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the @@ -62,3 +58,9 @@ buck-out/ # Ruby / CocoaPods /ios/Pods/ /vendor/bundle/ + +# Temporary files created by Metro to check the health of the file watcher +.metro-health-check* + +# testing +/coverage diff --git a/example/.ruby-version b/example/.ruby-version deleted file mode 100644 index a603bb5..0000000 --- a/example/.ruby-version +++ /dev/null @@ -1 +0,0 @@ -2.7.5 diff --git a/example/.watchmanconfig b/example/.watchmanconfig index 9e26dfe..0967ef4 100644 --- a/example/.watchmanconfig +++ b/example/.watchmanconfig @@ -1 +1 @@ -{} \ No newline at end of file +{} diff --git a/example/.yalc/react-native-feed-media-audio-player/.eslintrc.js b/example/.yalc/react-native-feed-media-audio-player/.eslintrc.js deleted file mode 100644 index cd59613..0000000 --- a/example/.yalc/react-native-feed-media-audio-player/.eslintrc.js +++ /dev/null @@ -1,35 +0,0 @@ -module.exports = { - "env": { - "es6": true, - "node": true - }, - "extends": "eslint:recommended", - "parserOptions": { - "ecmaFeatures": { - "jsx": true - }, - "ecmaVersion": 2018, - "sourceType": "module" - }, - "plugins": [ - "react" - ], - "rules": { - "indent": [ - "error", - 2 - ], - "linebreak-style": [ - "error", - "unix" - ], - "quotes": [ - "error", - "single" - ], - "semi": [ - "error", - "always" - ] - } -}; \ No newline at end of file diff --git a/example/.yalc/react-native-feed-media-audio-player/.vscode/launch.json b/example/.yalc/react-native-feed-media-audio-player/.vscode/launch.json deleted file mode 100644 index a4b5bd3..0000000 --- a/example/.yalc/react-native-feed-media-audio-player/.vscode/launch.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "type": "node", - "request": "launch", - "name": "Launch Program", - "program": "${workspaceFolder}/index.js" - } - ] -} \ No newline at end of file diff --git a/example/.yalc/react-native-feed-media-audio-player/CHANGELOG.md b/example/.yalc/react-native-feed-media-audio-player/CHANGELOG.md deleted file mode 100644 index 6924586..0000000 --- a/example/.yalc/react-native-feed-media-audio-player/CHANGELOG.md +++ /dev/null @@ -1,130 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - -### 4.0.5 (2023-08-30) - - Fix exoplayer threading issues. - -### 4.0.4 (2023-03-14) - - Add log-event method, update sdks - -### 4.0.3 (2023-02-06) - -- v4.0.2 - - Fix missing play-started android event. - -- v4.0.1 - - Fix offline to online iOS crash. - -- v4.0.0 - - update Example react version to 0.70.2 - -- v3.4.1 - - update to 6.2.0 of Android package and update exoplayer version to 2.13.1 - - update react version to 0.64.1 - -- v3.4.0 - - update to 5.1.2 of iOS Pod for AirPlay work - - update to 6.1.6 of Android package for bugfixes - -- v3.3.6 - - add java 1.8 compatibility - -- v3.3.5 - - revert back to pods for iOS library - -- v3.3.4 - - update min android SDK to 21 - - update gradle - - upgrade to react native 0.64.2 - - propagate `musicQueued` event to the player - -- v3.3.3 - - bump Android SDK to 6.1.3 - -- v3.3.1 - - update iOS Feed SDK to 4.4.15 to resolve bugs - - replace `requestClientId()` async call with simple `clientID` property - that is initialized when player becomes available, and updated - when the client id changes. - - `setClientID()` and `createNewClientID()` updated to re-retrieve - station listings and trigger `session-updated` event. - - expose `enableiOSAudioSession` method to force creation of - AVAudioSession on iOS - -- v3.2.2 - - fish renamed java variable/accessor causing crash - -- v3.2.1 - - update Station.hasNewMusic property after every play - - update Android library to 6.0.8 - -- v3.2.0 - - new getMaxSeekableLengthInSeconds and seekCurrentStationBy methods - - new hasNewMusic property of Stations - -- v3.1.7 - - when 'enableBackgroundMusic' is false in iOS, don't attempt to - get an AVAudioSession (that is, set disableAudioSession = TRUE) - -- v3.1.6 - - update to iOS library v4.4.12 - -- v3.1.5 - - update to iOS library v4.4.11 - -- v3.1.4 - - fix improper Java call to disable audio focus - -- v3.1.3 - - ensure Exoplayer runs in main thread - - fix bad disconnect call - - add 'invalid' handler to gracefully deal with live reload - - update to iOS library v4.4.10 - -- v3.1.1 - - Simulcast streaming support - -- v3.0.0 - library and RN updates - - update to Android library v6.0.1, with ExoPlayer 2.10.6 - - update to iOS library v4.4.4 - -- v2.4.0 - background music - - offer 'enableBackgroundMusic:boolean' as initialization option - - update to iOS library v4.3.2 - - update to Android library v5.2.9 - -- v2.3.5 - update iOS library - - changes to support iOS 13 and prevent crash - -- v2.3.4 - add debugging option - - new 'debug' option to assist with debugging integration - -- v2.3.3 - update React Native dependency - - update to react-native@^0.59.8 - -- v2.3.2 - bugfixes - - update to Android SDK v5.2.8 to handle play -> pause transition before notification is created on Android - - update to iOS v4.2.8 to get play/pause toggling bugfix - -- v2.3.1 - client id export/import - - new methods: requestClientID(), createNewClientID(), and setClientID() - -- v2.2.3 - station change bugfix - - update to Android library 5.2.4 and fix bad type comparison when changing - station - -- v2.2.2 - iOS native lib update - - update to native iOS SDK 4.2.2 - -- v2.2.1 - docs and timing! - - fix an android event ordering that didn't match iOS side of things - - update sample app - - update README to reference using this project on Android - -- v2.2.0 - Android support! - - now includes our native Android SDK (version 5.2.0), which targets API 28 - -- v2.1.2 - *critical bugfix* - - update to FeedMedia iOS SDK 4.2.1 to fix SDK not saving client id - - fix 'skip failed' event not firing - thanks [@tnaughts](https://github.com/tnaughts) diff --git a/example/.yalc/react-native-feed-media-audio-player/ExampleUI.js b/example/.yalc/react-native-feed-media-audio-player/ExampleUI.js deleted file mode 100644 index 752e9ca..0000000 --- a/example/.yalc/react-native-feed-media-audio-player/ExampleUI.js +++ /dev/null @@ -1,231 +0,0 @@ -/** - * Sample React Component that uses React Native Feed Media Audio Player - */ - -import React, { Component } from 'react'; // eslint-disable-line no-unused-vars -import { Platform, StyleSheet, Text, View, Button } from 'react-native'; // eslint-disable-line no-unused-vars -import audioPlayerService from 'react-native-feed-media-audio-player'; - -// initialize the player as early in the app as possible -audioPlayerService.initialize({ token: 'demo', secret: 'demo' }); - -// If you want to test transitions between songs, try using 'counting' -// for both the token and secret values. Also try 'badgeo' for both -// values to test out when no music is available. - -export default class ExampleUI extends Component { - - constructor(props) { - super(props); - - this.state = { - // music is available (true), not available (false), or undetermined (null) - available: null, - }; - - this.player = audioPlayerService.player; - } - - componentDidMount() { - // Make sure music is available for playback before registering event listeners - this.player.whenAvailable((available) => { - // no music is available - if (!available) { - this.setState({ available: false }); - return; - } - - const player = this.player; - - // music is available! - this.setState({ - available: true, - playbackState: player.playbackState, - station: player.activeStation, - stations: player.stations, - requestingSkip: false - // play: will hold the current play when one starts - }); - - - this.elapsedTimer = setInterval(() => { - if ((this.state.playbackState === 'PLAYING') && (this.state.play)) { - this.setState({ - play: { ...this.state.play, elapsed: player.elapsedTime } - }); - } - }, 1000); - - this.stateChangeUnbind = player.on('state-change', (state) => { - this.setState({ playbackState: state }); - }); - - this.stationChangeUnbind = player.on('station-change', (station) => { - this.setState({ station: station }); - }); - - this.playStartedUnbind = player.on('play-started', (play) => { - this.setState({ - requestingSkip: false, - play: { ...play, elapsed: 0 } - }); - }); - - this.skipFailedUnbind = player.on('skip-failed', () => { - this.setState({ - requestingSkip: false, - play: { ...this.state.play, canSkip: false } - }); - }); - }); - } - - componentWillUnmount() { - if (this.state.available) { - this.stateChangeUnbind(); - this.stationChangeUnbind(); - this.playStartedUnbind(); - this.skipFailedUnbind(); - clearInterval(this.elapsedTimer); - } - } - - skip() { - // note that we're trying to skip - this.setState({ requestingSkip: true }); - // ask the player to skip the current song - audioPlayerService.player.skip(); - } - - renderButtons() { - - return [ -