To play YouTube videos while your iPhone is locked, you can follow these steps:
1. Update your iPhone to the latest version of iOS, which is iOS 17 as of 2023. Updating the software ensures that you have the latest features and improvements.
2. Launch the YouTube app on your iPhone and sign in to your account if you haven't already.
3. Find the video you want to play and start playing it.
4. Once the video starts playing, press the home button to lock your iPhone or swipe up from the bottom of the screen to access the Control Center and tap on the lock icon.
5. With your iPhone locked, you should see the playback controls in the Control Center, including play, pause, skip, and volume controls. You can control the playback without unlocking your device.
Please note that while this allows you to play YouTube videos with your iPhone locked, it only works within the YouTube app. If you switch to another app or navigate away from the YouTube app, the video will pause.
Moreover, it's worth mentioning that these instructions are based on the assumption that YouTube has not implemented any specific changes or restrictions related to video playback while the device is locked. Always ensure that you're using the latest version of the YouTube app and iOS for the most up-to-date functionality.