Audio only playback
planned
Hunter Hillman
Very rough scope of work:
Generally there's five packages:
- core package which has all the plain TS/JS, cross-platform fetch code to interact with the API, and state management
- core-web package which depends on core, and layers on web-specific code like HLS.js and browser APIs
- core-react package which also depends on core and layers on cross-platform, react-specific querying/state management w/ React Query and Zustand, and shared hooks for components like the Player
- react package which depends on core-react and core-web and includes the final components and hooks shipped to the developer
- react-native package which depends on core-react and includes the final RN components and hooks shipped to the developer
We will need to update mostly 5, 4, 3, and possibly 2/1 for this. I would imagine we add a new prop, audioOnly (or something similarly named) to the React Player which then hides the video element (in ControlsContainer [1]) in the DOM (using something like display: none). And then we need to pass audioOnly in the query string to the backend on the playback URL.
[1] https://github.com/livepeer/livepeer.js/blob/main/packages/react/src/components/media/controls/ControlsContainer.tsx
This is a hacky fix since some playback will always deliver video, no matter the query string. So we will need to hide the video element for these, since there's video technically playing in the background
Hunter Hillman
planned
Hunter Hillman
under review