react-native-tvos: Cannot start stream of HLS video in tvOS after upgrade to version 0.73.0
New Version
0.73
Old Version
0.71
Build Target(s)
tvOS simulator, androidTV simulator
Output of react-native info
info Fetching system and libraries information… System: OS: macOS 14.3.1 CPU: (8) arm64 Apple M3 Memory: 137.59 MB / 8.00 GB Shell: version: “5.9” path: /bin/zsh Binaries: Node: version: 20.11.0 path: ~/.nvm/versions/node/v20.11.0/bin/node Yarn: version: 1.22.21 path: ~/.nvm/versions/node/v20.11.0/bin/yarn npm: version: 10.2.4 path: ~/.nvm/versions/node/v20.11.0/bin/npm Watchman: Not Found Managers: CocoaPods: version: 1.15.2 path: /opt/homebrew/lib/ruby/gems/3.1.0/bin/pod SDKs: iOS SDK: Platforms: - DriverKit 23.2 - iOS 17.2 - macOS 14.2 - tvOS 17.2 - visionOS 1.0 - watchOS 10.2 Android SDK: Not Found IDEs: Android Studio: 2023.1 AI-231.9392.1.2311.11330709 Xcode: version: 15.2/15C500b path: /usr/bin/xcodebuild Languages: Java: version: 17.0.9 path: /opt/homebrew/opt/openjdk@17/bin/javac Ruby: version: 3.1.4 path: /opt/homebrew/opt/ruby@3.1/bin/ruby npmPackages: “@react-native-community/cli”: Not Found react: installed: 18.2.0 wanted: 18.2.0 react-native: Not Found react-native-macos: Not Found react-native-tvos: installed: 0.73.2-0 npmGlobalPackages: “react-native”: Not Found Android: hermesEnabled: true newArchEnabled: false iOS: hermesEnabled: true newArchEnabled: false
info React Native v0.73.4 is now available (your project is running on v0.73.2-0). info Changelog: https://github.com/facebook/react-native/releases/tag/v0.73.4 info Diff: https://react-native-community.github.io/upgrade-helper/?from=0.73.4 info For more info, check out “https://reactnative.dev/docs/upgrading?os=macos”.
Issue and Reproduction Steps
Issue
Recently my team and I faced an issue with certain Apple devices, those Apple TV with direction keys, where focus wouldn’t move with swipes unless you press a direction key first, after doing it would work as expected. We decided to upgrade from react-native-tvos@0.71.0 we upgraded to react-native-tvos@0.73.0, everything worked as expected! Until we got into the streaming screens of the app.
When you start video stream with HLS video in react-native-video@^5.2.1 in tvOS, the audio tool box show these logs and the video/stream doesn’t start, although it does works in androidTV as expected.
[CoreFoundation] AddInstanceForFactory: No factory registered for id <CFUUID 0x600000290440> F8BB1C28-BAE8-11D6-9C31-00039315CD46
[AudioToolbox] AQMEIO.cpp:198 timed out after 15.000s (0 0); suspension count=0 (IOSuspensions: )
[AudioToolbox] MEDeviceStreamClient.cpp:467 AQME Default-InputOutput: client stopping after failed start: <CA_UISoundClientBase@0x108107980>; running count now 0
[AudioToolbox] CA_UISoundClient.cpp:293 CA_UISoundClientBase::StartPlaying: AddRunningClient failed (status = -66681).
[AudioToolbox] MEMixerChannel.cpp:1006 MEMixerChannel::EnableProcessor: failed to open processor type 0x705f6571
[AudioToolbox] MEMixerChannel.cpp:1006 MEMixerChannel::EnableProcessor: failed to open processor type 0x705f6571
[AudioToolbox] AQMEIO.cpp:198 timed out after 15.000s (0 0); suspension count=0 (IOSuspensions: )
[AudioToolbox] MEDeviceStreamClient.cpp:467 AQME Default-InputOutput: client stopping after failed start: <AudioQueueObject@0x10a838e00; Unknown figplayer;
[14037]; play>; running count now 0
Steps to reproduce
create app using the template and installing react-native-video
yarn create react-native-app TestApp --template https://github.com/react-native-tvos/react-native-template-typescript-tv/tree/tv-release-0.73.0 --template-path template
cd TestApp
yard add react-native-video
yard add --dev @types/react-native-video
Code
package.json
{
"name": "testapp",
"version": "1.0.0",
"private": true,
"scripts": {
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web",
"start": "expo start",
"tvos": "expo run:ios --scheme testApp-tvOS --device \"Apple TV\"",
"lint": "eslint .",
"test": "jest"
},
"dependencies": {
"expo": "^50.0.2",
"react": "18.2.0",
"react-native": "npm:react-native-tvos@^0.73.2-0",
"react-native-video": "^5.2.1"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@babel/preset-env": "^7.20.0",
"@babel/runtime": "^7.20.0",
"@react-native/babel-preset": "^0.73.19",
"@react-native/eslint-config": "^0.73.2",
"@react-native/metro-config": "^0.73.3",
"@react-native/typescript-config": "^0.73.1",
"@types/react": "^18.2.6",
"@types/react-native-video": "^5.0.19",
"@types/react-test-renderer": "^18.0.0",
"babel-jest": "^29.6.3",
"eslint": "^8.19.0",
"jest": "^29.6.3",
"prettier": "2.8.8",
"react-test-renderer": "18.2.0",
"typescript": "5.0.4"
},
"engines": {
"node": ">=18"
}
}
app.tsx
import React, {useRef} from 'react';
import {StyleSheet} from 'react-native';
import Video from 'react-native-video';
import VideoRef from 'react-native-video';
function App(): React.JSX.Element {
const videoRef = useRef<VideoRef>(null);
return (
<Video
// Big Buck Bunny video adaptive HLS stream URL
source={{uri: 'https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8'}}
// Store reference
ref={videoRef}
resizeMode="cover"
style={styles.backgroundVideo}
/>
);
}
var styles = StyleSheet.create({
backgroundVideo: {
position: 'absolute',
top: 0,
left: 0,
bottom: 0,
right: 0,
backgroundColor: 'gray',
},
});
export default App;
Results
tvOS
androidTV
About this issue
- Original URL
- State: closed
- Created 5 months ago
- Reactions: 5
- Comments: 36
Now this is VERY interesting – if I spin up a new RN app for TV using
react-native init TestVideo --template=react-native-tvos, your problem reproduces.Ok I’ll spend some time seeing if I can redo the template and fix this issue. I still have no idea why it is occurring – I don’t see any obvious reason.
In the meantime, I’d love to get your feedback on the new Expo flow for creating a TV project, and whether that will work for you. Among other things, you would have the option of using
expo-avfor video and audio.I just tested with the latest release (0.73.4-0) and do not reproduce the issue on a simulator. Here is a quick repro that spins up a new Expo TV app similar to yours. With this, the video plays as expected.
This definitely seems to be a bug in the tvOS simulator in the latest Xcode. A simulator created with tvOS 15.2 does not show the issue, but a simulator with tvOS 17.x does show the issue. Closing this.
The error logs are from using the react-native-video dependency. You can enable VLC via a feature flag in my repo, but that does not work either. 😄
Oddly enough I created a new tvOS 15.2 simulator today, and the video played fine.
I think I got the same issue after upgrading to the latest RN 0.73 tvOS with Expo from version 0.72.6-1 with the old approach. The source code and other dependency itself did not get updated. I created a new expo project and copied my code with dependencies afterwards. Repository: https://github.com/Duell10111/ReactTube/tree/expo-template-update
I get similar error messages already mentioned here. The issue is also only seen on the simulator. 😕 Error Logs:
Part 2:

