Live video on the AT Protocol

remove example-app for now

-238
-39
js/example-app/.gitignore
··· 1 - # Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files 2 - 3 - # dependencies 4 - node_modules/ 5 - 6 - # Expo 7 - .expo/ 8 - dist/ 9 - web-build/ 10 - expo-env.d.ts 11 - 12 - # Native 13 - .kotlin/ 14 - *.orig.* 15 - *.jks 16 - *.p8 17 - *.p12 18 - *.key 19 - *.mobileprovision 20 - 21 - # Metro 22 - .metro-health-check* 23 - 24 - # debug 25 - npm-debug.* 26 - yarn-debug.* 27 - yarn-error.* 28 - 29 - # macOS 30 - .DS_Store 31 - *.pem 32 - 33 - # local env files 34 - .env*.local 35 - 36 - # typescript 37 - *.tsbuildinfo 38 - 39 - app-example
-60
js/example-app/README.md
··· 1 - # Welcome to your Expo app 👋 2 - 3 - This is an [Expo](https://expo.dev) project created with 4 - [`create-expo-app`](https://www.npmjs.com/package/create-expo-app). 5 - 6 - ## Get started 7 - 8 - 1. Install dependencies 9 - 10 - ```bash 11 - npm install 12 - ``` 13 - 14 - 2. Start the app 15 - 16 - ```bash 17 - npx expo start 18 - ``` 19 - 20 - In the output, you'll find options to open the app in a 21 - 22 - - [development build](https://docs.expo.dev/develop/development-builds/introduction/) 23 - - [Android emulator](https://docs.expo.dev/workflow/android-studio-emulator/) 24 - - [iOS simulator](https://docs.expo.dev/workflow/ios-simulator/) 25 - - [Expo Go](https://expo.dev/go), a limited sandbox for trying out app 26 - development with Expo 27 - 28 - You can start developing by editing the files inside the **app** directory. This 29 - project uses [file-based routing](https://docs.expo.dev/router/introduction). 30 - 31 - ## Get a fresh project 32 - 33 - When you're ready, run: 34 - 35 - ```bash 36 - npm run reset-project 37 - ``` 38 - 39 - This command will move the starter code to the **app-example** directory and 40 - create a blank **app** directory where you can start developing. 41 - 42 - ## Learn more 43 - 44 - To learn more about developing your project with Expo, look at the following 45 - resources: 46 - 47 - - [Expo documentation](https://docs.expo.dev/): Learn fundamentals, or go into 48 - advanced topics with our [guides](https://docs.expo.dev/guides). 49 - - [Learn Expo tutorial](https://docs.expo.dev/tutorial/introduction/): Follow a 50 - step-by-step tutorial where you'll create a project that runs on Android, iOS, 51 - and the web. 52 - 53 - ## Join the community 54 - 55 - Join our community of developers creating universal apps. 56 - 57 - - [Expo on GitHub](https://github.com/expo/expo): View our open source platform 58 - and contribute. 59 - - [Discord community](https://chat.expo.dev): Chat with Expo users and ask 60 - questions.
-28
js/example-app/app.json
··· 1 - { 2 - "expo": { 3 - "name": "SP Example", 4 - "slug": "place.stream.example", 5 - "version": "1.0.0", 6 - "orientation": "portrait", 7 - "scheme": "place.stream.example", 8 - "userInterfaceStyle": "automatic", 9 - "newArchEnabled": false, 10 - "ios": { 11 - "supportsTablet": true 12 - }, 13 - "android": { 14 - "adaptiveIcon": { 15 - "backgroundColor": "#ffffff" 16 - }, 17 - "edgeToEdgeEnabled": true 18 - }, 19 - "web": { 20 - "bundler": "metro", 21 - "output": "single" 22 - }, 23 - "plugins": [], 24 - "experiments": { 25 - "typedRoutes": true 26 - } 27 - } 28 - }
-52
js/example-app/app/app.tsx
··· 1 - import { 2 - LivestreamProvider, 3 - StreamplaceProvider, 4 - useChat, 5 - useStreamplaceStore, 6 - } from "@streamplace/components"; 7 - import React from "react"; 8 - import { ScrollView, Text, View } from "react-native"; 9 - 10 - export default function App() { 11 - return ( 12 - <StreamplaceProvider url="https://longos.iameli.link"> 13 - <Content /> 14 - </StreamplaceProvider> 15 - ); 16 - } 17 - 18 - function Content() { 19 - const liveUsers = useStreamplaceStore((x) => x.liveUsers); 20 - return ( 21 - <View 22 - style={{ 23 - flex: 1, 24 - justifyContent: "center", 25 - alignItems: "center", 26 - backgroundColor: "#222", 27 - }} 28 - > 29 - {liveUsers.map((user) => ( 30 - <Text style={{ color: "white" }} key={user.author.did}> 31 - {user.author.handle} 32 - </Text> 33 - ))} 34 - <LivestreamProvider src="scumb.ag"> 35 - <LivestreamContent /> 36 - </LivestreamProvider> 37 - </View> 38 - ); 39 - } 40 - 41 - function LivestreamContent() { 42 - const chat = useChat(); 43 - return ( 44 - <ScrollView> 45 - {chat.map((message) => ( 46 - <Text style={{ color: "white" }} key={message.uri}> 47 - {message.record.text} 48 - </Text> 49 - ))} 50 - </ScrollView> 51 - ); 52 - }
-8
js/example-app/app/entrypoint.tsx
··· 1 - // Don't add anything to this file! It needs to be minimal so that 2 - // hot module reloading works properly on web. 3 - 4 - import "@expo/metro-runtime"; 5 - import { registerRootComponent } from "expo"; 6 - import App from "./app"; 7 - 8 - registerRootComponent(App);
-41
js/example-app/package.json
··· 1 - { 2 - "name": "@streamplace/example-app", 3 - "main": "./app/entrypoint.tsx", 4 - "version": "1.0.0", 5 - "scripts": { 6 - "start": "expo start --port 38083", 7 - "reset-project": "node ./scripts/reset-project.js", 8 - "android": "expo start --android --port 38083", 9 - "ios": "expo start --ios --port 38083", 10 - "web": "expo start --web --port 38083", 11 - "lint": "expo lint" 12 - }, 13 - "dependencies": { 14 - "@expo/vector-icons": "^14.1.0", 15 - "@streamplace/atproto-oauth-client-react-native": "workspace:*", 16 - "@streamplace/components": "workspace:*", 17 - "expo": "~52.0.8", 18 - "expo-font": "~13.0.1", 19 - "expo-linking": "~7.0.3", 20 - "expo-splash-screen": "~0.29.11", 21 - "expo-status-bar": "~2.0.0", 22 - "expo-symbols": "~0.4.4", 23 - "expo-system-ui": "~4.0.3", 24 - "expo-web-browser": "^14.0.1", 25 - "react": "18.3.1", 26 - "react-dom": "18.3.1", 27 - "react-native": "0.76.2", 28 - "react-native-gesture-handler": "~2.20.2", 29 - "react-native-reanimated": "~3.16.1", 30 - "react-native-safe-area-context": "4.12.0", 31 - "react-native-screens": "~4.1.0", 32 - "react-native-web": "^0.19.13", 33 - "react-native-webview": "13.12.4" 34 - }, 35 - "devDependencies": { 36 - "@babel/core": "^7.26.0", 37 - "@types/react": "~18.3.12", 38 - "typescript": "~5.3.3" 39 - }, 40 - "private": true 41 - }
-10
js/example-app/tsconfig.json
··· 1 - { 2 - "extends": "expo/tsconfig.base", 3 - "compilerOptions": { 4 - "strict": true, 5 - "paths": { 6 - "@/*": ["./*"] 7 - } 8 - }, 9 - "include": ["**/*.ts", "**/*.tsx", ".expo/types/**/*.ts", "expo-env.d.ts"] 10 - }