The October 1st update to the Media Source Extensions spec changed the SourceBuffer.append() behavior to allow calls in the "ended" state. These calls will trigger a transition to "open" and allow data to be appended instead of throwing an exception. The current WebKit implementation needs to be updated to reflect this new behavior.
Created attachment 178796 [details] Patch
Comment on attachment 178796 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=178796&action=review > Source/WebCore/Modules/mediasource/MediaSource.cpp:-289 > - if (!data->length()) Chromium player implementation was updated to handle this case. m_player needs to see these appends now so that it can properly mirror the state transition.
Comment on attachment 178796 [details] Patch Attachment 178796 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/15280102 New failing tests: http/tests/media/media-source/video-media-source-append-in-ended-state.html http/tests/media/media-source/video-media-source-append-with-offset-in-ended-state.html
Created attachment 178809 [details] Rebase
Comment on attachment 178809 [details] Rebase View in context: https://bugs.webkit.org/attachment.cgi?id=178809&action=review > Source/WebCore/Modules/mediasource/MediaSource.cpp:293 > + if (m_readyState == endedKeyword()) > + setReadyState(openKeyword()); > > if (!m_player->sourceAppend(id, data->data(), data->length())) { > ec = SYNTAX_ERR; Is it necessary to call to m_player->sourceAppend() when data->length() is zero? It is probably worth having an explicit test for calling append() with no data when state is "ended".
Comment on attachment 178809 [details] Rebase View in context: https://bugs.webkit.org/attachment.cgi?id=178809&action=review >> Source/WebCore/Modules/mediasource/MediaSource.cpp:293 >> ec = SYNTAX_ERR; > > Is it necessary to call to m_player->sourceAppend() when data->length() is zero? > > It is probably worth having an explicit test for calling append() with no data when state is "ended". The call on m_player is necessary so the player implementation can keep its state in sync with m_readyState. Added a test for the 0-byte case.
Created attachment 178822 [details] Added 0-byte append test
Comment on attachment 178822 [details] Added 0-byte append test Clearing flags on attachment: 178822 Committed r137332: <http://trac.webkit.org/changeset/137332>
All reviewed patches have been landed. Closing bug.