Therefore the video never starts playing only a single picture of the video is shown. I tested it on a Apple TV 17.2 simulator.
This is great to hear! Thank you for the update. 😄
It’s live and working on test flight! Thanks so much for your support! You really cleared big questions! At the end, we are using the
expotemplate withexpo-avfor the app. Looks like the issue is just simulators 🤷🏼♂️.I joined expo’s discord, I will add send any other good/weird things I notice while we are working on the app, we might go for an EAS deployment too so I might have some feedback.
I did some more testing today, and a new Expo app using
expo-avis having the issue on Apple TV simulator, but not on iPhone simulator. So it is not a template issue, nor is it a problem specific to react-native-video.The problem seems to happen with both debug and release builds. The problem does NOT happen on a real device. So there may be some issue with the Apple TV simulator that we are somehow hitting.
I’ll consult with other Expo SDK developers who work on
expo-avand see if we can figure out what is going on.Tonight my team will finish the expo “port” and deploy to TestFlight to check if it approves the team’s test, I will report back 🙌🏼
Seeing this intermittently fail on simulator, but succeed on a real device, makes me think this is some weird Apple simulator bug… such things were seen before in Xcode 12.
And now I created an app with the community CLI, and the problem is back. Reproduces on simulator, but not on a real device. 😭
Hmm now the problem no longer reproduces – the Expo app with react-native-video works fine on both device and simulator.
Tried other stream URLs with the same result. I’m going to update my Xcode to 15.2, and then try on the simulator, and also on a real Apple TV device and see if the same problem occurs.
Wow seeing the same thing now on expo-av
hmm… I’m seeing the same error now, following the same steps I did yesterday.
Opening the same stream URL works fine with VLC app, so it doesn’t seem to be a problem on the server side.
I’ll also try with expo-av.
Sorry I should have said the tvOS scheme, not the tvOS target.
It’s definitely an issue with the tvOS scheme, because the iOS scheme is not having the issue.
Yes most likely I need to update the tvOS target in the template Xcode project.
We at Expo just released SDK 50, which includes Expo SDK TV support (which I am very excited about 😄 )
@mendoza thanks for the detailed bug report and the repro! We will take a look.