--
You received this message because you are subscribed to the Google Groups "Shaka Player Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shaka-player-us...@googlegroups.com.
To post to this group, send email to shaka-pla...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shaka-player-users/0dcb871f-b1a0-449f-8a46-141a0d485369%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Shaka Player Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shaka-player-us...@googlegroups.com.
To post to this group, send email to shaka-pla...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shaka-player-users/72bfda79-1d90-43d5-b26f-30572d261259%40googlegroups.com.
Hi Daniel,Thanks for your detailed analysis. Low latency is something we tried to accomplish in our design, but failed to instrument or stay on top of.We are currently designing Shaka v2.0, which will have many of the core components rewritten, including our MSE, streaming, and networking.In general, I'm happy to review pull requests. However, since we are in a period of transition, things are a bit more complicated right now. We're trying to finish v1.6.0, and I would like to avoid any major architectural or other risky changes in that release. And some of these issues may be addressed by the design of v2.0.
That said, let me try to address these one at a time and ask some clarifying questions.#1: Fetching MPD from string.a) You mention "AsyncRequest". We don't have a class by that name. Do you mean "AjaxRequest"?
b) You created a blob URL, and let XHR handle it. AjaxRequest has built-in support for data URIs and doesn't use XHR for them. I would be interested to know if this is faster or slower than XHR+blob. If it's faster, this could be a workaround for you. Would you mind trying it and letting me know?
c) I would prefer not to allow an MPD structure directly passed into DashVideoSource. This is an internal type and we are currently able to assume that an MPD object has come out of our parser and processor and is therefore structured in a way we know we can handle.
d) Networking in Shaka v2.0 will not be centered on XHR. Rather, all network requests go through plugins based on the URI scheme. In the case of http/https, the built-in plugin for that will use XHR. So there should be no need to go through XHR for string literals in Shaka v2.0. It could be as fast as Promise resolution (which appears to be 0-3ms for me in Chrome).
#2: Preloading MediaSource.Interesting idea, but one of the points of Shaka Player is to handle MediaSource so the app developer doesn't have to. So I'm reticent to complicate things by having the app developer handle that. As an alternative, what if we initialized MediaSource when the Player is initialized, rather than when the VideoSource is loaded? This will be easier in v2.0, when we drop HttpVideoSource and only support MediaSource-based playbacks.In any case, I'd be interested to see your patch for this. Can you send a pull request? I can't guarantee that we will land it in v1.6, but I'm sure it is worth discussing further.
#3: Fetching initData.We haven't done the best job of this yet, either in terms of latency or cross-browser support. When we fetch init data is going to have to change in Shaka v2.0 in order to better support more browsers (long story), and we should try to minimize latency as well.As for 1.x, I'd like to see a PR for this as well. It sounds like you are only proposing changes to the internals, so I'm hopeful we can work out a clean way to implement this change before 2.0.
#4: Fetch and append in parallel.This sounds like an obvious win. I'd be happy to review the specifics in a PR, in particular since you rate the complexity of your fix as low.
#5: Streaming fetch.Can you clarify what you mean by streaming fetch API? Are you talking about XHR's progress event?
Thanks,Joey
To unsubscribe from this group and stop receiving emails from it, send an email to shaka-player-users+unsub...@googlegroups.com.
Is there an ETA for release of Shaka 2.0? It seems like it might bring plenty of new features that I may be able to benefit from and might save me doing some additional work.
c) I would prefer not to allow an MPD structure directly passed into DashVideoSource. This is an internal type and we are currently able to assume that an MPD object has come out of our parser and processor and is therefore structured in a way we know we can handle.I basically only exported shaka.dash.mpd.parseMpd method and call that from my own code. In DashVideoSource I then short circuit if an Mpd structure is provided instead of a string in the constructor, skipping fetching and parsing of the MPD.
d) Networking in Shaka v2.0 will not be centered on XHR. Rather, all network requests go through plugins based on the URI scheme. In the case of http/https, the built-in plugin for that will use XHR. So there should be no need to go through XHR for string literals in Shaka v2.0. It could be as fast as Promise resolution (which appears to be 0-3ms for me in Chrome).That sounds great! Will this plugin API allow for streaming APIs? That is will it be able to continuously provide more data as it becomes available or will it only provide a single event/callback/promise for when all of the data is available? Will there be a way to change the default handler for HTTP/HTTPS as well?
#5: Streaming fetch.Can you clarify what you mean by streaming fetch API? Are you talking about XHR's progress event?As Donato has pointed out this is referring to fetch Web API. The fetch API is the first browser HTTP API that has a well defined streaming interface that allows for incrementally receiving data without hacks like using iframes. using this API could decouple Shaka startup time from segment size. If I have a segment size of 10 seconds the current implementation needs to download the entire 10 seconds of the first segment - that is the entire segment - before playback can start. With using an incremental/streaming API as the fetch API, playback can start immediately after enough data was streamed (e.g. a second or two). This should decrease time to playback significantly. It is correct though that the API is not fully implemented in all browser platforms.