Open guest271314 opened 7 years ago
You can't.
remove is to remove data from a source buffer. Once appendBuffer has completed, you can no longer distinguish the different segments that have been added to a source buffer.
On a side note, this repository is to report issues with the MSE specs. It is not intended for answering generic questions on how to use MSE. There are better platforms for this. Stack overflow is a good one
@jyavenard
On a side note, this repository is to report issues with the MSE specs. It is not intended for answering generic questions on how to use MSE.
Asked here to avoid conjecture as to proper usage of the implementations at large based on the specification.
Do advise if should close both this issue and https://github.com/w3c/media-source/issues/190?
What is the meaning of
Uncaught DOMException: Failed to set the 'duration' property on 'MediaSource': Setting duration below highest presentation timestamp of any buffered coded frames is disallowed. Instead, first do asynchronous remove(newDuration, oldDuration) on all sourceBuffers, where newDuration < oldDuration.
when trying to set .duration
after calling .remove()
?
According to the specification at remove
Parameter | Type | Nullable | Optional | Description
start | double | ✘ | ✘ | The start of the removal range, in seconds measured from presentation start time.
end | unrestricted double | ✘ | ✘ | The end of the removal range, in seconds measured from presentation start time.
Is
remove(newDuration, oldDuration)
where newDuration < oldDuration
described in the specification as expected parameters for remove()
?
What are the expected parameters for .remove()
, and what is expected result of .remove()
call?
Can the end
, start
, or newDuration
, oldDuration
only begin at 0
, not for example 5
, 10
, if more than one ArrayBuffer
is appended to a single SourceBuffer
?
@jyavenard Close to meeting requirement or rendering a stream of media fragments utilizing .appendWindowStart
, .appendWindowEnd
and .timestampOffset
. One issue is setting the properties for buffers 2-N. If the first fragment is ten seconds ten seconds of media is rendered.
How can we reset the above properties so that if 2-N media fragment buffers are not ten seconds, the media playback time of 2-N buffers is not ten seconds?
@jyavenard @paulbrucecotton Why does .appendStartWindow
not allow setting a value third time? Getting
TypeError: Failed to set the 'appendWindowStart' property on 'SourceBuffer': The value provided (25) is outside the range (0, 5.75].
when previous .appendWindowStart
and .appendWindowEnd
values were 2.5
, 5.75
respectively, and current values trying to set are, for example, 25
, 35
https://github.com/legokichi/ts-ebml/issues/14#issuecomment-325277192?
@guest271314
TypeError: Failed to set the 'appendWindowStart' property on 'SourceBuffer': The value provided (25) is outside the range (0, 5.75].
The message provided is rather explicit.
appendWindowStart can't be greater than appendWindowEnd https://w3c.github.io/media-source/index.html#dom-sourcebuffer-appendwindowstart "3. If the new value is less than 0 or greater than or equal to appendWindowEnd then throw a TypeError exception and abort these steps."
I strongly suggest that you read the MSE spec, all your answers are there. https://w3c.github.io/media-source/index.html
@jyavenard
You can't.
Solved.
Utilized .remove(0, <duration>)
, then at corresponding dispatched updatedend
event set .appendWindowStart
to 0
and .appendWindowEnd
to Infinity
before proceeding to next .appendBuffer()
call.
Asking for clarification, here. That is the purpose of the this repository at GitHub, yes? Else, why are comments allowed at all if questions concerning implementation are not fielded?
This GitHub was used for the development of the MSE Recommendation. It can certainly be used to propose corrections and improvements to the Recommendation but is not really meant to be an FAQ for MSE.
As indicated elsewhere you might get better help at StackOverflow since there are likely more people watching and/or participating those discussions.
/paulc HME WG Chair
@paulbrucecotton Would suggest including a note in the specification which indicates that if .appendWindowStart
and .appendWindowEnd
are expected to be used more than once for more than a single appended buffer, the values of each should be set to 0
, Infinity
, respectively, before setting to the values expected to be rendered.
stackoverflow is not the end-all, be-all. A useful service, though if you are here, why not ask the authors and contributors of and to the specification itself?
In any event, nice work on developing MediaSource
.
@paulbrucecotton
As indicated elsewhere you might get better help at StackOverflow since there are likely more people watching and/or participating those discussions.
fyi have asked the question at stackoverflow.com, at least thrice, from different perspectives
How to make range request for any portion of a media fragment?
How to use Blob URL, MediaSource or other methods to play concatenated Blobs of media fragments?
If would have stopped asking questions when first question was closed by stackoverflow users, when previously encountered "can't" at second question, or not continued attempting to meet specific requirement following excellent work by Kaiido at third question, would not have reached fulfillment of media fragment portion of requirement using MediaSource
and resolved media recording portion of requirement using ts-ebml.
Looks like V2BugFixes is best milestone for now to help ensure this issue gets appropriate attention in V2 scope.
Including a minimal example of remove()
, appendWindowStart
, and appendWindowEnd
usage in the specification would resolve this issue.
Given code which appends multiple buffers to a
SourceBuffer
, what is the proper procedure to, for example, remove0
through30
of the first appended buffer and5
through10
, in seconds, from the first and second appended buffers, respectively, resulting in playback of the time ranges that are not removed?