Closed guest271314 closed 7 years ago
Please retry with Firefox beta 56, there was a bug in 55 preventing readyState to progress if your data didn't start at exactly zero.
How much data are you adding to the source buffer? What is the buffered range after appendBuffer has completer?
@jyavenard Will try to install and try at Firefox beta 56. The candidate by default at package manager is still 55.0.2 according to apt-cache
.
The data amount is roughly one second of recorded media. Just tried to reproduce issue again and error was logged at console
Media resource https://upload.wikimedia.org/wikipedia/commons/2/22/Volcano_Lava_Sample.webm#t=10,11 could not be decoded. OfH5OfNChz51liz9 Media resource https://upload.wikimedia.org/wikipedia/commons/2/22/Volcano_Lava_Sample.webm#t=10,11 could not be decoded, error: Error Code: NS_ERROR_DOM_MEDIA_DEMUXER_ERR (0x806e000c) OfH5OfNChz51liz9
Where can we source valid .mp4
, .webm
and other files types for testing MediaSource
online?
@jyavenard
https://upload.wikimedia.org/wikipedia/commons/2/22/Volcano_Lava_Sample.webm#t=10,11 is not a valid URL
What do you mean?
@jyavenard See Media Fragments URI 1.0 (basic)
@jyavenard Just tried with URL "https://mirrors.creativecommons.org/movingimages/webm/ScienceCommonsJesseDylan_240p.webm#t=10,11"
and
1.00136 1.125 96434 0.056 0.986
were logged for
console.log(mediaDuration, mediaSource.duration);
console.log(mediaBuffer.byteLength, sourceBuffer.buffered.start(0), sourceBuffer.buffered.end(0));
The issue appears to have been the invalid .webm
file. Was able to get expected video result at Firefox 55, save for needing to use AudioContext.createMediaElementSource()
, AudioContext.createMediaStreamDestination()
, HTMLCanvasElement.captureStream()
for MediaStream
instead of HTMLMediaElement.captureStream()
, which does not playback audio due to cross-origin request, though that is another issue.
@jyavenard fwiw, the code which have composed so far relevant to the current issue https://github.com/guest271314/recordMediaFragments. Firefox implementation still has several issues.
So your segment doesn't start at 0. There is an issue in Firefox 55 where autoplay attribute will not work under those conditions. You must manually call play() this is fixed in 56.
@jyavenard Installed Firefox 57, removed autoplay="true"
at <video>
element, still getting same result. canplay
is dispatched three times, though not for each media fragment appended as a buffer. The procedure stops at some point between events between waiting
and canplay
events being dispatched.
@jyavenard Will re-read the specification and attempt to make adjustments
According to the specification
HAVE_FUTURE_DATA
(numeric value 3)When an
ArrayBuffer
is appended to aMediaSource
instance using.appendBuffer()
canplay
is fired at Chromium 60, though not at Firefox 55.Is
canplay
expected to be fired at Firefox when anArrayBuffer
is appended toMediaSource
instance?When
autoplay
attribute is set totrue
, why isvideo.paused
true
at Firefox 55, though not at Chromium 60, where duration of the media as array buffer is approximately one second?Why are there inconsistent implementations at Chromium and Firefox?
Not sure if the issue is a Blink or Gecko bug.
Relevant code
HTML
<video preload="auto" autoplay="true" width="320" height="280" controls="true"></video>
JavaScript