Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

macuser1232

macrumors 6502a
Original poster
Jan 20, 2012
673
7
Wasn't sure if I should post this in iOS 18 or macOS 15.

How I envisioned AirPlay would work is that I have my iPhone which is using cellular data and has loaded a YouTube video. I want to move this video to a bigger screen, my M1 Pro laptop right next to it. The M1 Pro should not need an internet connection and should not re-stream the YouTube video. It should be P2P in that the iPhone advertises some LAN network for the Mac to auto-connect to and the video gets streamed from the iPhone to my Mac via a LAN Wi-Fi connection.

How did I come to find this out?

My normal internet connection comes from a Verizon hotspot (a SIM inserted into a cellular router). I ran out of unthrottled data so now I can't stream 1080p anymore. However, my phone cellular data works fine. Yes, I could advertise the phone hotspot to the laptop which is what I'm doing now. But, shouldn't the whole purpose of AirPlay be that I can move video from what device screen to another without the client device needing to re-stream the media on its own? Otherwise I'll just copy/paste the YouTube link from one device to another!

It doesn't make sense to me. I always wish we had more true P2P software.

/rant
 
  • Like
Reactions: Nermal
my iPhone which is using cellular data and has loaded a YouTube video.
Foremost, beyond possibly on a site using very basic HTML, media is never fully loaded err pre-loaded, it’s incrementally buffered. The YouTube loading/buffering algorithm is one of those especially complex examples.
Key Components of YouTube's Buffering Algorithm

  1. Adaptive Bitrate Streaming:
    - YouTube uses adaptive bitrate streaming, which automatically adjusts the quality of the video based on the user's internet connection speed. It starts by loading a lower quality version and increases the quality as the connection allows.
  2. Initial Buffering:
    - When a video is first played, YouTube buffers a portion of the video in advance. This means it downloads a few seconds of video before playback begins, ensuring that there is enough content to play smoothly.
  3. Segmented Video Delivery:
    - Videos are divided into small segments (typically a few seconds each). This allows YouTube to fetch only the segments that are needed based on the viewer's playback position, reducing load times and bandwidth consumption.
  4. Buffer Management:
    - The algorithm continually monitors the playback and adjusts the buffering strategy. If playback starts to lag (i.e., if the buffer runs low), the algorithm may temporarily reduce the video quality to allow for continuous playback.
  5. Pre-loading:
    - YouTube may pre-load segments of the video that are likely to be watched next, based on user behavior patterns. This is especially relevant for playlists or recommended videos.
  6. Network Conditions:
    - The algorithm responds to changes in network conditions. If the connection becomes unstable or slow, it will lower the video quality to maintain playback without interruptions.
  7. User Settings:
    - Users can choose different quality settings manually, which can influence buffering. For example, selecting 4K will require more bandwidth and may lead to longer initial buffering if the connection isn’t fast enough.
Conclusion

Overall, YouTube's buffering algorithm is a sophisticated system that combines adaptive streaming, real-time monitoring of network conditions, and intelligent pre-loading to ensure a seamless viewing experience. The goal is to minimize buffering time and interruptions while optimizing video quality based on the viewer's available bandwidth.

Therefore...

should not re-stream the YouTube video.
Your Mac (or other AirPlay receiver) wouldn’t be re-streaming much as your iPhone is unlikely to have the entire media file anyway.

Let’s step back to your other point...
The M1 Pro should not need an internet connection [...] It should be P2P in that the iPhone advertises some LAN network for the Mac to auto-connect to and the video gets streamed from the iPhone to my Mac via a LAN Wi-Fi connection.
And that’s true, when you aren’t focused on online sources. Think about when you screen mirror or share personal photos/videos (e.g., the camera roll) via AirPlay. The system isn’t going to temporarily upload your media to iCloud servers, send a URL to the other device, and have it stream those media files.

It doesn't make sense to me.
Does that add clarity?
 
  • Like
Reactions: russell_314
Foremost, beyond possibly on a site using very basic HTML, media is never fully loaded err pre-loaded, it’s incrementally buffered. The YouTube loading/buffering algorithm is one of those especially complex examples.


Therefore...


Your Mac (or other AirPlay receiver) wouldn’t be re-streaming much as your iPhone is unlikely to have the entire media file anyway.

Let’s step back to your other point...

And that’s true, when you aren’t focused on online sources. Think about when you screen mirror or share personal photos/videos (e.g., the camera roll) via AirPlay. The system isn’t going to temporarily upload your media to iCloud servers, send a URL to the other device, and have it stream those media files.


Does that add clarity?
Of course I didn't mean the video was "fully loaded". I understand what buffering is.

All I'm asking for is that AirPlay acts like a true P2P service and allows the device (iPhone) to transmit the already buffered video via a wireless connection (Wi-Fi because Bluetooth isn't enough bandwidth) to the client device.
 
  • Like
Reactions: russell_314
Of course I didn't mean the video was "fully loaded". I understand what buffering is.

All I'm asking for is that AirPlay acts like a true P2P service and allows the device (iPhone) to transmit the already buffered video via a wireless connection (Wi-Fi because Bluetooth isn't enough bandwidth) to the client device.
I don’t know exactly how the streaming/handoff process functions, inter-protocol, of course. Nonetheless, as I explained logically earlier:
And that’s true, when you aren’t focused on online sources. Think about when you screen mirror or share personal photos/videos (e.g., the camera roll) via AirPlay. The system isn’t going to temporarily upload your media to iCloud servers, send a URL to the other device, and have it stream those media files.
Furthermore, Apple notes the fundamental requirement for AirPlay is "same Wi-Fi network” as well as a footnote with link to check/verify compatible/supported OS versions.

  1. Connect your device to the same Wi-Fi network as your Apple TV, AirPlay-compatible smart TV, or Mac.
Your iPhone or iPad and your AirPlay-enabled device must be on the same Wi-Fi network before you can get automatic and suggested AirPlay connections. To get automatic and suggested AirPlay connections to your Apple TV or HomePod, make sure your Apple TV or HomePod is logged in to the same iCloud account as your iPhone or iPad.
With that said, the Apple TV having an authentication requirement is noted/discussed in a different thread:

Anyway…. A quick thought… An insightful test would be to start watching a YT video on your iPhone. At three-quarters in (or at least greater than halfway through) start an AirPlay session. While AirPlaying, also monitor the connection usage (via router UI or otherwise), scrub back and rewatch an earlier portion of the video, observe if the Mac or both devices consume additional bandwidth, that is, (re-)buffer.
 
Last edited:
  • Like
Reactions: russell_314
I suspect there’s also copyright restrictions. Could Apple legally redistribute copyrighted content with P2P like old school P2P software did? I suspect not so I bet that’s where the roadblock is.

If it’s copyrighted content on some streaming service, I think it’s going to need a direct connection to that streaming service to verify the copyright. At this point, you might as well stream the content from the server it came from.
 
  • Like
Reactions: macuser1232
Seems to me the current method of "handing off" the streaming from an online resource, is the most logical one in terms of Internet bandwidth, network bandwidth, and battery life. I see where you're coming from but the normal use case is - both devices have direct Internet connections.

Submit feedback about it www.apple.com/feedback
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.