Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: add the possibility to rely on managedMediaSource on iOS devices #1562

Merged
merged 9 commits into from
Nov 18, 2024

Conversation

Florent-Bouisset
Copy link
Collaborator

Add the possibility to rely on ManagedMediaSource for devices that has no access to MediaSource such as iOS devices with version > 17.1

In practice that allow devices like iPhone to play DASH content with the RxPlayer.

Note that it is not possible to cast a DASH content with AirPlay, so the RxPlayer disable the possibility to stream to AirPlay by adding the disableRemotePlayback attribute to the video Element when a DASH content is loaded.

#1294

@peaBerberian
Copy link
Collaborator

peaBerberian commented Oct 3, 2024

Aren't there also supplementary events we're supposed to handle as a player with a ManagedMediaSource?
To me that was one of the arguments for it.

I know there's the potentiality of GC at any time, which I think we prefer and already support, and that brings the bufferedchange event which we could use but nothing urgent for that one.
But there's also mainly the stopStreaming / startStreaming events on which we're supposed to pause / resume our [adequately named] stream logic (the loading and pushing segments operations), no?

@peaBerberian peaBerberian added this to the 4.3.0 milestone Oct 4, 2024
@Florent-Bouisset Florent-Bouisset force-pushed the feature/add-managed-media-source branch from 27776f2 to a6b5a49 Compare October 22, 2024 10:19
@peaBerberian
Copy link
Collaborator

So if I get it, we will not be reacting to startstreaming/endstreaming directly but we'll just check mediaSource.streaming in the next playback observation.

I wonder if it's what we want:

  • For endstreaming, it depends on the philosophy of the event. I'm not sure of what is wanted from us here by reading the spec.
  • For startstreaming, it depends on what the user-agent defined as its [cannot] play uninterrupted and efficiently limit...

@peaBerberian
Copy link
Collaborator

We could also have a supplementary parameter streamingReference everywhere but I understand that it is less nice than having it in a playback observation

@Florent-Bouisset Florent-Bouisset force-pushed the feature/add-managed-media-source branch 2 times, most recently from babacfe to 2fd5e0c Compare October 31, 2024 13:41
@Florent-Bouisset
Copy link
Collaborator Author

So if I get it, we will not be reacting to startstreaming/endstreaming directly but we'll just check mediaSource.streaming in the next playback observation.

I wonder if it's what we want:

  • For endstreaming, it depends on the philosophy of the event. I'm not sure of what is wanted from us here by reading the spec.
  • For startstreaming, it depends on what the user-agent defined as its [cannot] play uninterrupted and efficiently limit...

Don't know if the comment is outdated, but it actually send an event streamingChanged and the playbackObserver emit a new observation on the "endstreaming" and "startstreaming" event.
The value is passed down to the representationStream and to the segmentQueue. The next time a segment is intended to be loaded the segmentQueue it check the value on the last observation, so It should be OK.

@Florent-Bouisset Florent-Bouisset force-pushed the feature/add-managed-media-source branch from 6571e83 to 90e74cc Compare November 7, 2024 09:20
@Florent-Bouisset Florent-Bouisset force-pushed the feature/add-managed-media-source branch 2 times, most recently from e806950 to a5cbf86 Compare November 14, 2024 13:14
…ices

add unit test for managed media source

handle start and end stream event from managedMediaSource

fix unit test

react to event endStreaming and startStreaming to immediately trigger a new observation and to download the segments sooner

review feedback

restart Loading queue if it canLoad is updated

add clearSignal to prevent memory leak

remove undefined from canLoad

only set disableRemotePlayback if it's defined by the browser

fmt
@Florent-Bouisset Florent-Bouisset force-pushed the feature/add-managed-media-source branch from 6c08847 to acbec7c Compare November 18, 2024 09:31
@peaBerberian peaBerberian merged commit 73043b2 into dev Nov 18, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants